Euler Method - Using the Method with Mathematica - Part 5
Numerical Methods for Solving Differential Equations
Euler's Method
Using the Method withÌýMathematica
(continued fromÌýlast page...)
Your commands should have resulted in:
±è°ù±ð±ô¾±³¾²õ´Ç±ô2=±ð³Ü±ô±ð°ù°Ú³æ+2²â,Ìýµ÷³æ,0,1°¨,Ìýµ÷²â,0°¨,Ìý20±Õ
µ÷µ÷0,Ìý0°¨,Ìýµ÷0.05,Ìý0°¨,Ìýµ÷0.1,Ìý0.0025°¨,Ìýµ÷0.15,Ìý0.00775°¨,
ÌýÌýÌýµ÷0.2,Ìý0.016025°¨,Ìýµ÷0.25,Ìý0.0276275°¨,Ìýµ÷0.3,Ìý0.0428903°¨,
ÌýÌýÌýµ÷0.35,Ìý0.0621793°¨,Ìýµ÷0.4,Ìý0.0858972°¨,Ìýµ÷0.45,Ìý0.114487°¨,
ÌýÌýÌýµ÷0.5,Ìý0.148436°¨,Ìýµ÷0.55,Ìý0.188279°¨,Ìýµ÷0.6,Ìý0.234607°¨,Ìý
ÌýÌýÌýµ÷0.65,Ìý0.288068°¨,Ìýµ÷0.7,Ìý0.349375°¨,Ìýµ÷0.75,Ìý0.419312°¨,
ÌýÌýÌýµ÷0.8,Ìý0.498743°¨,Ìýµ÷0.85,Ìý0.588618°¨,Ìýµ÷0.9,Ìý0.689979°¨,
ÌýÌýÌýµ÷0.95,Ìý0.803977°¨,Ìýµ÷1.,Ìý0.931875°¨°¨
MatrixForm[prelimsol2]

The last point is now (1.00,Ìý0.931875), which is still not as accurate as we'd like. (Remember, it's supposed to be (1.00,Ìý1.097264).) It seems obvious that the increased number of points is responsible for the increased accuracy! To get even greater accuracy, therefore, instructÌýMathematicaÌýto recalculate the solution aÌýthirdÌýtime, now using 100 steps.
³¢±ð³Ù'²õÌýgo lookÌýat what you should have gotten...







