Docsity

Numerical Methods for Scientific Computing I - Assignment 2 Questions | MATH 571, Assignments of Mathematics

Toggle sidebar
bg1
MATH 571 Numerical Methods for Scientific Computing I Winter 2006
hw2 , due: Wednesday, February 8
page 30 (singular value decomposition) 4.1 , 4.4
1. Let A=!1 2
3 4 ". Find ||A||pfor p= 1,2,∞.
2. Prove.
a) ||x||∞≤||x||2≤||x||1
b) If Ais hermitian with eigenvalues λ1≥· · · ≥λn, then λn= min
x"=0 RA(x).
c) If Qis orthogonal, then ||Qx||2=||x||2,||Q||2= 1, ||QA||2=||A||2=||AQ||2.
d) If ||A|| <1 for some induced matrix norm, then I+Ais invertible.
3. Let A=!1 2
0 2 ".
a) Use Matlab’s command svd to find the SVD of A. State U, Σ, V (4-digit format is fine).
b) In one plot draw the unit circle Cand indicate the vectors v1, v2, and in another plot
draw the ellipse AC (i.e. the image of the circle under the map x→Ax) and indicate the
vectors Av1=σ1u1, Av2=σ2u2. Use the axis(’square’) command in Matlab to ensure
that the horizontal and vertical axes have the same scale.
c) Find A1, the best rank-1 approximation to Ain the 2-norm. Find ||A−A1||2.
4. Solve the two-point boundary value problem from hw1 using the compact 4th order
finite-difference scheme derived in class,
−D+D−#1−h2
12 ci$ui+ciui=#1 + h2
12 D+D−$fi.
Use meshsize h= 1/2p, where pis a positive integer. Solve the linear system using the
tridiagonal LU method derived in class (you get partial credit if you use a full matrix; to
get full credit use only vectors). Turn in the program listing. For p= 1 : 4, plot the exact
solution (y(x) vs x) and the numerical solution (uivs xi, including the boundary points).
For p= 1 : 20, present a table with the following data. column 1: h; column 2: ||uh−yh||∞;
column 3: ||uh−yh||∞/h4; column 4: cpu time; column 5: (cpu time)/n(where h= 1/(n+1)
as in class). Explain the trends in each column. Among the given values of h, which value
ensures that the error ||uh−yh||∞is less than 10−3for the 4th order scheme? for the 2nd
order scheme from hw1?

Partial preview of the text

Download Numerical Methods for Scientific Computing I - Assignment 2 Questions | MATH 571 and more Assignments Mathematics in PDF only on Docsity!

MATH 571 Numerical Methods for Scientific Computing I Winter 2006 hw2 , due: Wednesday, February 8 page 30 (singular value decomposition) 4.1 , 4.

  1. Let A =

. Find ||A||p for p = 1 , 2 , ∞.

  1. Prove. a) ||x||∞ ≤ ||x|| 2 ≤ ||x|| 1 b) If A is hermitian with eigenvalues λ 1 ≥ · · · ≥ λn, then λn = min x"= RA(x). c) If Q is orthogonal, then ||Qx|| 2 = ||x|| 2 , ||Q|| 2 = 1, ||QA|| 2 = ||A|| 2 = ||AQ|| 2. d) If ||A|| < 1 for some induced matrix norm, then I + A is invertible.
  2. Let A =

a) Use Matlab’s command svd to find the SVD of A. State U, Σ, V (4-digit format is fine). b) In one plot draw the unit circle C and indicate the vectors v 1 , v 2 , and in another plot draw the ellipse AC (i.e. the image of the circle under the map x → Ax) and indicate the vectors Av 1 = σ 1 u 1 , Av 2 = σ 2 u 2. Use the axis(’square’) command in Matlab to ensure that the horizontal and vertical axes have the same scale. c) Find A 1 , the best rank-1 approximation to A in the 2-norm. Find ||A − A 1 || 2.

  1. Solve the two-point boundary value problem from hw1 using the compact 4th order finite-difference scheme derived in class, −D+D−

h^2 12 ci

ui + ciui =

h^2 12

D+D−

fi. Use meshsize h = 1 / 2 p, where p is a positive integer. Solve the linear system using the tridiagonal LU method derived in class (you get partial credit if you use a full matrix; to get full credit use only vectors). Turn in the program listing. For p = 1 : 4, plot the exact solution (y(x) vs x) and the numerical solution (ui vs xi, including the boundary points). For p = 1 : 20, present a table with the following data. column 1: h; column 2: ||uh − yh||∞; column 3: ||uh −yh||∞/h^4 ; column 4: cpu time; column 5: (cpu time)/n (where h = 1 /(n+1) as in class). Explain the trends in each column. Among the given values of h, which value ensures that the error ||uh − yh||∞ is less than 10 −^3 for the 4th order scheme? for the 2nd order scheme from hw1?