MAS 365 Syllabus

- 2011 Spring -

Text : Numerical Analysis and Scientific Computation by Jeffery Leader

Evaluation : Mid term exam  (Ch 1 - Ch 4)	100 pt

Final Exam (Ch 5 - Ch 8)	100 점

Home work	100 점

------------------------------------------------------

Total	300 점

In submitting computer program print the codes and the result

Always  give a lot of comment  on the code and detail explanation to the result.(Use Graph as much as possible)

A good visibility is very important.

□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□□

Go to the site and download Matlab and C++(Visual_Studio)   http://circnts.kaist.ac.kr/

Or use freeware available from

http://www.brothersoft.com/dev-c++-download-65296.html

1 Turbo C 3.0

2 Visual C++ Express Edition 2008

3 Visual C++ 2008 Express Edition SP1 Beta

4 ANSI/Turbo Pascal to C/C++(win)

Even though you can use Matlab, I strongly suggest C++.

When you use Matlab do not use 'built-in' functions. One of the object of learning   Numerical Analysis is to develop such methods.

Keep all your codes after you submitted. They will be necessary later in the class.

============================================

Home Work to submit. (Due every Tuesday unless otherwise indicated).

[제 1 주: ]  1.1-1.3

[1.1] 1, 2, 3

[1.2] 1, 2, 5

[1.3] 1a, 3

[제 2 주: ]  1.4-1.7

[1.4] 1, 4 [1.5] 3a, 4

[1.6] 1, 4 [1.7]

[제 3 주: ]  1.8 2.1-2.3

[1.8] 1, 3 [1.9] 1, 3a, 5, 13(Write computer code based on Sherman-Morrison formula)

[2.1] 1a,b,c,  2a.

[2.2] 2a,b,c(by hand)

[2.3] 2a,b, 4

Explain how to use Sherman morrison for Newton's method

[제 4 주: 2/28-3/4]  2.4-2.7

[2.4]  [2.5] 1a,b, 2a, [2.6]  4 a,b, 7 a, b.

Write a full code in C++ to solve Ax=b by LU with and without pivoting, where A is a Hilbert matrix of size 8 by 8, right right hand side  b =(b_1, ..., b_n),

b_i=sum_{j=1}^8 1/(i+j-1) and the exact solution is x=(1,1,...,1).

Check the error of both and compare.  (Due by Mar 18)

[2.7]  4  (Use C++ or Matlab code to perform QR.), 5 a,b, c (Due by Mar 22)

Apply the QR code to the following matrix to find Q and R.

A=

1,  0,  0,  0,   0,  0,  0, 0

0,  0,  1,  0,   0,  0,  0, 0

0,  1,  0,  0,   0,  0,  0, 0

0,  0,  0,  1,   0,  0,  0, 0

-1, -1,  3,  3,   1,  1,  3, 3

1,   1,  3,  3,  -1, -1,  3, 3

11, -7, 11, -7, -11,  7,-11, 7

1,  -3,  5, -3,  2,  -6, 10, -6

[제 5 주:3/7-3/11 ]  2.8-3.3

[2.8] 1a,b 2a,b,c,

[3.1] 1 (a), (b) 3(a), (b).

[제 6 주: 3/14--3/18] 3.4- 3.6

[3.5] 1, 2

[3.6] 1,a,b,  2,

Computation Problems

1.  Write a C++(Matlab) code to implement GMRES. Apply it to the

min \| Cx-b\| where  C is the matrix obtained by deleting the last column from A above and b=(1,2,3,4,5,6,7,8)

2. Apply Power method to find the largest eigenvalue of the matrix appearing in solving

-u''=f on [0,1] by finite difference method with n=10.(see my note chap2 for the matrix)

3. Write a code to implement the Modified Gram Schmidt  and apply it to the matrix A above.

Due 4/5.

[제 8 주: ] Mid term.  Mar 31 Thurs 2:30 - 4:30

[제 9 주::4/5--4/8 ] 4.1-4.4

[4.1]  2 a,c, 3,a,b,c 5 a,b

[4.2] 4, 5 [4.3] 2, 3

[4.4] 4a,b,  12

Write a C++ code for finding a cubic spline. (with natural BC and Clamped BC) to fit  y= sin(x^2) at [0, 0.1, 0.2,...,1]. Plot the graphs of y=sin(x^2)  and cubic spline.

[제 10 주 4/12--4/15 ]  5.1-5.3

[5.1] 1, 3, 4, 5 (use Matlab or C++)

[5.2] 1, 2, 4 [5.3] 2, 3, 4, 5                  Due 4/28

[제 11 주 :4/19--4/22 ]  5.4 -5.5.

[5.4] 1, 2, 5                                Due May 3

[제 12 주:4/26--4/30 ]  6.1-6.4

[6.1] 1, 3, 4, 7, 9

[6.2] 2 (Write Matlab or C++ code to solve problems 1 and 3)

[6.3] (Write Matlab or C++ code to solve problem 3)  5 a,b

[6.4] 1, 2,  3

[제 13 주:5/3-5/7 ]  6.5- 6.7

[6.5]  1 a,b,c

[6.6]

[6.7] 2 a,b,c,d, 3 a,b,c,d

[제 14 주:5/10-5/14 ]  7.1- 7.3

[제 15 주:5/17-5/21 ]  7.4 -7.5

Final Exam (Ch 5 - Ch 8 ) on May 19. 2:30 pm

[제 16 주: ]

Term Project: Write a c++ code

Example: We want to solve

[eqn: - TRIANGLE u+ vec{b} ` NABLA u=f```on````` OMEGA # ````````````````````````````````````````u=g``on`` Partial OMEGA]

by finite difference method where [eqn: b=(b _{1} ,b _{2} )] and [eqn: OMEGA] is the unit square [0,1]X[0,1].

Here use the true solution [eqn: u=2x ^{2} y+e ^{{x+y}}],

and [eqn: f=-(4y+2e ^{x+y} )+b _{1} (4xy+e ^{x+y} )+b _{2} (2x ^{2} +e ^{x+y} )]

Divide the domain into n X n subrectangles. Use backward difference formula for

[eqn: NABLA u`=`( {u _{i,j} -u _{i-1,j}} over {h} , {u _{i,j} -u _{i,j-1}} over {h} )] .

1. Form the matrix equation Ax=f for he above differential equation.

2. Assume b=0 and solve the equation by conjugate gradient method and .

Check the error [eqn: DLINE u-u _{h} DLINE = sqrt {SIGMA |u-u _{h} | ^{2} (i,j)`h ^{2}}] for h=1/5, 1/10, 1/20, 1/40 etc.

3. Assume [eqn: b=(30,10)]  and solve it by GMRES. That is ,  find the minimizer of  \|b-Ax\|.  Again check the error as in (2)

4. Solve it again with [eqn: b=(30,10)] and [eqn: f=x+y], g=0. In this case u is unknown.  So just draw the graph.