Module

for

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

   

    We have seen that Euler's method for solving and O. D. E. has global precision of order   [Graphics:Images/Heun'sMethodMod_gr_1.gif].  A method which uses Euler's method as a predictor and then correcting the predictor is called Heun's method and has global precision of order  [Graphics:Images/Heun'sMethodMod_gr_2.gif].  

 

Theorem  (Heun'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/Heun'sMethodMod_gr_3.gif] with [Graphics:Images/Heun'sMethodMod_gr_4.gif],  over the interval  [Graphics:Images/Heun'sMethodMod_gr_5.gif].
        
Heun's method uses the formulas [Graphics:Images/Heun'sMethodMod_gr_6.gif],  and  

the predictor          [Graphics:Images/Heun'sMethodMod_gr_7.gif],  and

the corrector           [Graphics:Images/Heun'sMethodMod_gr_8.gif]  for  [Graphics:Images/Heun'sMethodMod_gr_9.gif]  

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

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

 

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

        
[Graphics:Images/Heun'sMethodMod_gr_18.gif],  for  [Graphics:Images/Heun'sMethodMod_gr_19.gif].  


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

        
[Graphics:Images/Heun'sMethodMod_gr_20.gif].  

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

 

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

 

Algorithm (Heun's Method).  To approximate the solution of the initial value problem [Graphics:Images/Heun'sMethodMod_gr_21.gif] with [Graphics:Images/Heun'sMethodMod_gr_22.gif]  over  [Graphics:Images/Heun'sMethodMod_gr_23.gif]  at a discrete set of points using the formulas  

    [Graphics:Images/Heun'sMethodMod_gr_24.gif],  and  [Graphics:Images/Heun'sMethodMod_gr_25.gif]  for  [Graphics:Images/Heun'sMethodMod_gr_26.gif].  

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

Mathematica Subroutine (Heun's Method).

[Graphics:Images/Heun'sMethodMod_gr_27.gif]

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

 

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

 

Example 3.  Plot the error for Heun's method.
Solution 3.

 

Example 4.  Reduce the step size by  [Graphics:Images/Heun'sMethodMod_gr_59.gif] and see what happens to the error.
Recalculate points for Heun's method, and the analytic solution using twice as many subintervals.
Then Plot the error for Heun's method.
Solution 4.

 

Example 5.   Solve  [Graphics:Images/Heun'sMethodMod_gr_70.gif]  with  [Graphics:Images/Heun'sMethodMod_gr_71.gif]  over  [Graphics:Images/Heun'sMethodMod_gr_72.gif].
Solution 5.

 

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

 

Example 7.  Plot the absolute value of the error for Heun's method.

Solution 7.

 

Example 8.  Reduce the step size by  [Graphics:Images/Heun'sMethodMod_gr_98.gif] and see what happens to the error.
Recalculate points for Heun's method, and the analytic solution using twice as many subintervals.
Then Plot the error for Heun's method.

Solution 8.

 

Example 9.  Solve the I.V.P.  [Graphics:Images/Heun'sMethodMod_gr_109.gif].  

Solution 9.

 

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

Solution 10.

 

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

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

Solution 11.

 

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

 

Research Experience for Undergraduates

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

 

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

 

Return to Numerical Methods - Numerical Analysis

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

(c) John H. Mathews 2004