MATH 417: Numerical Analysis - Homework Assignment 6, Assignments of Mathematical Methods for Numerical Analysis and Optimization

Information about a homework assignment for the numerical analysis course (math 417) at the university of california, berkeley. The assignment, given by professor wolfgang bangerth, includes four problems related to jacobi iteration, alternative vector norms, and gauss-seidel iteration. Students are required to write programs, run iterations, and plot results for problem 1, prove a theorem for problem 2, and solve problems using paper and pencil for problems 3 and 4.

Typology: Assignments

Pre 2010

Uploaded on 02/10/2009

koofers-user-u4c
koofers-user-u4c 🇺🇸

4

(1)

9 documents

1 / 1

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
MATH 417: Numerical Analysis
Instructor: Prof. Wolfgang Bangerth
Teaching Assistants: Dukjin Nam
Homework assignment 6 due 3/22/2007
Problem 1 (Jacobi iteration). Let A, b be the 100 ×100 matrix and 100-
dimensional vector defined by
Aij =
2.01 if i=j,
1 if i=j±1,
0 otherwise,
bi=1
100 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 x0with randomly chosen elements in
the range 1(x0)i1 (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=Pn
j=1 Aijyj= 2.01yiyi1yi+1 at least for 2 in1, and
obvious modifications for j= 1 and j=n.)
Run 200 Jacobi iterations and plot the values of (x(k))iagainst ifor 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 Ab e a symmetric and posi-
tive definite n×nmatrix. Show that
kxkA=xTAx
is a norm for vectors xRn. (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!
1

Partial preview of the text

Download MATH 417: Numerical Analysis - Homework Assignment 6 and more Assignments Mathematical Methods for Numerical Analysis and Optimization in PDF only on Docsity!

MATH 417: Numerical Analysis

Instructor: Prof. Wolfgang Bangerth [email protected] Teaching Assistants: Dukjin Nam [email protected]

Homework assignment 6 – due 3/22/

Problem 1 (Jacobi iteration). Let A, b be the 100 × 100 matrix and 100- dimensional vector defined by

Aij =

  1. 01 if i = j, − 1 if i = j ± 1 , 0 otherwise,

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!