(* Cauchy - Euler, Taylor, and Picard methods in Red, Black and Blue*)Eulerstep[h_, {t_, y_}] := {t + h, y + h f[t, y]} ;

In[73]:=

f[t_, y_] := (t + 1) Sin[y] ; Eulerbackstep[h_, {t_, y_}] := {t - h, y - h f[t, y]} ;

In[79]:=

Eulerforwardlist[n_] := NestList[Eulerstep[1/n, #] &, {0, Pi/2}, n] ; Eulerbacklist[n_] := ... ep[1/n, #] &, {0, Pi/2}, n] ; Eulerlist[n_] := Union[Eulerforwardlist[n], Eulerbacklist[n]] ;

In[92]:=

Eulerplot := ListPlot[Eulerlist[4], PlotJoinedTrue, PlotStyle {RGBColo ... RGBColor[1, 0, 0]}] ; Taylorplot := Plot[Pi/2 + t + (1/2) * t^2 - 1/6 * t^3, {t, -1, 1}] ;

In[105]:=

Show[Eulerplot, Eulerpoints, Taylorplot, Picardplot]

[Graphics:HTMLFiles/existence_6.gif]

Out[105]=

⁃Graphics⁃

In[103]:=

Taylorplot := Plot[Pi/2 + t + (1/2) * t^2 - 1/6 * t^3, {t, -1, 1}] ; Picardplot := Plot[Pi/2 + -1 + Cos[t] + Sin[t] + t Sin[t], {t, -1, 1}, PlotStyle {RGBColor[0, 0, 1]}] ;


Created by Mathematica  (February 24, 2006)