ekiim's blog
  1. modify the example in the text by changing from a11=2a_{11} = 2 to a11=1a_{11} =1, and find the LDULDU factorization of this new trdiagonal matrix.

  2. Write down the 3 by 3 finite difference matrix (h=14h=\frac{1}{4}) for d2udx2+u=x,u(0)=u(1)=0 \frac{d^{2} u}{d x^{2}}+u=x, \quad u(0)=u(1)=0

  3. Find the 5 by 5 matrix AA that approximates d2udx2=f(x),dudx(0)=dudx(1)=0 -\frac{d^{2} u}{d x^{2}}=f(x), \quad \frac{d u}{d x}(0)=\frac{d u}{d x}(1)=0 , replacing the boundary conditions by u0=u1u_0 = u_1 and u6=u5u_6 = u_5. Check that your matrix applied to the constant vector (1,1,1,1,1)(1, 1, 1, 1, 1), yields zero; A is singular. Analogously, show that if u(x)u(x) is a solution of the continuous problem, then so is u(x)+1u(x) + 1. The two boundary conditions do not remove the uncertainty in the term C+DxC+Dx, and the solution is not unique.

  4. With h=14h=\frac14 and f(x)=4π2sin2πxf(x) = 4\pi^2 \sin {2\pi x}, the difference equation (5) is [210121012][u1u2u3]=π24[101] \left[ \begin{array}{rrr}{2} & {-1} & {0} \\ {-1} & {2} & {-1} \\ {0} & {-1} & {2}\end{array}\right] \left[ \begin{array}{l}{u_{1}} \\ {u_{2}} \\ {u_{3}}\end{array}\right]=\frac{\pi^{2}}{4} \left[ \begin{array}{r}{1} \\ {0} \\ {-1}\end{array}\right] Solve for u1,u2,u3u_1, u_2, u_3 and find their error in comparison with the true solution u=sin2πxu = \sin {2\pi x} at x=14,x=12x = \frac14, x=\frac12 and x=34x=\frac34.

  5. What 5 by 5 system replaces (6) if the boundary conditions are changed to u(0)=1,u(1)=0u(0) = 1, u(1) = 0?

  6. (recommended) Compute the inverse of the 3 by 3 Hilbert matrix A=[11213121314131415] A=\left[ \begin{array}{lll}{1} & {\frac{1}{2}} & {\frac{1}{3}} \\ {\frac{1}{2}} & {\frac{1}{3}} & {\frac{1}{4}} \\ {\frac{1}{3}} & {\frac{1}{4}} & {\frac{1}{5}}\end{array}\right] in two ways using the ordinary Gauss-Jordan elimination sequence: (1) by exact computation and (ii) by rounding off each number to three figures. Note: this is a cas where pivoting doesn not help; AA is ill-donditioned and incurable.

  7. For the same matrix comapre the rightsides of Ax=BAx=B when the solutions are x=(1,1,1)x =(1, 1, 1) and x=(0,6,3.6)x =(0, 6, -3.6)

  8. Solve Ax=b=(1,0,,0)Ax=b=(1, 0, \dots, 0) for the 10 by 10 Hilbert matrix with aij=1/(i+j1)a_{ij} = 1/(i + j -1), using any computer code for linear equations. Then make a small change in all entry of AA or bb and compare the solutions.

  9. Compare the pivots in direct elimination to those with partial pivoting for A=[.001011000] A=\left[ \begin{array}{cc}{.001} & {0} \\ {1} & {1000}\end{array}\right], (This is actually an example that needs rescaling before elimination.)

  10. Exlain why partial pivoting all the multiplers IijI_{ij} in LL satify Iij1|I_{ij}|\leq 1. Deduce that if the original entries of AA satisfy aij1|a_{ij}\leq 1, then afte rproducing zeros in the first column all entries are bounded by 2; after kk stages they are bounded by 2k2^k. Can you contruct a 3 by 3 example with all aij1|a_{ij}|\leq 1 and Iij1|I_{ij}|\leq 1 whose last pivot is 4?