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.

[Graphics:../Images/RungeKuttaMod_gr_61.gif]

The error for Runge-Kutta's method.

[Graphics:../Images/RungeKuttaMod_gr_62.gif]

[Graphics:../Images/RungeKuttaMod_gr_63.gif]

[Graphics:../Images/RungeKuttaMod_gr_64.gif]
[Graphics:../Images/RungeKuttaMod_gr_65.gif]

Compare the error for Runge-Kutta's method with 25 and 50 subintervals.
Question 1. When the step size is reduced by [Graphics:../Images/RungeKuttaMod_gr_66.gif] estimate how much is the error reduced ?  (Theoretically is is [Graphics:../Images/RungeKuttaMod_gr_67.gif].)  

[Graphics:../Images/RungeKuttaMod_gr_68.gif]

[Graphics:../Images/RungeKuttaMod_gr_69.gif]

[Graphics:../Images/RungeKuttaMod_gr_70.gif]

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

(c) John H. Mathews 2004