Math 128A - Spring 2002 - Demmel - Final

Math 128A - Spring 2002 - Demmel - Final - 05/09/2003 FRI...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
1
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
2
Background image of page 2
3
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
4
Background image of page 4
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 05/09/2003 FRI 16:31 FAX 6434330 MOFFITT LIBRARY 001 Math 128a — Final — Spring 2002 _J. Demmal This exam is open book, open notes1 open calculator (you shouldn’t need one). The total score is 130 points. The number of points approximately indicates the number of minutes you should spend on the problem. 1) (35 points) In this problem we explore how ODE solvers are designed. Part A. (15 points) Use the method of undetermined coefficients to derive an Adams—Moultou method of the form In+1:xn+h*[A'frr+l+B'fn+len—l] Here the notation is that tn 2: at $111,113.”, = 330:”) and f7L 2 fit“, 3:”). Compute the values of A, B and 0; show your work. What is the value of k such that the LTE = 001’“)? Part B. (10 points) Use the method of undetermined coefficients to derive an Adams—Bashforth method of the form xn+12xn+h*[D-fn+E»fnh1] Compute the values of D and E; show your work. What is the value of k such that the LTE r 0(hk)? Part C. (10 points) Describe an algorithm (with pseudocode) that uses the methods in Part A and B with fixed step size it to solve the ODE :r’(t) = f(t,m(t)), starting at 33(0) = 330 up to time tfjnal. You may assume that tfmai is an integer multiple of h. Make sure to describe how to monitor the LTE (but not to change h). 05/09/2003 FRI 16:31 FAX 6434330 MOFFITT LIBRARY 002 2) (35 points) In this problem we explore how to efficiently solve linear systems of equations A3: 2 b, when A is banded, i.c._ only has nonzero entries near the diagonal. We say that A has lower bandwidth lbw if (1,5 = 0 whenever i. > 3" + lbw, and that A has upper bandwidth ubw if m]- : 0 whenever j > t+ ubw. For example, the 8—byw8 matrix below has lbw : 2 and ubw : 3. 0:11 (112 (L1 3 a] 4 0 U 0 0:21 G22 G23 CL24 CE25 0 0 (131 G32 Gas (134 £135 0'36 0 A f 0 (142 G43 G44 045 Gas G47 0 0 O 0 0 0 0 G75 G76 arr 1178 O 0 0 0 0 0,85 0.37 (1.88 We call the part of the A that may be nonzero the band of A. Part A. (10 points) Assume the fishy-n matrix band matrix A with lower bandwidth lbw and upper bandwidth ubw is stored in memory exactly as shown above. Give pseudocode for Gaussian elimination with no pivoting (GENP) that performs no arithmetic on the zero entries outside the band. (Your code should just compute the entries of L and U so that A:L*U). Part B. (5 points) Considering L from Part A as a band matrix, what are its lower and upper bandwidths? Considering U from Part A as a band matrix, what are its lower and upper bandwidths? Part C. (10 points) Band matrices are used when lbw and aim are both much smaller than it, because the algorithm in Part A does much less work than plain Gaussian elimination. How many arithmetic operations does your algorithm from Part A do? Count additions, subtractions, multiplications and divisions each as 1 operation. Give your answer in the form c1 - lbw - ubw - n + C2 - lbw - n + cs -ubw - n + 0(1), where you supply the constants c1, Cg and C3. The 0(1) term is independent of n, but can depend on lbw and ubw, which we are assuming are small. Show how you determined these constants. Part D. (5 points) Give pseudocode for solving Ax : b using the L and U factors computed from Part A, doing no arithmetic on the zero entries of L and U. Part E. (5 points) How many arithmetic operations does your algorithm from Part D do? Fol— low the same advice as for part C. Give your answer in the form Cl - lbw - n + e - ubw - n + f - n + 0(1), where you supply the constants Cl, C and f. Show how you determined these constants. 05/09/2003 FRI 16:32 FAX 6434330 MOFFITT LIBRARY 003 3) (35 points) In this problem we investigate the accuracy of ODE solvers. Consider the implicit second order integration formula for as’(t) : f 12:71.“ = (Cu + h f (11:71“), h > 0, where In is the approximate solution of the ODE at t = h - n. Consider applying this formula to the differential equation w’(t) :2 ,umlt), where ,u is a constant and x(0) gé O is given. a may be any complex number n = or +72 - ,ui, where 2' = and in. and h:- are real. Part A. (5 points.) Write down an explicit expression [or :0” (the numerical solution from the formula) in terms of .130 : 55(0), n, h and ,u. Part B. (5 points.) Write down an explicit expression for $(t) (the true solution) in terms of 53(0), a and 15. Part C. (5 points.) Under what conditions on it does limp“, 2 0 for any at(0) % 0? Part D. (5 points.) Under what conditions on a does liming, : Co for any $(U) as 0? Part E. (5 points.) Under what conditions on ,u and it does lininnoo s O for any 310 75 0? Give your answer in the form “The limit is 0 if and only if the complex number a - It lies in region C of the complex plane where C is precisely described as follows ...” Part F. (5 points.) Under what conditions on y, and it does limnnoo |:rn| 2 00 for any 330 75 0? Give your answer in the form “The limit is infinite if and only if the complex number a - it lies in region D of the complex plane, Where D is precisely described as follows ...” Part G. (5 points.) Assume 55(0) = LEO % 0. Complete the following sentence and explain why it is true: “liming, : limflaw Ixnl if and only if the complex number n - It lies in region E of the complex plane, where E is precissly described as follows...” 05/09/2003 FRI 16:32 FAX 6434330 MOFFITT LIBRARY 004 4) (25 points) In class we talked about Least Squares Problems: Let Hrllg = #2:} r} be the length of the vector r. Then if A is an m—by—n matrix with m > n, b is an mrrbyel vector, the vector 5 that minimizes HA - s a bllg is given by s = (ATA)‘1ATb. We will use this fact to solve the following approximation problem: Suppose we are given m points in R3: (1C1,'y1,21), , (amym, zm). Using this data, we want to find a simple function f(-, of two variables Such that zi x flan-mi), i.e. f(x,y) is a good approximation of z in the sense that ET” (f yr) — 2i)2 is minimized. 1:] Part A. (10 points) Suppose we want f to be a linear function: f(x, y) t 51 - 3; + 52 - y + 53. For What matrix A and vector 1) is the solution given by 51 s: 32_ :(ATA)‘1ATb 33 Part B. (10 points) Suppose we want f to be a quadratic function: f($,y)=81-m2+32-m-y+83-y2+S4-I+ss-y+se For what matrix A and vector b is the solution given by 31 s z 5 = (Arm-114% 56 Part C. (5 points) Suppose that you compute zi with the program for i z 1 to m 3'6 = 37351-2 _ 223%91' + 18%- +10 4— n- end where n is a random number in the range [#1, 1]. Suppose you then compute A1 6 and s as described in Part B. Give a guaranteed upper bound on the error “As — bllg. ...
View Full Document

This note was uploaded on 05/17/2009 for the course MATH 128A taught by Professor Rieffel during the Spring '08 term at University of California, Berkeley.

Page1 / 4

Math 128A - Spring 2002 - Demmel - Final - 05/09/2003 FRI...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online