MA 625: Assignment 5

The assignment is due Thursday, April 16 in class. It is worth twice that of any individual assignment to date.

Please e-mail your Matlab script(s) to

before class. Please bring to class the pencil and paper part and the code part.

Part I

Let S=(0,1)2. Consider the Poisson equation uxx + uyy = 0 in S subject to the following boundary conditions:

Such a problem is said to have a rotational symmetry. With a uniform mesh xi=yi=i/(J+1), 0 < i < J+1, for this region, derive a system of linear equations approximating this boundary value problem of the form A is real, positive definite, symmetric, m by m (where m=J(J+1)+1), and each row has at most 5 nonzeroes (these properties should be obvious from your derivation of the discretization and not proven). Show also that not every point is connected to the four nearest neighbors.

Hint: Do this for a very small problem first, draw the grid with the Dirichlet points included, and number the points according to some logical method. This problem is a subset of problem 1 in Varga's book on page 192 (see the syllabus).

Part II

Consider the variable coefficient elliptic equation:

where a(x,y)=-yex and f is chosen to make the solution u(x,y)=x2sin(x*pi)sin(y*pi).

(1) Write down what the 5 point discretization is at an interior point of a uniform mesh. Any symbolic manipulation system is fair game to get this right, but simplify your answer to be easy to read and computationally efficient.

(2) Using the conjugate gradient solver in Matlab, solve the problem on a 50 by 50 grid covering S. Start with an initial guess of 0 and iterate until the residual norm has been reduced by a factor of 10-6.

(3) Turn in a graph of the computed solution.

(4) What did it all cost? The person with the smallest number of flops will get a bonus.

Cheers,
Craig C. Douglas