Example 5.  Determine the error for the RKF54 solution that was found in Example 1.  

Solution 5.

Get the abscissas and ordinates out of the data structure of the points in the RKF45 solution.  

[Graphics:../Images/RungeKuttaFehlbergMod_gr_85.gif]
[Graphics:../Images/RungeKuttaFehlbergMod_gr_86.gif]

[Graphics:../Images/RungeKuttaFehlbergMod_gr_87.gif]
[Graphics:../Images/RungeKuttaFehlbergMod_gr_88.gif]

Evaluate the "true solution" at the abscissas.  

[Graphics:../Images/RungeKuttaFehlbergMod_gr_89.gif]
[Graphics:../Images/RungeKuttaFehlbergMod_gr_90.gif]

Look at the [Graphics:../Images/RungeKuttaFehlbergMod_gr_91.gif]

[Graphics:../Images/RungeKuttaFehlbergMod_gr_92.gif]
[Graphics:../Images/RungeKuttaFehlbergMod_gr_93.gif]

Find the maximum error.

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

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


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


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

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

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

Compare the error in the RKF45 and RKF54 methods

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


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

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

The RKF54 is slightly better for this example.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

(c) John H. Mathews 2004