Services & Resources / Wolfram Forums / MathGroup Archive

MathGroup Archive 2008

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

Search the Archive

Hamiltonian System with NDSolve

  • To: mathgroup at
  • Subject: [mg87956] Hamiltonian System with NDSolve
  • From: Grandpa <acloninger at>
  • Date: Mon, 21 Apr 2008 03:25:50 -0400 (EDT)

So I'm trying to solve the following Hamiltonian system using Mathematica.

solution = NDSolve[{x'[t] == 2p[t], x[0] == 2, 
p'[t] == I*(2 + 1/2)(I*x[t])^(1 + 1/2), p[0] == 1-2*I},          {x, p}, {t,0,10}, MaxSteps -> Infinity][[1]];

I'm letting E=1, so at all points t, it should be that

That is the case until the function crosses a branch cut on the complex x-plane that runs from 0 to i*(Infinity).  Once the function crosses the branch cut, the system no longer preserves E and the value changes to something around 1.3.

How can I go about fixing this problem?  I've already tried working with the precision and accuracy goals, and that didn't work.  I'm not sure what else to consider.  Any help would be appreciated.


  • Prev by Date: Re: Mathematica Player Pro!
  • Next by Date: Re: Very Long Wait for the Kernel after Reboot
  • Previous by thread: returning inverse Hessian from FindMinimum
  • Next by thread: Re: Hamiltonian System with NDSolve