Homework #2, due Feb. 19, 2009. You must show ALL steps to get credits. 1: Solve the following linear system and compare your solution with the actual solution. 0.03x1 + 58.9x2 = 59.2 5.31x1 ! 6.10x2 = 47.0 (a) (b) (c) (d) the actual solution (10,1). Use Gaussian elimination and three-digit chopping arithmetic. Use Gaussian elimination and three-digit rounding arithmetic. Use Gaussian elimination with partial pivoting and three-digit chopping. Use Gaussian elimination with scaled partial pivoting and three-digit chopping. The key idea to solve this problem is (1) understand 3-digit chopping/rounding. (2) why you need to do pivoting. You need to work exactly like a computer with 3-digit limited memory. For example, in part a, you first compute the Gaussian multiplier, m=5.31/0.03=177 (3-digit only, not 177.0). For us, operation (E2-m*E1) becomes !10431.4x2 = !10431.4, and give us x2 = 1 , back-substitution yields, x1 = 10 . However, for a computer, operation (E2-m*E1) means to compute (m*E1) first. This yields 5.31x1 + 1.04e4 x2 = 1.04e4 with 3-digit chopping. Then operation (E2-m*E1) gives (!1.04e4 ! 6.1) x2 = (!1.04e4 + 47.0) . With 3-digit chopping, the equation is equivalent to !1.04e4 x2 = !1.03e4 , this gives you x2 = 0.990 , back substitution using E1 yields 0.03x1 + 58.9 ! 0.990 = 59.2 , which is equivalent to 0.03x1 + 58.3 = 59.2 with 3-digit chopping, solve for x1 = 30.0 . This problem is a nice example demonstrating how a BIG number eats small ones. 2: Consider the linear system 3x1 + 4x2 + 3x3 = 16 x1 + 5x2 ! x3 = !12 6x1 + 3x2 + 7x3 = 102 (a) Find matrix L and U using four significant digits. (b) Solve the linear system using L and U found in part a. If you review the lecture notes and understand the meaning of 4 significant digits, it is straightforward to form matrix L using Gaussian multiplier and compute matrix U using the algorithm discussed in class. Note that if you use Matlab to solve this problem, it will give you a permutation matrix P. Once you have L and U ready, then Ax = b is equivalent to LUx = b . Let Ux = y , you have Ly = b and you can solve for y using forward substitution. Once have y ready you can solve triangular system Ux = y for x using back substitution. " 2 ! -1% 3: Consider matrix A = $ ! 2 1' $ ' # -1 1 4 & (a) Find ! so that matrix is positive definite. (b) The matrix A is symmetric. It is known that A can be factored as A = LDLT , where L is the lower triangular matrix with 1’s on its diagonal and D is the diagonal matrix with find L and D. (2) (n) on its diagonal. For the case with ! = 1 , a11(1) , a22 ,..., ann For part a, you have to make sure, det(A1)>0, det(A2)>0 and det(A)>0, where A1=(2), " 2 !% , to solve for ! yields !2 < " < 1.5 . For part b, you need to form diagonal A2 = $ # ! 2 '& (2) (3) matrix D using a11(1) , a22 from usual Gaussian elimination process. Then form L , a33 using Gaussian multipliers. 4: Compute the maximum-norm condition number !" of the 3 ! 3 Hilbert matrix. You need to compute the infinity norm for the Hilbert matrix we discussed in class. ! " =748. ! 1 1 0$ 5: Compute the spectral radius, ! (A) of matrix A = # 1 2 1 & and its L2 norm, i.e. # & " -1 1 2 % || A ||2 = !(AT A) Review the lecture notes for the definition of spectral radius, !(A) = max{| "1 |, | "2 |, | "3 |} , that is you need to solve eigenvalues of matrix A, !1 = 2, !2 = 0, !3 = 3 . So, the answer !(A) =3. Similarly the spectral radius !(AT A) =9.6458, which yields the L2 norm || A ||2 = 3.1058