Example 8. Reduce
the step size by
and see what happens to the error.
Recalculate points for Euler's method, the Modified Euler's method,
and the analytic solution using twice as many subintervals.
Then Plot the error for Euler's method and the Modified Euler's
method.
Solution 8.
![[Graphics:../Images/Euler'sMethodMod_gr_163.gif]](../Images/Euler'sMethodMod_gr_163.gif)
The error for Euler's method.
![[Graphics:../Images/Euler'sMethodMod_gr_165.gif]](../Images/Euler'sMethodMod_gr_165.gif)
The error for the Modified Euler's method.
![[Graphics:../Images/Euler'sMethodMod_gr_169.gif]](../Images/Euler'sMethodMod_gr_169.gif)
Compare the error for Euler's method with 50 and 100
subintervals.
Question 1. When the step size is
reduced by
estimate how much is the error reduced ? (Theoretically is
is
.)
![[Graphics:../Images/Euler'sMethodMod_gr_175.gif]](../Images/Euler'sMethodMod_gr_175.gif)
Compare the error for the Modified Euler's method with 50 and 100
subintervals.
Question 2. When the step size is
reduced by
estimate how much is the error reduced ? (Theoretically is
is
.)
![[Graphics:../Images/Euler'sMethodMod_gr_180.gif]](../Images/Euler'sMethodMod_gr_180.gif)
Question 3. Which method, Euler's method, or the Modified Euler's method, is better to use ? Why ?
Question 4. Suppose that 500 subintervals are to be used. Can you predict (estimate) the largest error for Euler's method, and the Modified Euler's method without doing the calculations ? Just look at the results in problem 4. You can read the values off the graph with the cross-hairs by highlighting the graph and holding down on the Ctrl key. Do it.
Now suppose that an applied mathematician seeks a numerical
solution that has 8 correct digits to the right of the decimal
point.
Question 5. What
value of m would you predict that one should
use in Euler's method to achieve the desired accuracy.
Question 6. What
value of m would you predict that one should
use in the modified Euler's method to achieve the desired
accuracy.
Warning. Do not
execute the Euler and MEuler subroutines to answer this question.
Their might be too many computations involved and it will take a long
time to do them. You are to estimate an answer based on
your knowledge about the
and
behavior of the error.
(c) John H. Mathews 2004