Module

for

Euler's Method for O.D.E.'s

   

    The first method we shall study for solving differential equations is called Euler's method, it serves to illustrate the concepts involved in the advanced methods. It has limited use because of the larger error that is accumulated with each successive step.  However, it is important to study Euler's method because the remainder term and error analysis is easier to understand.

 

Theorem  (Euler's Method)  Assume that  f(t,y)  is continuous and satisfies a Lipschits condition in the variable  y,  and consider the  I. V. P. (initial value problem)

        
[Graphics:Images/Euler'sMethodMod_gr_1.gif] with [Graphics:Images/Euler'sMethodMod_gr_2.gif],  over the interval  [Graphics:Images/Euler'sMethodMod_gr_3.gif].
        
Euler's method uses the formulas [Graphics:Images/Euler'sMethodMod_gr_4.gif],  and  

        [Graphics:Images/Euler'sMethodMod_gr_5.gif]     for  [Graphics:Images/Euler'sMethodMod_gr_6.gif]  

as an approximate solution to the differential equation using the discrete set of points  [Graphics:Images/Euler'sMethodMod_gr_7.gif].  

Proof  Euler's Method for O. D. E.'s  Euler's Method for O. D. E.'s  

 

Error analysis for Euler's Method  

    When we obtained the formula  
[Graphics:Images/Euler'sMethodMod_gr_8.gif]  for Euler's method, the neglected term for each step has the form [Graphics:Images/Euler'sMethodMod_gr_9.gif].  If this was the only error at each step, then at the end of the interval [Graphics:Images/Euler'sMethodMod_gr_10.gif], after [Graphics:Images/Euler'sMethodMod_gr_11.gif] steps have been made, the accumulated error would be

        
[Graphics:Images/Euler'sMethodMod_gr_12.gif][Graphics:Images/Euler'sMethodMod_gr_13.gif][Graphics:Images/Euler'sMethodMod_gr_14.gif].  

The error is more complicated, but this estimate predominates.

 

Theorem (Precision of Euler's Method)  Assume that  [Graphics:Images/Euler'sMethodMod_gr_15.gif]  is the solution to the I.V.P.  [Graphics:Images/Euler'sMethodMod_gr_16.gif]  with  [Graphics:Images/Euler'sMethodMod_gr_17.gif].  If  [Graphics:Images/Euler'sMethodMod_gr_18.gif]  and  [Graphics:Images/Euler'sMethodMod_gr_19.gif]  is the sequence of approximations generated by Euler's method, then at each step, the local trunctaion error is of the order  [Graphics:Images/Euler'sMethodMod_gr_20.gif],  and the overall global truncation error  [Graphics:Images/Euler'sMethodMod_gr_21.gif] is of the order

        
[Graphics:Images/Euler'sMethodMod_gr_22.gif],  for  [Graphics:Images/Euler'sMethodMod_gr_23.gif].  


The error at the right end of the interval is called the final global error  

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

Remark.  The global truncation error  [Graphics:Images/Euler'sMethodMod_gr_25.gif]  is used to study the behavior of the error for various step sizes.  It can be used to give us an idea of how much computing effort must be done to obtain an accurate approximation.

Proof  Euler's Method for O. D. E.'s  Euler's Method for O. D. E.'s  

 

Numerical methods used in this module.  Use Euler's method and the modified Euler's method. Construct numerical solutions of order  [Graphics:Images/Euler'sMethodMod_gr_26.gif]  and  [Graphics:Images/Euler'sMethodMod_gr_27.gif], respectively.  The theory for the modified Euler method is not presented at this time, we are to trust that its development is similar, but the order for the error is better and is known to be [Graphics:Images/Euler'sMethodMod_gr_28.gif].   

 

Animations (Euler's Method  Euler's Method).  Internet hyperlinks to animations.

 

Animations (Modified Euler's Method  Modified Euler's Method).  Internet hyperlinks to animations.

 

Algorithm (Euler's Method).  To approximate the solution of the initial value problem [Graphics:Images/Euler'sMethodMod_gr_29.gif] with [Graphics:Images/Euler'sMethodMod_gr_30.gif]  over  [Graphics:Images/Euler'sMethodMod_gr_31.gif]  at a discrete set of points using the formulas  

        [Graphics:Images/Euler'sMethodMod_gr_32.gif],  and  [Graphics:Images/Euler'sMethodMod_gr_33.gif]  for  [Graphics:Images/Euler'sMethodMod_gr_34.gif].  

Computer Programs  Euler's Method for O. D. E.'s  Euler's Method for O. D. E.'s  

Mathematica Subroutine (Euler's Method).

[Graphics:Images/Euler'sMethodMod_gr_35.gif]

Algorithm (Modified Euler's Method).  To approximate the solution of the initial value problem [Graphics:Images/Euler'sMethodMod_gr_36.gif] with [Graphics:Images/Euler'sMethodMod_gr_37.gif]  over  [Graphics:Images/Euler'sMethodMod_gr_38.gif]  at a discrete set of points using the formulas

          [Graphics:Images/Euler'sMethodMod_gr_39.gif],  and  [Graphics:Images/Euler'sMethodMod_gr_40.gif]  for  [Graphics:Images/Euler'sMethodMod_gr_41.gif].  

Mathematica Subroutine (Modified Euler's Method).

[Graphics:Images/Euler'sMethodMod_gr_42.gif]

Example 1.  Solve the I.V.P.  [Graphics:Images/Euler'sMethodMod_gr_43.gif].  
Solution 1.

 

Example 2.  Use Mathematica to find the analytic solution and graph for the I.V.P.  [Graphics:Images/Euler'sMethodMod_gr_64.gif].  
Solution 2.

 

Example 3.  Plot the error for Euler's method and the modified Euler's method.
Solution 3.

 

Example 4.  Reduce the step size by  [Graphics:Images/Euler'sMethodMod_gr_92.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 4.

 

Example 5.   Solve  [Graphics:Images/Euler'sMethodMod_gr_114.gif]  with  [Graphics:Images/Euler'sMethodMod_gr_115.gif]  over  [Graphics:Images/Euler'sMethodMod_gr_116.gif].
Solution 5.

 

Example 6.  Use Mathematica to find the analytic solution and graph for the I.V.P.  [Graphics:Images/Euler'sMethodMod_gr_134.gif].  
Solution 6.

 

Example 7.  Plot the absolute value of the error for Euler's method and the modified Euler's method.
Solution 7.

 

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.

 

Example 9.  Solve the I.V.P.  [Graphics:Images/Euler'sMethodMod_gr_184.gif].  
Solution 9.

 

Example 10. Use Mathematica to find the analytic solution and graph for the I.V.P.  [Graphics:Images/Euler'sMethodMod_gr_205.gif].  
Solution 10.

 

Various Scenarios and Animations for Euler's Method for O.D.E's

Example 11.  Solve the I.V.P.  [Graphics:Images/Euler'sMethodMod_gr_228.gif].    Compute Euler's solution to the I.V.P.
Solution 11.

 

Example 12.  Solve the I.V.P.  [Graphics:Images/Euler'sMethodMod_gr_250.gif].     Compute the Modified Euler solution to the I.V.P.
Solution 12.

 

Animations (Euler's Method  Euler's Method).  Internet hyperlinks to animations.

 

Animations (Modified Euler's Method  Modified Euler's Method).  Internet hyperlinks to animations.

 

Old Lab Project (Euler's Method for O.D.E.'s  Euler's Method for O.D.E.'s).  Internet hyperlinks to an old lab project.  

 

Research Experience for Undergraduates

Euler's Method for O. D. E.'s  Euler's Method for O. D. E.'s  Internet hyperlinks to web sites and a bibliography of articles.  

 

Download this Mathematica Notebook Euler's Method for O.D.E.'s

 

Return to Numerical Methods - Numerical Analysis

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

(c) John H. Mathews 2004