MathGroup Archive 2008

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

Search the Archive

Re: Hamiltonian System



Hi Alex,

you have branch cuts in the differential equation as well as in the 

energy expression.

To deal with the first branch cut in the DE we may define a power 

function with a different branch cut: E.g. To integrate over the first 

branch cut at approx. t=2, we may define

myPow[x_]:= (Exp[-I Pi/4]Sqrt[Exp[+I Pi/2]I  x])^3

this has a branch cut along the line trough I instead of -1. This line 

is not cut by I x[t] if we integrate from 0..3. We may therefore use 

myPow  in place of (I x[t])^(1+1/2).

With myPow we get a smooth curve, but still the energy is not constant 

near t=2. This comes from the energy term: (I*x[t]/.solution)^(2+1/2) 

that has a cut near t=2.



hope this helps, Daniel



Grandpa wrote:

> So I'm trying to solve the following Hamiltonian system using Mathematica.  I posted this earlier, but I wanted to make sure it's not skipped over.

> 

> 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

> (p[t]/.solution)^2-(I*x[t]/.solution)^(2+1/2)=1.

> 

> 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 also tried the SymplecticPartitionedRungeKutta method, but that didn't work either.  I'm not sure what else to consider. Any help would be appreciated.

> 

> Thanks,

> Alex

> 




  • Prev by Date: Re: Probably memory problem
  • Next by Date: Re: Re: Column Product of a Matrix of zeros and 1's
  • Previous by thread: Hamiltonian System
  • Next by thread: Probably memory problem