MathGroup Archive 2008

[Date Index] [Thread Index] [Author Index]

Search the Archive

NDSolve Percision

  • To: mathgroup at smc.vnet.net
  • Subject: [mg85475] NDSolve Percision
  • From: Alex Cloninger <acloninger at wustl.edu>
  • Date: Mon, 11 Feb 2008 06:19:10 -0500 (EST)

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.


  • Prev by Date: Re: more looping trouble
  • Next by Date: Re: Creating notebook templates
  • Previous by thread: Re: Graph with different edge thicknesses
  • Next by thread: Re: NDSolve Percision