Starting from:

$30

MATH232-Homework 2 Green’s Function and Inverse of Matrix A Solved

1.   This problem allows you to see the explicit relationship between Green’s function and the inverse of the matrix A in the finite difference method.

(a)    Write out the 5 × 5 matrix A from (2.43) for the boundary value problem u00(x) = f(x) with u(0) = u(1) = 0 for h = 0.25.

(b)   Analytically find the inverse matrix A−1 explicitly for this problem.

(c)    Use your result from (b) to determine the discrete approximation to the solution of theboundary value problem with f(x) = x on this grid. Plot this solution and the five Green’s functions whose sum gives this solution.

2.   This problem makes use of the bvp 2.m code to study an ill-posed boundary value problem.

Consider the following linear boundary value problem with Dirichlet boundary conditions:

u00(x) + u(x) = 0   for a < x < b u(a) = α,           u(b) = β.

Note that this equation arises from a linearized pendulum, for example.

(a)    Modify the m-file bvp 2.m to solve this problem. Test your modified routine on the problem with

a  = 0,             b = 1,     α = 2,     β = 3.

Determine the exact solution for comparison.

(b)   Let a = 0 and b = π. For what values of α and β does this boundary value problem have solutions? Sketch a family of solutions in a case where there are infinitely many solutions.

1




(c)    Solve the problem with

a  = 0,             b = π,    α = 1,     β = −1.

using your modified bvp 2.m. Which solution to the boundary value problem does this appear to converge to as h → 0? Change the boundary value at b = π to β = 1. Now how does the numerical solution behave as h → 0?

(d)   You might expect the linear system in part (c) to be singular since the boundary valueproblem is not well posed. It is not because of discretization error. Compute the eigenvalues of the matrix A for this problem and show that an eigenvalue approaches 0 as h → 0. Also show that kA−1k2 blows up as h → 0 so that the discretization is unstable.

More products