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.

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


[Graphics:../Images/Heun'sMethodMod_gr_82.gif]
[Graphics:../Images/Heun'sMethodMod_gr_83.gif]
[Graphics:../Images/Heun'sMethodMod_gr_84.gif]
[Graphics:../Images/Heun'sMethodMod_gr_85.gif]
[Graphics:../Images/Heun'sMethodMod_gr_86.gif]

Dig out the formula for the solution out of the data structure of  solset and put it in  f[t].
Plot the analytic solution at the same sample points that were used for the numerical approximations.

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

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

[Graphics:../Images/Heun'sMethodMod_gr_89.gif]
[Graphics:../Images/Heun'sMethodMod_gr_90.gif]

Just for fun, plot the Heun solution and the analytic solution. Notice that there is a difference.

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

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

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

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

(c) John H. Mathews 2004