RE: How to change time stepsize for Integration
- To: mathgroup at smc.vnet.net
- Subject: [mg33978] RE: [mg33956] How to change time stepsize for Integration
- From: "DrBob" <majort at cox-internet.com>
- Date: Thu, 25 Apr 2002 02:59:51 -0400 (EDT)
- Reply-to: <drbob at bigfoot.com>
- Sender: owner-wri-mathgroup at wolfram.com
I think the MaxStepSize option will help with that. Bobby Treat -----Original Message----- From: Winston Garira [mailto:uceswga at ucl.ac.uk] To: mathgroup at smc.vnet.net Subject: [mg33978] [mg33956] How to change time stepsize for Integration 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. Thanks in advance Winston