Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2008

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

Search the Archive

Re: NDSolve Percision

  • To: mathgroup at smc.vnet.net
  • Subject: [mg85493] Re: NDSolve Percision
  • From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
  • Date: Wed, 13 Feb 2008 04:02:15 -0500 (EST)
  • Organization: Uni Leipzig
  • References: <fopbtt$c4m$1@smc.vnet.net>
  • Reply-to: kuska at informatik.uni-leipzig.de

Hi,

have you used Method -> {"SymplecticPartitionedRungeKutta"}
?? to avoid that ?

An non-symplectic method *must* loss the energy of the system,
this has nothing to do with the Precision, this has to do
with the fact that a normal numerical method for
initial value problems is designed to reduce the local
error and not to preserve a global quantity like the
energy.

Regards
   Jens

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.
> 


  • Prev by Date: 2d distribution in 3d Space
  • Next by Date: Re: NDSolve Percision
  • Previous by thread: NDSolve Percision
  • Next by thread: Re: NDSolve Percision