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

Solution 2.

[Graphics:../Images/Euler'sMethodMod_gr_65.gif]


[Graphics:../Images/Euler'sMethodMod_gr_66.gif]
[Graphics:../Images/Euler'sMethodMod_gr_67.gif]
[Graphics:../Images/Euler'sMethodMod_gr_68.gif]
[Graphics:../Images/Euler'sMethodMod_gr_69.gif]
[Graphics:../Images/Euler'sMethodMod_gr_70.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/Euler'sMethodMod_gr_71.gif]

[Graphics:../Images/Euler'sMethodMod_gr_72.gif]

[Graphics:../Images/Euler'sMethodMod_gr_73.gif]
[Graphics:../Images/Euler'sMethodMod_gr_74.gif]

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

[Graphics:../Images/Euler'sMethodMod_gr_75.gif]

[Graphics:../Images/Euler'sMethodMod_gr_76.gif]

[Graphics:../Images/Euler'sMethodMod_gr_77.gif]

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

(c) John H. Mathews 2004