How to change time stepsize for Integration

• To: mathgroup at smc.vnet.net
• Subject: [mg33956] How to change time stepsize for Integration
• From: Winston Garira <uceswga at ucl.ac.uk>
• Date: Wed, 24 Apr 2002 01:22:24 -0400 (EDT)
• Reply-to: Winston Garira <uceswga at ucl.ac.uk>
• Sender: owner-wri-mathgroup at wolfram.com

```Hi!

Can anyone help me on this one:

Pends[init_, time_, {c_, w_, p_}] :=
Module[{},
pend = NDSolve[{x''[t] + c x'[t] + (1 + p Cos[w t])Sin[x[t]] == 0,
x[0] == init[[1]], x'[0] == init[[2]]}, {x}, {t, 0, time},
MaxSteps -> 200000];
xd[t_] := x[t] /. pend[[1]];
xdd[t_] := x'[t] /. pend[[1]];];
c = 0.1; w = 0.30; p = 1.1;

Pends[{1.37, 0}, 5000, {c, w, p}];
plt = Plot[{t, xd[t], xdd[t]}, {t, 0, 500}];

I want to reduce the time stepsize
in my numerical integration with mathematica. Each time
I try to get coordinates generated from the command
Plot[ ......, {t, tmin, tmax}]; or
Table[......, {t, tmin, tmax}];

I always notice that in all these case time stepsize = 1.
Is there anyway I can reduce the the timestep to say,
time stepsize =0.001 in the above numerical integration using
NDsolve.