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

Problem 4

 Suppose that $f: R \rightarrow R \!\,$ is smooth and that the boundary value problem $u''=f(u) \mbox{ on } (0,1), \quad u(0)=(1)=0 \!\,$ has unique solution.

Problem 4a

 For $N \in \mathbb{N} \!\,$, let $x_i=\frac{1}{N},i=0,\ldots,N \!\,$. Write down a system of $N+1 \!\,$ equations to obtain an approximation $u_i \!\,$ for the solution $u \!\,$ at $x_i \!\,$ by replacing the second derivatives by a symmetric difference quotient.

Solution 4a

The symmetric difference quotient is given by

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

Hence we have the following system equations that incorporates the initial conditions $u(0)=u(1)=0 \!\,$.

$\underbrace{ \frac{1}{h^2} \begin{bmatrix} 1 & & & & & & \\ 1 & -2 & 1 & & & & \\ & 1 & -2 & 1 & & & \\ & & \ddots & \ddots & \ddots & & \\ & & & & 1 & -2 & 1 \\ & & & & & & 1 \end{bmatrix} }_{A} \underbrace{ \begin{bmatrix} u_0 \\ u_1 \\ u_2 \\ \vdots \\ \vdots \\ u_n \end{bmatrix} }_{U} = \underbrace{ \begin{bmatrix} 0 \\ f(u_1) \\ f(u_2) \\ \vdots\\ f(u_{n-1})\\ 0 \end{bmatrix} }_{f} \!\,$

Problem 4b

 Write the system of equations in the form $F(U)=0 \!\,$. Define domain and range of $F \!\,$ and explain the meaning of the variable $U \!\,$.

Solution 4b

$\underbrace{AU-f}_{F(U)}=0\!\,$

Domain: $R^{N+1} \!\,$

Range: $R^{N+1} \!\,$

$U \!\,$ is a vector containing $N+1 \!\,$ approximations $u_i \!\,$ for the solution $u \!\,$ at $x_i \!\,$

Problem 4c

 Formulate Newton's method for the solution of the system in (b) with $U^{(0)}=0 \!\,$. Give explicit expressions for all objects involved (as far as this is reasonable). Determine a sufficient condition that ensures that the iterates $U^{(k)} \!\,$ in the Newton scheme are defined. Without doing any further calculations, can you decide whether the sequence $U^{(k)} \!\,$ converges. Why or why not?

Solution 4c

Newton's Method

$U^{k+1}=U^{k}-J(F(U^{(k)})^{-1}F(U^{(k)}) \!\,$

where $J(A) \!\,$ denotes the Jacobian of a matrix $A\!\,$.

Specifically,

$J(F(U^{(k)})=J(AU-F)=A-J(F) \!\,$

Sufficient Condition

If $J(F(U^{(k)})^{-1} \!\,$ exists, then $U^{(k)} \!\,$ iterates are defined.

Convergence of sequnce

We cannot decide if the sequence converges since Newton's method only guarantees local convergence.

In general, for local convergence of Newton's method we need:

• $F \!\,$ differentriable

• $D(F(U^*)) \!\,$ invertible

• $D(F) \!\,$ Lipschitz

• $U^{(0)} \!\,$ close to solution $U^* \!\,$

Problem 5

 Consider the boundary value problem $-u''=f, \quad 0 with boundary conditions $u(0)=0 \!\,$ and $u'(1)+\alpha u(1)=0 \!\,$. Here $\alpha \!\,$ is a given positive number.

Problem 5a

 Describe a Galerkin method to solve this problem using piecewise linear functions with respect to a uniform mesh.

Weak Formulation

Find $u \in U=\{u \in H^1 : u(0)=0 \} \!\,$ such that for all $v \in U\!\,$

$\int_0^1 -u''v=\int_0^1 fv \!\,$

which after integrating by parts and plugging in initial conditions we have

$\int_0^1 u'v'= \int_0^1 fv - \alpha u(1)v(1) \!\,$

Let $\{x_i\}_{i=0}^{N+1} \!\,$ be the nodes of a uniform partition of $[0,1]\!\,$ where $x_0=0 \!\,$ and $x_i=ih \!\,$.

Let $\{\phi_i \}_{i=0}^{N+1} \!\,$ be the standard "hat" functions defined as follows:

For $i=1,2\ldots,N \!\,$

$\phi_i = \begin{cases} \frac{x-x_{i-1}}{h} & \mbox{ for } x \in [x_{i-1}, x_i] \\ \frac{x_{i+1}-x}{h} & \mbox{ for } x \in [x_i, x_{i+1}] \\ 0 & \mbox{ otherwise } \end{cases} \!\,$

$\phi_{N+1}= \begin{cases} \frac{x-x_N}{h} & \mbox{ for } x \in [x_N, x_{N+1}] \\ 0 & \mbox{ otherwise } \end{cases}$

Also $\phi_0=0 \!\,$ since $u(0)=0 \!\,$

Then $\{ \phi_i \}_{i=0}^{N+1} \!\,$ forms a basis for the discrete space $U_h=\{ u \in H^1[0,1] : u(0)=0, u \mbox{ piecewise linear } \} \!\,$

Problem 5b

 Derive the matrix equations for this Galerkin method. Write out explicitly that equation of the linear system which involves $\alpha \!\,$

Discrete Weak Formulation

Find $u_h \in U_h \!\,$ such that for all $v \in U_h \!\,$

$\int_0^1 u_h' v_h' = \int_0^1 f v_h - \alpha u(1) v(1) \!\,$

Since $\{ \phi_i \}_{i=0}^{N+1} \!\,$ forms a basis, we have

$u_h = \sum_{i=0}^{N+1}u_{hi}\phi_i \!\,$

Also for $j=1,\ldots,N+1 \!\,$

$\sum_{i=0}^{N+1}u_{hi} \int_0^1 \phi_i' \phi_j' = \int_0^1 f \phi_j + \alpha \sum_{i=0}^{N+1} u_{hi} \phi_i(1) \phi_j (1) \!\,$

In matrix form

$\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}+\alpha \end{bmatrix} \begin{bmatrix} u_{h_1}\\ u_{h_2}\\ \vdots\\ u_{h_{N+1}} \end{bmatrix} = \begin{bmatrix} \int_0^1 f \phi_1 \\ \int_0^1 f \phi_2 \\ \vdots \\ \int_0^1 f\phi_{N+1} \end{bmatrix} \!\,$

Problem 6

 Consider the linear multistep method $y_{n+1}=\frac43 y_n - \frac13 y_{n-1}+\frac23 h f(x_{n+1},y_{n+1})\!\,$ for the solution of the initial value problem $y'(x)=f(x,y(x)),y(0)=y_0 \!\,$

Problem 6a

 Show that the truncation error is of order 2.

Problem 6b

 State the condition for consistency of a linear multistep method and verify it for the scheme in this problem.

Solution 6b

\begin{align} y_{n+1} &=\sum_{j=0}^p a_j y_{n-j}+h\sum_{j=-1}^p b_j f(t_{n-j},y_{n-j}) \\ &=a_0y_n +a_1 y_{n-1}+\ldots+a_py_{n-p}+h [b_{-1}f(t_{n+1},y_{n+1})+b_0f(t_{n},y_n)+b_1f(t_{n-1},y_{n-1})+\ldots+b_pf(t_{n-p},y_{n-p})] \end{align} \!\,

Conditions:

(i) $\sum_{j=0}^p a_j=1 \!\,$

$\frac43 + -\frac{1}{3}=1 \!\,$

(ii)$\sum_{j=-1}^p b_j- \sum_{j=0}^p j a_j = 1\!\,$

$\frac23 - (0 \cdot \frac 43 + 1 \cdot -\frac13) = 1 \!\,$

Problem 6c

 Does the scheme satisfy the root condition and or the strong root condition?

The scheme satisfies the root condition but not the strong root condition since the roots are given by

$\lambda=\frac{\frac43 \pm \sqrt{\frac{16}{9}-\frac43} }{2} \!\,$

which implies $\lambda_1 =1 \!\,$ and $\lambda_2=\frac13 \!\,$