
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!

Instructor: Prof. Wolfgang Bangerth [email protected] Teaching Assistants: Dukjin Nam [email protected]
Problem 1 (Jacobi iteration). Let A, b be the 100 × 100 matrix and 100- dimensional vector defined by
Aij =
bi =
sin
2 πi 50
Apply Jacobi’s method to solving Ax = b. Write a program that implements the Jacobi method and start with a vector x 0 with randomly chosen elements in the range − 1 ≤ (x 0 )i ≤ 1 (i.e. with elements generated from what the rand() function or a similar replacement returns). (Hint: It is not necessary to actually store the complete matrix just to multiply with it. Rather, use that the i-th component of the vector Ay is (Ay)i =
∑n j=1 Aij^ yj^ = 2.^01 yi^ −^ yi−^1 −^ yi+1^ at least for 2^ ≤^ i^ ≤^ n^ −^ 1, and obvious modifications for j = 1 and j = n.) Run 200 Jacobi iterations and plot the values of (x(k))i against i for every few iterations, for example k = 0, 2 , 5 , 10 , 20 , 50 , 100 , 200. What do you observe? (5 points)
Problem 2 (Alternative vector norms). Let A be a symmetric and posi- tive definite n × n matrix. Show that
‖x‖A =
xT^ Ax
is a norm for vectors x ∈ Rn. (Hint: Use the eigenvalue and eigenvector decom- position of symmetric positive definite matrices.) (3 points)
Problem 3 (Jacobi iteration). Solve problems 7.3.1 a) and b) of the book (using paper and pencil). (3 points)
Problem 4 (Gauss-Seidel iteration). Solve problems 7.3.3 of the book (using paper and pencil) for parts a) and b). (3 points)
Happy spring break!