modify the example in the text by changing from $a_{11} = 2$ to $a_{11} =1$, and find the $LDU$ factorization of this new trdiagonal matrix.

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

Find the 5 by 5 matrix $A$ that approximates $-\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 $u_0 = u_1$ and $u_6 = u_5$. Check that your matrix applied to the constant vector $(1, 1, 1, 1, 1)$, yields zero; A is singular. Analogously, show that if $u(x)$ is a solution of the continuous problem, then so is $u(x) + 1$. The two boundary conditions do not remove the uncertainty in the term $C+Dx$, and the solution is not unique.

With $h=\frac14$ and $f(x) = 4\pi^2 \sin {2\pi x}$, the difference equation (5) is $\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 $u_1, u_2, u_3$ and find their error in comparison with the true solution $u = \sin {2\pi x}$ at $x = \frac14, x=\frac12$ and $x=\frac34$.

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

(

*recommended*) Compute the inverse of the 3 by 3 Hilbert matrix $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; $A$ is ill-donditioned and incurable.For the same matrix comapre the rightsides of $Ax=B$ when the solutions are $x =(1, 1, 1)$ and $x =(0, 6, -3.6)$

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

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

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