Another example: Autocatalator

timeI =1000

1000

Notice the use of "With command and Maxsteps" option

sol = With[{ro=0.920,m=1,n=2,xi=5.,yi=5.,tin =1000},
      NDSolve[{x'[t] == ro - x[t]^m y[t]^n,
               y'[t] == x[t]^m y[t]^n - y[t],
               x[0] == xi,y[0] == yi},
               {x,y},{t,0,timeI},MaxSteps->50000]]

{{x→InterpolatingFunction[{{0., 1000.}}, <>], y→InterpolatingFunction[{{0., 1000.}}, <>]}}

fig1 = Plot[Evaluate[{x[t],y[t]}/.sol],{t,900,timeI},PlotRange->All,Frame->True,PlotStyle→{{Dashing[{0.02}],Hue[0.9],Thickness[0.01]},{Thickness[0.01]}},PlotPoints->200];

[Graphics:../HTMLFiles/MATH5_TUT1_831.gif]

Option "PlotPoints" gives us more definition

fig2 = ParametricPlot[Evaluate[{x[t],y[t]}/.sol],{t,900,timeI},PlotRange->{{0,5},{0,5}},Frame->True,PlotStyle->Hue[.9],PlotPoints->200];

[Graphics:../HTMLFiles/MATH5_TUT1_832.gif]


Created by Mathematica  (September 7, 2006) Valid XHTML 1.1!