Example 7. Plot the
absolute value of the error for Euler's method and the modified
Euler's method.
Solution 7.
![[Graphics:../Images/Euler'sMethodMod_gr_149.gif]](../Images/Euler'sMethodMod_gr_149.gif)
![[Graphics:../Images/Euler'sMethodMod_gr_153.gif]](../Images/Euler'sMethodMod_gr_153.gif)
Just for fun, compare the error for the Euler and modified Euler solutions.
![[Graphics:../Images/Euler'sMethodMod_gr_157.gif]](../Images/Euler'sMethodMod_gr_157.gif)
Since we have the analytic or "true solution" at hand, we can run
experiments to verify that Euler's method has
order
, and the
Modified Euler's method has order
. Reduce
the step size by
and see what happens to the error.
(c) John H. Mathews 2004