Numerical Analysis I, Fall 2017 (http://www.math.nthu.edu.tw/˜ wangwc/)

Homework Assignment for Week 15

1. Section 6.6: Problems 3(a,c), 5(a,c), 14(a,b), 17, 24, 25, 32.

2. Derive a system of equation corresponding to the following boundary value problem

\begin{matrix}u′′(x) − u(x) = f(x), x ∈ (0, 1) \\ u(0) = α, u(1) = β \end{matrix}

with uniformly spaced grids 0 = x_{0} < x_{1} < ⋯ < x_{N} = 1, x_{i} − x_{i−1} = h = 1/N, using second order finite difference method. That is, given α, β, and f_{i}, i = 1, 2, ⋯, N − 1, try to derive a linear system of equations to solve for u_{i}, i = 1, 2, ⋯, N − 1.

3. Implement your own tridiagonal solver for previous problem using indexing of the entries as in Section 6.6, Problem 29 (i.e. only store a_{i}, b_{i} and c_{i}, not the whole matrix with a lot of zero entries). For this problem, pivoting is not needed. Take α = 1, β = e and f(x) = 0. The exact solution is u^{e}(x) = e^{x}. Check numerically that indeed max_{i} |u^{e}(x_{i}) − u_{i}^{h}| = O(h^{2}) by taking N = 100 and N = 200.

4. Let A be the matrix resulted from discretizing the Poisson equation in a 2D cell,

(∂_{x}^{2} + ∂_{y}^{2})u(x, y) = f(x, y), (x, y) ∈ (0, 1)^{2} u = 0, on the boundary of (0, 1)^{2}

(1)

with uniformly spaced grids 0 = x_{0} < x_{1} < ⋯ < x_{N} = 1, 0 = y_{0} < y_{1} < ⋯ < y_{N} = 1, x_{i} − x_{i−1} = y_{j} − y_{j−1} = h = 1/N, using second order centered finite difference method. The unknowns are u_{ij} with with 1 ≤ i, j ≤ N − 1. Give the leading order operation KN^{p} for for LU decomposition and forward, backward substitution.

Repeat the procedure for the 3D case.

5. Section 7.3: Problems 7(a), 8(a), 9(a,c), 10(a,c), 17.