# Thread: Special Matrices and Applications

1. ## Special Matrices and Applications

Find the 5 by 5 matrix $\displaystyle A_{0}(h = \frac{1}{6})$ that approximates
$\displaystyle \frac{-d^2u}{ dx^2} = f(x), \frac{du}{dx}(0) = \frac{du}{dx}(1) = 0$

replacing these boundary conditions by $\displaystyle u_{0} = u_{1}$ and $\displaystyle u_{6}=u_{5}$. Check that your $\displaystyle A_{0}$ times the constant vector $\displaystyle (C, C, C, C, C)$, yields zero; $\displaystyle A_{0}$ is singular. Analogously, if $\displaystyle u(x)$ is a solution of the continuous problem, then so is $\displaystyle u(x)+c$.

Here's my work:
$\displaystyle \left[\begin{array}{ccccc}\frac{\Delta U}{\Delta x} | x_{1}\\\\\frac{\Delta U}{\Delta x} | x_{2}\\\\\frac{\Delta U}{\Delta x} | x_{3}\\\\.\\\\.\\\\\frac{\Delta U}{\Delta x} | x_{n}\end{array}\right] = \frac{U_{i+1} - U_{i}}{x_{i+1}-x_{i}}= \frac{U_{i+1}-U_{i}}{h} where \ h = \frac{1}{n+1}$
$\displaystyle f_{1} = f(x_{1})$
$\displaystyle f_{2}=f(x_{2})$
$\displaystyle u_{1} = u(x_{1})$
$\displaystyle u_{2}=u(x_{2})$

$\displaystyle \frac{\Delta U}{\Delta x} = \frac{U_{1+1}-U_{1}}{h}=\frac{U_{2}-U_{1}}{h}$

Follow the pattern until you get to $\displaystyle \frac{U_{6}-U_{5}}{h}$ because $\displaystyle U_{6} = U_{5}; \frac{U_{6}-U_{5}}{h} = 0$

Therefore let Forward U be labeled F, the matrix is:
$\displaystyle F_{u}=\frac{1}{h}\left[\begin{array}{ccccc}-1&1&0&0&0\\0&-1&1&0&0\\0&0&-1&1&0\\0&0&0&-1&1\\0&0&0&0&0\end{array}\right]\left[\begin{array}{c}u_{1}\\u_{2}\\u_{3}\\u_{4}\\u_{5}\ end{array}\right]$

$\displaystyle \frac{\Delta U}{\Delta x} = \frac{U_{i}-U_{i-1}}{h}$

Follow the pattern as before, but going backwards, and since [tex] U_{1}=U_{0}=0, you get to $\displaystyle \frac{U_{6}-U_{5}}{h}$ because $\displaystyle U_{6} = U_{5}; \frac{U_{6}-U_{5}}{h} = 0; the \ resulting \frac{\Delta U}{\Delta x} = \frac{U_{1}-U_{1-1}}{h}=0$
Let B= Backwards of U
$\displaystyle \left[\begin{array}{ccccc}\frac{\Delta U}{\Delta x} | x_{1}\\\\\frac{\Delta U}{\Delta x} | x_{2}\\\\\frac{\Delta U}{\Delta x} | x_{3}\\\\.\\\\.\\\\\frac{\Delta U}{\Delta x} | x_{n}\end{array}\right] = B_{u} = \frac{1}{h}\left[\begin{array}{ccccc}0&0&0&0&0\\-1&1&0&0&0\\0&-1&1&0&0\\0&0&-1&1&0\\0&0&0&-1&1\end{array}\right]\left[\begin{array}{c}u_{1}\\u_{2}\\u_{3}\\u_{4}\\u_{5}\ end{array}\right]$

$\displaystyle \frac{-d^2u}{ dx^2} = \frac{(\frac{\Delta U}{\Delta x})_{F} - (\frac{\Delta U}{\Delta x})_B}{h^2}$
Factor out U to get
$\displaystyle \frac{F_{u} - B_{u}}{h^2}$
Now because that one was for $\displaystyle \frac{d^2u}{ dx^2}$, do I have to do the exact opposite?
$\displaystyle \frac{B_{u} - F_{u}}{h^2}$? For the first element, I keep getting -1 - 0 for the 1st element in the 5 by 5 matrix, yet the book gets 1, and I have no idea why...

*I worked on this problem from 3 in the afternoon, til 7 at night, and I still don't have a clue how the author got the answer out of the book. The way my professor showed the class how to solve a similar problem is different from what the book did, and that's the examples I'll use to show what I've done so far. I had 3 professors help me, and they were also confused, which means they were unable to answer the question.