Example 8.  Reduce the step size by  [Graphics:Images/Euler'sMethodMod_gr_162.gif] 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]

The error for Euler's method.

[Graphics:../Images/Euler'sMethodMod_gr_164.gif]

[Graphics:../Images/Euler'sMethodMod_gr_165.gif]

[Graphics:../Images/Euler'sMethodMod_gr_166.gif]
[Graphics:../Images/Euler'sMethodMod_gr_167.gif]

The error for the Modified Euler's method.

[Graphics:../Images/Euler'sMethodMod_gr_168.gif]

[Graphics:../Images/Euler'sMethodMod_gr_169.gif]

[Graphics:../Images/Euler'sMethodMod_gr_170.gif]
[Graphics:../Images/Euler'sMethodMod_gr_171.gif]

Compare the error for Euler's method with 50 and 100 subintervals.
Question 1. When the step size is reduced by [Graphics:../Images/Euler'sMethodMod_gr_172.gif] estimate how much is the error reduced ?  (Theoretically is is [Graphics:../Images/Euler'sMethodMod_gr_173.gif].)  

[Graphics:../Images/Euler'sMethodMod_gr_174.gif]

[Graphics:../Images/Euler'sMethodMod_gr_175.gif]

[Graphics:../Images/Euler'sMethodMod_gr_176.gif]

Compare the error for the Modified Euler's method with 50 and 100 subintervals.
Question 2. When the step size is reduced by [Graphics:../Images/Euler'sMethodMod_gr_177.gif] estimate how much is the error reduced ?  (Theoretically is is [Graphics:../Images/Euler'sMethodMod_gr_178.gif].)  

[Graphics:../Images/Euler'sMethodMod_gr_179.gif]

[Graphics:../Images/Euler'sMethodMod_gr_180.gif]

[Graphics:../Images/Euler'sMethodMod_gr_181.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 [Graphics:../Images/Euler'sMethodMod_gr_182.gif] and [Graphics:../Images/Euler'sMethodMod_gr_183.gif] behavior of the error.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

(c) John H. Mathews 2004