Re: Hamiltonian System

*To*: mathgroup at smc.vnet.net*Subject*: [mg88103] Re: Hamiltonian System*From*: dh <dh at metrohm.ch>*Date*: Thu, 24 Apr 2008 05:59:53 -0400 (EDT)*References*: <fumquk$sdm$1@smc.vnet.net>

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 >