

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!


MATH 571 Numerical Methods for Scientific Computing I Winter 2006
Assignment #5 due: Wednesday, March 29
The error is e = x − ˜x and the residual is r = b − A˜x.
(a) Show that Ae = r and
||e||
||x||
≤ κ(A)
||r||
||b||
It follows that if A is invertible, then e = 0 if and only if r = 0, but if A is ill-conditioned,
then the relative error
||e||
||x||
may be large even if the relative residual
||r||
||b||
is small. This
occurs in the following example (due to W. Kahan).
, b =
, x =
, x˜ 1
, x˜ 2
(b) Show that Ax = b (using exact arithmetic). Consider ˜x 1
and ˜x 2
as approximate
solutions and for each one compute the corresponding
||e|| ∞
||x|| ∞
||r|| ∞
||b|| ∞
. Find κ ∞
. Using Gaussian elimination and partial pivoting, find P, L, U
such that P A = LU.
1
4
(so that A is
a 9 × 9 matrix, the same as in class). Note that A is a band matrix and furthermore it’s
sparse within the band. Suppose that Gaussian elimination without pivoting is performed,
and assume that the L, U factors are stored in the original matrix A. Draw a box around
each zero element of A that gets filled in during the elimination. (Hint: this requires
no computation.) We already observed in class that Gaussian elimination preserves the
bandwidth of a band matrix, but this exercise shows that sparsity within the band may
be lost. In this case we say that fill-in occurs within the band.
m×m
be hermitian. Show that the following statements are equivalent by
proving a ⇒ b ⇒ c ⇒ d ⇒ e ⇒ a.
a) The eigenvalues of A are positive.
b) A is positive definite.
c) ∆ k
is positive definite for k = 1 ,... , m, where ∆ k
a 11
· · · a 1 k
a k 1
· · · a kk
d) det ∆ k
0 for k = 1 ,... , m
e) A has a Cholesky factorization.
is positive definite and find its Cholesky factorization.
Use m = 1000 instead of m = 200. Record the elapsed times. For each part (a) to (g),
answer questions (i) and (ii) in the text.
on the other three sides. The temperature u(x, y) satisfies the Laplace equation ∆u = 0 for
(x, y) in (0, 1) × (0, 1), with Dirichlet boundary conditions u(x, 1) = 1 , u(0, y) = u(1, y) =
u(x, 0) = 0.
a) Solve for u(x, y) using the 5-point discrete Laplacian with meshsize h = 2
−p
, p = 2 , 3 , 4 , 5.
Use Cholesky factorization to solve the linear system for u ij
≈ u(x i
, y j
). To simplify the
programming, you may use a full matrix (as opposed to a sparse representation). Display
the numerical solution u ij
for each value of h using a contour plot and a surface plot
(include the boundary values). The relevant commands in Matlab are contour and mesh
(or surf).
b) Present a table with the following data. column 1: h; column 2: u h
1
4
1
4
). Does the
numerical solution converge as h → 0? At what rate?
c) Something interesting happens at the northeast and northwest corners of the plate,
where the temperature jumps from u = 0 to u = 1. Based on the numerical results, what
is the limiting value of the exact solution u(x, y) as (x, y) approaches one of those corners
along various directions?