To study the Henon-Heiles Hamiltonian

and also the use of the Poincare package within Maple

>    T:=(p1^2+p2^2)/2; V:=(q1^2+q2^2)/2 + q1^2*q2-q2^3/3;

T := 1/2*p1^2+1/2*p2^2

V := 1/2*q1^2+1/2*q2^2+q1^2*q2-1/3*q2^3

>    H:=T+V:

>    with(plots): with(DEtools):

First we look at the structure of the potential a bit

>    plot3d(V,q1=-1.5..1.5,q2=-1.5..1.5);

[Maple Plot]

>    for n from 1 to 8 do plt||n:=implicitplot(V=n/48,q1=-1.5..1.5,q2=-1.5..1.5,numpoints=2000) end do:

>    display([seq(plt||m,m=1..8)]);

[Maple Plot]

>    hamilton_eqs(H);

[diff(p1(t),t) = -q1(t)-2*q1(t)*q2(t), diff(p2(t),t) = -q2(t)-q1(t)^2+q2(t)^2, diff(q1(t),t) = p1(t), diff(q2(t),t) = p2(t)], [p1(t), p2(t), q1(t), q2(t)]
[diff(p1(t),t) = -q1(t)-2*q1(t)*q2(t), diff(p2(t),t) = -q2(t)-q1(t)^2+q2(t)^2, diff(q1(t),t) = p1(t), diff(q2(t),t) = p2(t)], [p1(t), p2(t), q1(t), q2(t)]

The command below generates initial conditions for Hamilton's equations, given a specific value of the energy and enough other quantities.

                   We begin with E = 0.06.  

    We also recall that this potential has a separatrix dividing its bounded solutions from its unbounded ones at E = 1/6.

>    ic:=generate_ic(H,{t=0,p2=-0.05,q2=-0.2,q1=-0.1,energy=0.06},1);

ic := {[0., .2572288216, -.5e-1, -.1, -.2]}

The command below, setup for 3 variables by the "3" parameter at the end, tracks time trajectories as they move along the 3-dimensional, constant

     energy surface in the 4-dimensional phasespace, made by two 2-tori.

>    P:=poincare(H,t=0..500,ic,stepsize=0.05,iterations=3,scene=[q2=-0.5..0.5,p2=-0.5..0.5,q1=-0.5..0.5],3):

_____________________________________________________

`H = .60000000e-1`, `  Initial conditions:`, t = 0., p1 = .2572288216, p2 = -.5e-1, q1 = -.1, q2 = -.2

`Maximum H deviation : .1680000000e-5 %`

_____________________________________________________

`Time consumed: 105 seconds`

>    display(P,orientation=[-98,70],tickmarks=[3,3,3]);

[Maple Plot]

This command, below, however, just gives me a 2-dimensional Poincare section, with the gray plane shown above,

   so that the graph is just points of intersection.

>    poincare(H,t=0..500,ic,stepsize=0.05,iterations=3,scene=[q2,p2]);

_____________________________________________________

`H = .60000000e-1`, `  Initial conditions:`, t = 0., p1 = .2572288216, p2 = -.5e-1, q1 = -.1, q2 = -.2

`Number of points found crossing the (q2,p2) plane: 160`

`Maximum H deviation : .1670000000e-5 %`

_____________________________________________________

`Time consumed: 5 seconds`

[Maple Plot]

Looking at the graph above, we can indeed see that it looks like the graph of a "slice" of a torus by a flat plane, i.e., two circles.

   However, at least one of the circles has been badly deformed because the torus is bent, twisted, and deformed.

   

   NOW, let's try some other choices for the energy!

>    ic:=generate_ic(H,{t=0,p2=-0.05,q2=-0.2,q1=-0.1,energy=0.09},1);

ic := {[0., .3551994745, -.5e-1, -.1, -.2]}

>    P:=poincare(H,t=0..500,ic,stepsize=0.05,iterations=3,scene=[q2=-0.5..0.5,p2=-0.5..0.5,q1=-0.5..0.5],3):

_____________________________________________________

`H = .90000000e-1`, `  Initial conditions:`, t = 0., p1 = .3551994745, p2 = -.5e-1, q1 = -.1, q2 = -.2

`Maximum H deviation : .1660000000e-5 %`

_____________________________________________________

`Time consumed: 120 seconds`

>    display(P,orientation=[-98,70],tickmarks=[3,3,3]);

[Maple Plot]

>    poincare(H,t=0..500,ic,stepsize=0.05,iterations=3,scene=[q2,p2]);

_____________________________________________________

`H = .90000000e-1`, `  Initial conditions:`, t = 0., p1 = .3551994745, p2 = -.5e-1, q1 = -.1, q2 = -.2

`Number of points found crossing the (q2,p2) plane: 154`

`Maximum H deviation : .1640000000e-5 %`

_____________________________________________________

`Time consumed: 5 seconds`

[Maple Plot]

>    ic3:=generate_ic(H,{t=0,p2=-0.05,q2=-0.2,q1=-0.1,energy=0.10},1);

ic3 := {[0., .3823174946, -.5e-1, -.1, -.2]}

>   

>    P:=poincare(H,t=0..500,ic3,stepsize=0.05,iterations=3,scene=[q2=-0.5..0.5,p2=-0.5..0.5,q1=-0.5..0.5],3):

_____________________________________________________

`H = .10000000`, `  Initial conditions:`, t = 0., p1 = .3823174946, p2 = -.5e-1, q1 = -.1, q2 = -.2

`Maximum H deviation : .1680000000e-5 %`

_____________________________________________________

`Time consumed: 125 seconds`

>    display(P,orientation=[-98,70],tickmarks=[3,3,3]);

[Maple Plot]

>    poincare(H,t=0..600,ic3,stepsize=0.05,iterations=3,scene=[q2,p2]);

_____________________________________________________

`H = .10000000`, `  Initial conditions:`, t = 0., p1 = .3823174946, p2 = -.5e-1, q1 = -.1, q2 = -.2

`Number of points found crossing the (q2,p2) plane: 183`

`Maximum H deviation : .2010000000e-5 %`

_____________________________________________________

`Time consumed: 7 seconds`

[Maple Plot]

>    ic3:=generate_ic(H,{t=0,p2=-0.05,q2=-0.2,q1=-0.1,energy=0.11},1);

ic3 := {[0., .4076354581, -.5e-1, -.1, -.2]}

>    P:=poincare(H,t=0..500,ic3,stepsize=0.05,iterations=3,scene=[q2=-0.5..0.5,p2=-0.5..0.5,q1=-0.5..0.5],3):

_____________________________________________________

`H = .11000000`, `  Initial conditions:`, t = 0., p1 = .4076354581, p2 = -.5e-1, q1 = -.1, q2 = -.2

`Maximum H deviation : .1830000000e-5 %`

_____________________________________________________

`Time consumed: 127 seconds`

>    display(P,orientation=[-98,70],tickmarks=[3,3,3]);

[Maple Plot]

>    poincare(H,t=0..600,ic3,stepsize=0.05,iterations=3,scene=[q2,p2]);

_____________________________________________________

`H = .11000000`, `  Initial conditions:`, t = 0., p1 = .4076354581, p2 = -.5e-1, q1 = -.1, q2 = -.2

`Number of points found crossing the (q2,p2) plane: 180`

`Maximum H deviation : .2160000000e-5 %`

_____________________________________________________

`Time consumed: 7 seconds`

[Maple Plot]

>    poincare(H,t=0..1600,ic3,stepsize=0.05,iterations=3,scene=[q2,p2]);

_____________________________________________________

`H = .11000000`, `  Initial conditions:`, t = 0., p1 = .4076354581, p2 = -.5e-1, q1 = -.1, q2 = -.2

`Number of points found crossing the (q2,p2) plane: 481`

`Maximum H deviation : .5660000000e-5 %`

_____________________________________________________

`Time consumed: 23 seconds`

[Maple Plot]

>    ic3:=generate_ic(H,{t=0,p2=-0.05,q2=-0.2,q1=-0.1,energy=0.12},1); P:=poincare(H,t=0..500,ic3,stepsize=0.05,iterations=3,scene=[q2=-0.5..0.5,p2=-0.5..0.5,q1=-0.5..0.5],3): display(P,orientation=[-98,70],tickmarks=[3,3,3]);

ic3 := {[0., .4314703543, -.5e-1, -.1, -.2]}

_____________________________________________________

`H = .12000000`, `  Initial conditions:`, t = 0., p1 = .4314703543, p2 = -.5e-1, q1 = -.1, q2 = -.2

`Maximum H deviation : .1860000000e-5 %`

_____________________________________________________

`Time consumed: 154 seconds`

[Maple Plot]

>    poincare(H,t=0..600,ic3,stepsize=0.05,iterations=3,scene=[q2,p2]);

_____________________________________________________

`H = .12000000`, `  Initial conditions:`, t = 0., p1 = .4314703543, p2 = -.5e-1, q1 = -.1, q2 = -.2

`Number of points found crossing the (q2,p2) plane: 175`

`Maximum H deviation : .2210000000e-5 %`

_____________________________________________________

`Time consumed: 13 seconds`

[Maple Plot]

>    poincare(H,t=0..1600,ic3,stepsize=0.05,iterations=3,scene=[q2,p2]);

_____________________________________________________

`H = .12000000`, `  Initial conditions:`, t = 0., p1 = .4314703543, p2 = -.5e-1, q1 = -.1, q2 = -.2

`Number of points found crossing the (q2,p2) plane: 456`

`Maximum H deviation : .5610000000e-5 %`

_____________________________________________________

`Time consumed: 40 seconds`

[Maple Plot]

>    ic3:=generate_ic(H,{t=0,p2=-0.05,q2=-0.2,q1=-0.1,energy=0.14},1); P:=poincare(H,t=0..500,ic3,stepsize=0.05,iterations=3,scene=[q2=-0.5..0.5,p2=-0.5..0.5,q1=-0.5..0.5],3): display(P,orientation=[-98,70],tickmarks=[3,3,3]);

ic3 := {[0., .4755698336, -.5e-1, -.1, -.2]}

_____________________________________________________

`H = .14000000`, `  Initial conditions:`, t = 0., p1 = .4755698336, p2 = -.5e-1, q1 = -.1, q2 = -.2

`Maximum H deviation : .2120000000e-5 %`

_____________________________________________________

`Time consumed: 107 seconds`

[Maple Plot]

>    poincare(H,t=0..600,ic3,stepsize=0.05,iterations=3,scene=[q2,p2]); poincare(H,t=0..1600,ic3,stepsize=0.05,iterations=3,scene=[q2,p2]);

_____________________________________________________

`H = .14000000`, `  Initial conditions:`, t = 0., p1 = .4755698336, p2 = -.5e-1, q1 = -.1, q2 = -.2

`Number of points found crossing the (q2,p2) plane: 174`

`Maximum H deviation : .2510000000e-5 %`

_____________________________________________________

`Time consumed: 6 seconds`

[Maple Plot]

_____________________________________________________

`H = .14000000`, `  Initial conditions:`, t = 0., p1 = .4755698336, p2 = -.5e-1, q1 = -.1, q2 = -.2

`Number of points found crossing the (q2,p2) plane: 465`

`Maximum H deviation : .6800000000e-5 %`

_____________________________________________________

`Time consumed: 24 seconds`

[Maple Plot]

>