next up previous
Next: About this document ...

Math428: Problem Set #3 Solution Guide

1.
Use the Taylor series method to solve

\begin{displaymath}y' = e^{-t} y + \cos(t), \ \ \ \ y(0) = 1, \ \ \ \ 0 \leq t \leq 4\pi
\end{displaymath}

with $h=\frac{\pi}{2^4}$, $\frac{\pi}{2^5}$ and $\frac{\pi}{2^6}$. Use 1, 2 and 3 terms in the Taylor series. For each Taylor series method, make a plot showing how the error decreases as h decreases. For each Taylor series method, estimate the number of accurate digits in $f(4\pi)$when $h=\frac{\pi}{2^6}$.


No problem. Here are graphs. I will post the maple functions and a diary of the commands that generated them.

\resizebox{2in}{!}{\includegraphics{prob1a.eps}} \resizebox{2in}{!}{\includegraphics{prob1b.eps}} \resizebox{2in}{!}{\includegraphics{prob1c.eps}}
To determine which digits are credible, one need only examine the errors. For the first order method, the error in the most refined run is about 0.037... so we would only believe the first two digits of the solution, maybe. In the second order method, the performance is better and we would believe the first three digits. For the third order method, it would appear that the first five digits are correct.


2.
Use Richardson extrapolation on the forward Euler method for the differential equation in problem 1 using the same values of hto find $f(4\pi)$ more accurately. Compare your values for $f(4\pi)$ with the higher order Taylor series methods in problem 1.


For the first order method, we would apply

\begin{displaymath}\tilde{u}^h_N = 2 u_{2N}^{h/2} - u_{N}^{h}
\end{displaymath}

where $\tilde{u}$ is the solution that has been improved via Richardson extrapolation. The improved solutions come out to be 3.4844... and 3.4811... which attains about 3 digits of accuracy. (If you compute a reference solution to a high precision, you will find that 3.48... is the first three correct digits.)

Though it is not required, it is worth writing about Richardson extrapolation for the other Taylor methods. For the second order method, the asymptotic error would be E(T) h2 + O(h3). Thus, to cancel the errors with two consecutive runs, we would apply

\begin{displaymath}\tilde{u}^h_N = \frac{1}{3}\left(4 u_{2N}^{h/2} - u_{N}^{h}\right).
\end{displaymath}

The improved solutions come out to be 3.48007... and 3.47995....

For the third order method, we would apply

\begin{displaymath}\tilde{u}^h_N = \frac{1}{7}\left(8 u_{2N}^{h/2} - u_{N}^{h}\right)
\end{displaymath}

because the errors occur at O(h3). The improved solutions come out to be 3.47992... and 3.47993....

In general, for a $p^{\rm th}$ order method, the correct way to cancel the leading order error terms is

\begin{displaymath}\tilde{u}^h_N = \frac{1}{2^p-1}\left(2^p u_{2N}^{h/2} - u_{N}^{h}\right)
\end{displaymath}


3.
Use the centered difference method with a forward Euler startup procedure to solve the differential equation in problem 1 with $h=\frac{\pi}{2^4}$, $\frac{\pi}{2^5}$ and $\frac{\pi}{2^6}$. Compare your results with the Taylor series method.


\resizebox{2in}{!}{\includegraphics{prob3.eps}}
Here, we see that this method has the same secord order performance as the second order Taylor method, but it is twice as accurate. Also, we can see oscillations. Remember, that parasitic root appears at -1 when $h\lambda$ is close to zero.


4.
Use Richardson extrapolation on the results in problem 3 to determine a more accurate value of $f(4\pi)$, and compare your results with problems 2 and 1.


Here, we are using a second order method, and the improved results are 3.47984... and 3.47993.... Because the method is better than the second order Taylor method, the Richardson extrapolation performs better.



 
next up previous
Next: About this document ...
Louis F Rossi
2002-03-19