Numerical Partial Differential Equations 1
Homework 1 (Due: October 13, 2005)
Recall that the exact solution is y (t) = y0 e-µ t + t2.
Set µ = 520, T = 2 and y0 = 4.
The results about the regions of absolute stability (that were derived in the class and in Problem 2, above) should give you an indication what the needed step-size to achieve absolute stability is for each of the above methods. Use your MATLAB codes with various time steps (e.g., of the form 2-k ) to see whether the results of your numerical experiments correspond to the theory. Present your results in a graphical form. Plot the exact and the numerical solution in the same picture. Also plot the global error en or its absolute value. Discuss the results.
As part of this problem, run your methods for the same equation on the interval [a, b] = [1,2] with the exact initial condition y0 = y (1) = 4 e-520 + 1. You should see that even though on this interval [a, b] the solution is essentially t2, the forward Euler method still requires a small step-size to get reasonable results. What about the other methods?
(As an illustrative example, you may want to change your codes so that they solve the equation y' = 2t on the interval [1,2] with y0 = 1. Observe that in this case the numerical methods do not exhibit any of the instability features.)
For the trapezoidal rule, you should notice that in most of the interval [0,2] the global error is almost negligible. What is the order of the error? Can you explain why?