

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 685/CSI 700/OR 682 Take-home Exam given 03/04/08, due in class 03/24/
Problem 1. Show how to evaluate the following expressions in a numerically stable fashion:
(a)
1 + 2x
1 − x 1 + x
, for |x| 1
(b)
x +
x
x −
x
, for x 1
Problem 2. Prove that if Gaussian elimination with partial pivoting is applied to a matrix A that is diagonally dominant by columns, then no row interchanges will occur.
Problem 3.
and b =
The exact solution of Ax = b is x = (1, −1)T^. Further, let two approximate solutions x 1 = (0. 999 , − 1 .001)T^ , x 2 = (0. 341 , − 0 .087)T^ be given. (a) Does the more accurate solution have a smaller residual? (b) Determine the exact A−^1 and cond(A) with respect to the maximum norm. (c) Explain the discrepancy observed in (a) by linking the residuals to the cor- responding backward error.
Problem 4. Let AT^ Ax = AT^ b, (AT^ A + F )˜x = AT^ b, 2||F || 2 ≤ σn(A)^2 , where σn(A) denotes the smallest singular value of A. Show that if r = b − Ax, ˜r = b − Ax˜, then ˜r − r = (I − A(AT^ A + F )−^1 AT^ )Ax and consequently
||r˜ − r|| 2 ≤ 2 cond(A)
||x|| 2.
What does this estimate accomplish? Hint: Notice the role of (AT^ A)−^1 F in the above estimate and use the relationship ||(AT^ A)−^1 || 2 · ||A||^22 = cond(A)^2. The following fact from
matrix algebra might be useful: for any M s.t. ||M || < 1, ||(I + M )−^1 || ≤ 1 1 − ||M || .
Problem 5. Matrix C = (AT^ A)−^1 with rank(A) = n is frequently used in statistics, where it is called a covariance matrix. Suppose we have obtained a QR decomposition A = QR. (a) Prove that C = (RT^ R)−^1. (b) Design an algorithm for computing the diagonal entries of C requiring n^3 / 3 or less floating point operations. Hint: Use the special structure of C and look for optimal algorithms in this context.
Problem 6. Computer part. Consider a boundary value problem for the 2nd order differential equation:
uxx − u = f (x), x ∈ [0, 1] u(0) = 0, u(1) = 0,
where u = u(x) is the unknown and f = f (x) is a given right-hand side. To solve this problem numerically, we first partition the interval 0 ≤ x ≤ 1 into N equal subintervals and thus build a uniform grid of N + 1 nodes: xj = j · h, h = 1/N, j = 0, 1 ,... N. Then, instead of looking for the continuous function u = u(x) we will be looking for its approximate table of values u 0 ,... , uN at the grid nodes x 0 , x 1 ,... , xn respectively. At every interior node xj , j = 1,... , N − 1 we approximately replace the second derivative by the difference quotient
(uxx)|x=xj ≈
uj+1 − 2 uj + uj− 1 h^2
and arrive at the following finite-difference counterpart of the original problem (a central difference scheme):
uj+1 − 2 uj + uj− 1 h^2
− uj = fj , j = 1, 2 ,... , N − 1 u 0 = 0, uN = 0
where fj = f (xj ) is the discrete right-hand side assumed given, and uj is the unknown solution.
(a) Write down the previous scheme as a system of (N − 1) × (N − 1) linear algebraic equations in matrix form. (b) Show that the system is tri-diagonal and at least non-strictly diagonally dominant, so a tri-diagonal elimination without pivoting can be applied. (c) Implement the tri-diagonal elimination MATLAB. Solve the system for the right-hand side f (x) = (−π^2 sin (πx) + 2π cos (πx))ex, for which the ex- act solution u(x) = sin (πx)ex^ is known. For a sequence of grids with N = 32 , 64 , 128 , 256 and 512, compute relative error in maximum norm:
e(N ) =
max 1 ≤j≤N − 1 |u(xj ) − uj | max 1 ≤j≤N − 1 |u(xj )|
Plot log 2 (e(N )) vs. log 2 N and show that by reducing the grid size by a factor of 2 we decrease the error by a factor of 4 (second order convergence). Discuss accuracy and stability.
Problem 7. Extra credit. Let A be an n × n nonsingular matrix with QR decomposition A = QR. De- termine the conditions under which the ratio ||y|| 2 /||x|| 2 with x, y satisfying relationships RT^ x = d, Ry = x approximates ||A−^1 || 2. Hint: look at the SVD decomposition for A, i.e. A = U SV T^ , and expand vectors d, x and y on the basis spanned by suitable vectors ui or vi.