MA 625: Assignment 2

This assignment is due Thursday, February 11 in class. Please e-mail your Matlab script(s) to

before class. Please use the Subject part of your e-mail message(s) to identify what you are sending. Please bring to class the pencil and paper part and the code part.

Part I

Do problem 2.3 in the text.

Part II

Consider the heat equation:

The solution is smooth at the corners, hence the convergence analysis in the lectures and the text applies to this problem.

Code the Forward Euler scheme in Matlab. Let the number of points in the x direction equal 33 and 513 (thus mesh spacings in x of 1/32 and 1/512). Choose a ratio of the spacing in t to the square of the spacing in x to be .25, .5, and 1.0 Run the procedure for 50 time steps. Report the error, the operation count (Matlab's flop variable will do), and draw some concrete conclusions.

Part III

Using Matlab again, write an implicit theta solver for 0<theta<1 for the heat equation in Part II. Make certain that you use a tridiagonal solver that is efficient. Choose the same delta t's as in Part II. Roughly, how many points in the x direction does it take to match the error at the end of 50 time steps when

What about operation counts? Once again, draw some concrete conclusions.

Cheers,
Craig C. Douglas