% % Latex file for Problem 6.6 in Atkinson's Numerical Analysis book. % \documentstyle{article} \begin{document} \begin{center} {\bf ``Analysis'' portion of Atkinson's Problem 6.6 \\ Gordon Wade. } \end{center} The problem given in the book says to implement the Euler method for solving the initial value problem \begin{eqnarray*} y' &=& f(x,y), \\ y(x_0) &=& Y_0, \end{eqnarray*} to test it with $x\in[0,4]$, $Y_0=1$, and \[ f(x,y) = x^2 - y, \] and to ``analyze the results''. The implementation is carried out elsewhere, in Matlab, and the results are in a Matlab ``diary'' file. I interpret ``analyze the results'' to mean ``see if we observe numerically what the theory predicts''. In particular, we should see \[ e_{max} = \max_{n=1:N} |e_n| \leq Bh \] for some constant $B$, independent of $h$. Here is what we see in the Matlab diary file: \begin{eqnarray*} h=0.25 &\mbox{ yields }& e_{max} = 0.2392, \\ h=0.125 &\mbox{yields}& e_{max} = 0.1189, \\ h=0.0625 &\mbox{yields}& e_{max} = 0.05926. \end{eqnarray*} Setting the ``observed'' value of $B$ to be $\tilde{B} = e_{max}/h$, we get \begin{eqnarray*} h=0.25 &\mbox{ yields }& \tilde{B} = 0.9568 \\ h=0.125 &\mbox{yields}& \tilde{B} = 0.9511 \\ h=0.0625 &\mbox{yields}& \tilde{B} = 0.9481 \end{eqnarray*} So it does indeed seem that $\tilde{B}\approx B$ is constant as theory predicts, with $\tilde{B}\approx 0.95$. \end{document}