Numerical Methods Qualification Exam Problems and Solutions (University of Maryland)/Jan04 667

Solution 4a
From Taylor expansion of $$u(x+h) \!\,$$ and $$u(x-h) \!\,$$ around $$x \!\,$$, we have

$$ u(x) = \frac{u(x+h)-2u(x)+u(x-h)}{h^2} + \frac{u''(\xi)}{12}h^2 \!\,$$

Let $$P=\{x_i\}_{i=0}^{N+1} \!\,$$ be a uniform partition of $$[0,1] \!\,$$ with step size $$ h\!\,$$

Then for $$i=2,\ldots, N-1 \!\,$$ we have

$$ \begin{bmatrix} -\frac{1}{h^2} &&& \frac{2}{h^2} + b(x_i) &&& -\frac{1}{h^2} \end{bmatrix} \begin{bmatrix} u_{i-1} \\ u_i \\ u_{i+1} \end{bmatrix} = f(x_i) \!\,$$

For $$i=1: \!\,$$

$$ \begin{bmatrix} \frac{2}{h^2}+b(x_1) &&& -\frac{1}{h^2} \end{bmatrix} \begin{bmatrix} u_1 \\ u_2 \end{bmatrix} =f(x_1) + \frac{u_l}{h^2} \!\,$$

For $$i=N: \!\,$$

$$ \begin{bmatrix} -\frac{1}{h^2} &&& \frac{2}{h^2}+b(x_N) \end{bmatrix} \begin{bmatrix} u_{N-1} \\ u_N \end{bmatrix} =f(x_N)+ \frac{u_r}{h^2} \!\,$$

Solution 4b
$$ \begin{bmatrix} \frac{2}{h} & -\frac{1}{h} &             &             &  \\ -\frac{1}{h} & \frac{2}{h} &-\frac{1}{h} &             &  \\ & \ddots      & \ddots      & \ddots      &  \\ &             &             & -\frac{1}{h}& \frac{2}{h} \end{bmatrix} \begin{bmatrix} u_1 \\ \vdots\\ \vdots\\ u_N \end{bmatrix} = \begin{bmatrix} \int_0^1 f \phi_i \\ \vdots \\ \\ \int_0^1 f \phi_N \end{bmatrix} \!\,$$

Since we are integrating hat functions on the right hand side, an appropriate quadrature formula would be to take half of the midpoint rule. The regular midpoint rule would give double the actual integral value of a hat function.

Therefore $$\int_0^1 f(x) \phi_i(x) \approx h f(x_i) \!\,$$

Then the finite difference method and the finite element method yield the same matrix.

Solution 4c
Since the matrix is diagonally dominant, it is non-singular.

To show that the matrix has a non-zero determinant, 2n elementary row operation can be used to show that

$$

\begin{bmatrix} \frac{2}{h} & -\frac{1}{h} &             &               \\ -\frac{1}{h} & \frac{2}{h} &-\frac{1}{h} &               \\ & \ddots      & \ddots      &         \\ &             &             -\frac{1}{h}& \frac{2}{h} \end{bmatrix} $$

has the same determinant as

$$

\begin{bmatrix} -\frac{1}{h} & \frac{2}{h} &-\frac{1}{h} &              \\ & \ddots      & \ddots      & \ddots      &  \\ &            & -\frac{1}{h}& \frac{2}{h}\\ &            &             & \frac{n+1}{h} \\ \end{bmatrix}

$$

which is $$\frac{n+1}{h^n}\neq 0$$.

Solution 5a
Using Taylor Expansion we have

$$ \begin{align} y(x-h) &= y(x)-y'(x)h +\frac{y''(\xi)}{2} h^2 \\ y(x) &= y(x-h)+y'(x)h - \frac{y''(\xi)}{2}h^2 \\ y(x_n) &= y(x_{n-1})+\underbrace{y'(x_n)}_{-f(y(x_n))}h - \underbrace{\frac{y''(\xi)}{2}h^2}_{O(h^2)}  \qquad (*) \\ \end{align} $$

Thus we have Backwards Euler Method:

$$ y_n = y_{n-1} - h f(y_n)\qquad (**)\!\,$$

Let $$e_n \equiv y(x_{n-1})-y_n \!\,$$

Solution 5b
Subtracting $$(*) \!\,$$ and $$(**) \!\,$$, we have

$$ \begin{align} e_n &= e_{n-1}-h [ f(y(x_n))-f(y_n)] - \frac{y''(\xi)}{2}h^2 \\ &= e_{n-1}-h f'(y(\alpha)) e_n - \frac{y''(\xi)}{2} h^2 \quad \mbox{ (by MVT) } \\ e_n^2 &= e_{n-1}e_n - h \underbrace{f'(y \alpha)}_{< 0} e_n^2 - \frac{y''(\xi)}{2} h^2 e_n \\ &\leq e_{n-1}e_n - \frac{y''(\xi)}{2}h^2 e_n \\ e_n &\leq e_{n-1} - \frac{y''(\xi)}{2}h^2 \\ \| e_n \| &\leq \|e_{n-1}\|+ \frac{\|y''\|_\infty}{2}h^2 \\ \| e_n \| &\leq n \frac{\|y''\|_\infty}{2}h^2 \\ &\leq \frac{M}{2} h \end{align} \!\,$$