Example 10. Use
Mathematica to find the analytic solution and graph for the
I.V.P.
.
Solution 10.
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_213.gif]](../Images/Euler'sMethodMod_gr_213.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_217.gif]](../Images/Euler'sMethodMod_gr_217.gif)
![[Graphics:../Images/Euler'sMethodMod_gr_220.gif]](../Images/Euler'sMethodMod_gr_220.gif)
![[Graphics:../Images/Euler'sMethodMod_gr_223.gif]](../Images/Euler'sMethodMod_gr_223.gif)
Something strange is happening, it appears that the solution
to
has
a vertical asymptote, yet Euler's method and the modified Euler's
method are able to move past this asymptote! How can this
happen? If the step size is chosen smaller, then these
methods will not tend to overshoot the asymptote. The location of the
asymptote can be found using Mathematica's procedure
FindRoot.
Numerical methods with a higher order of precision will not tend to overshoot the asymptote.
(c) John H. Mathews 2004