Introduction to Scientific Computing (MATH 560)

2011-2012 "Introduction to Scientific Computing", MATH 560/A, Credit:3

Course detailed description can be found here.

Objectives of the Course/Dersin amacı: The goal of this course is to give an overview of computational problems in scientific research, developing practical experience in ways and techniques for computational solution of various research problems, together with hands-on skills in scientific computing environments.

My expectations of you/Öğrencilerden beklentilerim:

in English:
  • Ability to write correct and polite business letters to all of your professors. An example can be found here. You may also refer to the book "How to Say It" which provides clear and practical guidance for what to say and what not to say in any situation.
  • Bringing your laptops at each lesson;
  • Doing homework at time;
  • Attending to lessons and listening to your professors;
  • Doing everything precisely and in details;
  • Doing everything at time without being late;
  • Working hard;
  • Trying to understand every topic as much as you can;
  • Working in groups;
  • Trying to make research in areas connected with this course;
  • Communicating in clear English;
  • Preparing for midterm and final exam;
  • Everyday progress in your studies.
in Turkish:
  • Tüm profesörlerinize doğru, kibar ve iş mailleri tarzında ciddi mailler yazmanız. Örnek maili buradan bulabilirsiniz. Ayrıca, "How to Say It" kitabına bakarak herhangi bir durumda ne söyleyip ne söylemeyeceğinizi net bir şekilde öğrenebilirsiniz;
  • Dizüstü bilgisayarlarınızı her derse getirmeniz;
  • Zamanında ödevlerinizi yapmanız;
  • Derslerinize katılmanız ve profesörlerinizi dinlemeniz;
  • Her şeyi titizce ve detayları ile yapmanız;
  • Her şeyi  zamanında yapmanız;
  • Sıkı çalışmanız;
  • Her konuyu en iyi şekilde anlamaya çalışmanız;
  • Gruplar şeklinde çalışmanız;
  • Dersimiz ile alakalı araştırmalar yapmanız;
  • Anlaşılır bir İngilizce ile iletişim kurmanız;
  • Ara ve Final sınavlarına hazırlanmanız;
  • Çalışmalarınızda her gün gelişme göstermeniz.
Recommended Reading/Derste kullanılacak kaynaklar:
  • Xin-She Yang,  Introduction to computational mathematics, University of Cambridge, UK, ISBN:   978-981-281-817-1.
  • W. Gander and J. Hrebicek, ed., Solving Problems in Scientific Computing using Maple and Matlab, Springer, 4th edition, 2004.
  • T. A. Davis, MATLAB Primer, 8th edition, CRC Press, 2010.
  • T. A. Driscoll, Learning MATLAB, SIAM, 2009.
  • D. Hanselman and B. Littlefield, Mastering MATLAB, Prentice Hall, 2011.
  • D. J. Higham and N. J. Higham, MATLAB Guide, 2nd edition, SIAM, 2005.
  • C. Moler, Numerical Computing with MATLAB, SIAM, 2004.
  • A. Quarteroni, F. Saleri, and P. Gervasio, Scientific Computing with MATLAB and Octave, 3rd edition, Springer, 2010.
  • C. F. Van Loan, Introduction to Scientific Computing: A Matrix-Vector Approach Using MATLAB, Prentice Hall, 1997.
  • C. F. Van Loan and K.-Y. D. Fan, Insight Through Computing: A MATLAB Introduction to Computational Science and Engineering, SIAM, 2010.
  • Bertil Gustafsson, Fundamentals of Scientific Computing (Texts in Computational Science and Engineering), Springer; 1st Edition, 2011.
  • Michael T. Heath, Scientific Computing: An Introductory Survey, McGraw-Hill, New York, 2002.

Instructions on preparing for final exam:

  • Collect all your homeworks in single *.rtf or *.doc file, and send them to my e-mail, as well as all MatLab & Maple implementations (until June, 1);
  • Send me the presentations you have prepared during this course (until June, 1);
  • Print all your homeworks and presentations, Maple/Matlab implementations of your midterm exam, and do not forget to put your signature on each document. Collect all mentioned printed documents in a file and bring to my office R-347. If I am absent you may put your file in a gap under the door (until June, 4);
  • For preparing for the exam, you may also use books from my web site;
  • Don't worry and be happy. Worrying less can lengthen your life.

Homework Examples

1. Using commands of plots and plottools libraries (Maple) for creating three dimensional geometrical objects.

Example of work done by my student from Russia (2009):

> with(plottools):
> a1:=cylinder([0,0,0],4,0.2,color=pink):
> a2:=cylinder([-2.5,-2.5,0],0.5,-7,color=green):
> a3:=cylinder([-2.5,2.5,0],0.5,-7,color=green):
> a4:=cylinder([2.5,2.5,0],0.5,-7,color=green):
> a5:=cylinder([2.5,-2.5,0],0.5,-7,color=green):
> a6:=semitorus([0,0,6],Pi/5..4*Pi/5,0.2,3.8,color=green):
> a7:=semitorus([0,0,7],Pi/5..4*Pi/5,0.2,3.8,color=green):
> a8:=torus([0,0,-5.5],0.2,3.5,color=black):
> a9:=cylinder([3.2,2.2,0],0.2,7.5,color=green):
> a10:=cylinder([-3.2,2.2,0],0.2,7.5,color=green):
> a11:=semitorus([0,0,3],Pi/5..4*Pi/5,0.2,3.8,color=green):
> a12:=torus([0,0,0],0.2,4,color=black):
> a13:=cone([3.2,2.2,8],0.2,-0.5,color=red,linestyle=2):
> a14:=cone([-3.2,2.2,8],0.2,-0.5,color=red,linestyle=2):
> display({a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14},scaling=constrained);

More homeworks of my Russian students can be downloaded from here.

2. Implement the rules of Trachtenberg rapid mental computation system in MatLab.
a) Multiplication of given n-digit number by 11 (by Selda Kurtar).

function carpim(a)
t = cputime;
P=num2str(a);
n=length(P);
K(1,1)=0;
K(1,n+2)=0;
for i=2:n+1
    K(1,i)=str2num(P(i-1));
end
C=zeros(1,n+2);
C(1,n+2)=K(1,n+1);
for i=n+1:-1:2;
    C(i)=K(i)+K(i-1)+C(i);
    if C(i)>=10;
    C(i)=C(i)-10;
    C(i-1)=C(i-1)+1;
    end
end
for i=1:n+2,M(i)='0';
end;
for i=1:n+2;
    M(i)=int2str(C(1,i));
end;
Answer=str2num(M)
IsCorrect=str2num(M)-a*11;
if IsCorrect==0 % Verification
    display('The answer is CORRECT')
else
    display('The answer is WRONG')
end
ComputingTime=cputime-t % estimated time for multiplying 2 numbers
end

b) Multiplication of given n-digit number by 12 (by Selda Kurtar).

function oniki(a)
t = cputime;
P=num2str(a);
n=length(P);
K(1,1)=0;
K(1,n+2)=0;
for i=2:n+1
    K(1,i)=str2num(P(i-1));
end
C=zeros(1,n+2);
C(1,n+2)=2*K(1,n+1);
if C(1,n+2)>=10;
    C(1,n+2)=C(1,n+2)-10;
    C(1,n+1)=C(1,n+1)+1;
end
for i=n+1:-1:2;
    C(i)=2*K(i-1)+K(i)+C(i);
    if (C(i)>=10) & (C(i)<20);
    C(i)=C(i)-10;
    C(i-1)=C(i-1)+1;
    end
    if C(i)>=20;
        C(i)=C(i)-20;
        C(i-1)=C(i-1)+2
    end
    end
for i=1:n+2,M(i)='0';
end;
for i=1:n+2;
    M(i)=int2str(C(1,i));
end;
Answer=str2num(M)
IsCorrect=str2num(M)-a*12;
if IsCorrect==0 % Verification
    display('The answer is CORRECT')
else
    display('The answer is WRONG')
end
ComputingTime=cputime-t % estimated time for multiplying 2 numbers
end

3. Create a MatLab function which numerically integrates any given function in domain [a;b]  using trapezoidal rule, left and right Riemann sums with discretization into "N" equally spaced panels.


Comments