Module

for

Runge Kutta Method for O.D.E.'s

   

Theorem  (Runge-Kutta Method of order 4)  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/RungeKuttaMod_gr_1.gif] with [Graphics:Images/RungeKuttaMod_gr_2.gif],  over the interval  [Graphics:Images/RungeKuttaMod_gr_3.gif].
        
The Runge-Kutta method uses the formulas [Graphics:Images/RungeKuttaMod_gr_4.gif],  and  

        [Graphics:Images/RungeKuttaMod_gr_5.gif]     for  [Graphics:Images/RungeKuttaMod_gr_6.gif]  
where
        [Graphics:Images/RungeKuttaMod_gr_7.gif]   

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

Proof  The Runge-Kutta Method  The Runge-Kutta Method  

 

Theorem  (Precision  of the Runge-Kutta Method of Order 4)  Assume that  [Graphics:Images/RungeKuttaMod_gr_9.gif]  is the solution to the I.V.P.  [Graphics:Images/RungeKuttaMod_gr_10.gif]  with  [Graphics:Images/RungeKuttaMod_gr_11.gif].  If  [Graphics:Images/RungeKuttaMod_gr_12.gif]  and  [Graphics:Images/RungeKuttaMod_gr_13.gif]  is the sequence of approximations generated by the Runge-Kutta method of order 4, then at each step, the local truncation error is of the order  [Graphics:Images/RungeKuttaMod_gr_14.gif],  and the overall global truncation error  [Graphics:Images/RungeKuttaMod_gr_15.gif] is of the order

        
[Graphics:Images/RungeKuttaMod_gr_16.gif],  for  [Graphics:Images/RungeKuttaMod_gr_17.gif].  


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

        
[Graphics:Images/RungeKuttaMod_gr_18.gif].  

Proof  The Runge-Kutta Method  The Runge-Kutta Method  

 

Animations (Runge-Kutta Method of Order 4  Runge-Kutta Method of Order 4).  Internet hyperlinks to animations.

 

Algorithm (Runge-Kutta Method). To compute a numerical approximation for the solution of the initial value problem  [Graphics:Images/RungeKuttaMod_gr_19.gif] with  [Graphics:Images/RungeKuttaMod_gr_20.gif]  over [Graphics:Images/RungeKuttaMod_gr_21.gif]  at a discrete set of points using the formula  

    [Graphics:Images/RungeKuttaMod_gr_22.gif],  for  [Graphics:Images/RungeKuttaMod_gr_23.gif]  
where
    [Graphics:Images/RungeKuttaMod_gr_24.gif],
    [Graphics:Images/RungeKuttaMod_gr_25.gif],
    [Graphics:Images/RungeKuttaMod_gr_26.gif], and
    [Graphics:Images/RungeKuttaMod_gr_27.gif].

Computer Programs  The Runge-Kutta Method  The Runge-Kutta Method  

Mathematica Subroutine (Runge-Kutta Method of Order 4).

[Graphics:Images/RungeKuttaMod_gr_28.gif]

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

 

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

 

Example 3.  Plot the error for Runge-Kutta's method.
Solution 3.

 

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

 

Example 5.   Solve  [Graphics:Images/RungeKuttaMod_gr_71.gif]  with  [Graphics:Images/RungeKuttaMod_gr_72.gif]  over  [Graphics:Images/RungeKuttaMod_gr_73.gif].
Solution 5.

 

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

 

Example 7.  Plot the absolute value of the error for Runge-Kutta's method.
Solution 7.

 

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

 

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

 

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

 

Various Scenarios and Animations for the Runge-Kutta Method for O.D.E's

Example 11.  Solve the I.V.P.  [Graphics:Images/RungeKuttaMod_gr_155.gif].    Compute the Runge-Kutta solution to the I.V.P.
Solution 11.

 

Animations (Runge-Kutta Method of Order 4  Runge-Kutta Method of Order 4).  Internet hyperlinks to animations.

 

Old Lab Project (Runge Kutta Method of order 4  Runge Kutta Method of order 4).  Internet hyperlinks to an old lab project.  

 

Research Experience for Undergraduates

The Runge-Kutta Method  The Runge-Kutta Method  Internet hyperlinks to web sites and a bibliography of articles.  

 

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

 

Return to Numerical Methods - Numerical Analysis

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

(c) John H. Mathews 2004