Re: NDSolve Percision
- To: mathgroup at smc.vnet.net
- Subject: [mg85522] Re: NDSolve Percision
- From: dh <dh at metrohm.ch>
- Date: Wed, 13 Feb 2008 04:17:22 -0500 (EST)
- References: <fopbtt$c4m$1@smc.vnet.net>
Hi Alex,
look up the option "AccuracyGoal" of NDSolve.
hope this helps, Daniel
Alex Cloninger wrote:
> So I'm running a program that is trying to use NDSolve and parametrically plot the results. The result is periodic, so it should cycle back on itself with a period of 2Pi. It does that, but if I run from {t,0,20Pi} is starts to miss the initial point by more and more. Basically, it's spiraling outward at a slow but unwanted rate. This will be a problem for when I increase the difficulty of the function.
>
> How do I increase the precision of NDSolve to make it keep more decimals and make the answer more accurate?
>
> The function is
>
> solution = NDSolve[{x'[t] == 2p[t], x[0] == 2,
> p'[t] == -2x[t],p[0] == N[Sqrt[-3], 50]}, {x, p}, {t,0,20Pi}]
>
> If you could help me out, I'd really appreciate it. Thanks.
>