Hénon-Heiles Equation

Author

Eric W. Weisstein
March 19, 2006

This notebook downloaded from http://mathworld.wolfram.com/notebooks/DynamicalSystems/Henon-HeilesEquation.nb.

For more information, see Eric's MathWorld entry http://mathworld.wolfram.com/Henon-HeilesEquation.html.

©2006 Wolfram Research, Inc. except for portions noted otherwise

Additional Authors

Generalized Hénon-Heiles equation plots by
Michael Trott
January 6, 2004

Code

HenonHeiles[{x0_,{y0_,dy0_},e_},tmax_]:=Module[{dx0=Sqrt[2/3 y0^3+2e-x0^2-y0^2-2x0^2y0-dy0^2],x,y,t},
Flatten[{x,y}/.NDSolve[{
x''[t]==-x[t]-2y[t] x[t],
y''[t]==-y[t]-x[t]^2+y[t]^2,
y[0]==y0,
y'[0]==dy0,
x[0]==x0,
x'[0]==dx0
},
{x,y},{t,0,tmax},Method->ExplicitRungeKutta,MaxSteps->5000
]]
]

SurfaceOfSection[{x0_,{y0_,dy0_},e_},tmax_]:=Module[{dx0=Sqrt[2/3 y0^3+2e-x0^2-y0^2-2x0^2y0-dy0^2],x,y,t},
If[#=={},{},First[#]]&@Last[Reap[NDSolve[{
x''[t]==-x[t]-2y[t] x[t],
y''[t]==-y[t]-x[t]^2+y[t]^2,
y[0]==y0,
y'[0]==dy0,
x[0]==x0,
x'[0]==dx0
},
{x,y},{t,0,tmax},Method->{EventLocator,"Event"->x[t], "EventAction":> Sow[{y[t], y'[t]}]}
]]]
]

Definition

V[x_,y_]:=1/2(x^2+y^2+2x^2 y-2/3 y^3)

e[{x_,y_},t_]:=(x[t]^2+y[t]^2+2x[t]^2 y[t]-2/3 y[t]^3+x'[t]^2+y'[t]^2)

Expand[{-D[V[x,y],x],-D[V[x,y],y]}]

Simplify[Solve[E==V[x,y]+(dx^2+dy^2)/2,dx]]

{xx,yy}=HenonHeiles[{0,{0.128846,0.018450},.125},100];

Show[GraphicsArray[Partition[
Plot[#[[1]][t],{t,0,100},DisplayFunction->Identity,
PlotStyle->Red,AxesLabel->TraditionalForm/@{t,#[[2]][t]}]&/@Transpose[{{xx,yy,xx',yy'},{x,y,x',y'}}],2]],ImageSize->500]

Check that Energy is Conserved

Plot[e[{xx,yy},t],{t,0,100},PlotStyle->Red,PlotRange->All]

Surfaces of Section

ListPlot[SurfaceOfSection[{0,{0.128846,0.018450},.125},1000],PlotStyle->{PointSize[.007],Red},AxesLabel->TraditionalForm/@{y[t],y'[t]},AspectRatio->Automatic]

FindFit[{{1/100,.15},{1/12,.5},{1/10,.6},{1/6,1}},a+b x,{a,b},x]

Show[{Plot[.075+5.4x,{x,0,1/6},PlotStyle->Blue],ListPlot[{{1/100,.15},{1/12,.5},{1/10,.6},{1/6,1}},PlotJoined->True,PlotStyle->Red]
}]

<<Utilities`Typesetting`

plots=
Internal`DeactivateMessages[
(
x=If[#==1/100,x=.15,.3];
ListPlot[Join@@Table[
SurfaceOfSection[{Random[Real,{-x,x}],{Random[Real,{-x,x}],Random[Real,{-x,x}]},#},1000],
{100}],
PlotStyle->{PointSize[.007],Red},
AspectRatio->Automatic,PlotLabel->TraditionalForm[e==#/.Rational[n_,d_]:>InlineFraction[n,d]]]
)]&/@{1/100,1/12,1/10,1/8,1/6}

Show[GraphicsArray[Partition[plots,3,3,{1,1},{}]],ImageSize->500]

Generalized Henon-Heiles Eigenfunctions

Solutions of the Schrödinger equation with a potential

V(r,θ) == (r^4)+b cos(3 θ) (r^3)+a (r^2)

for certain values of a and b.

Contributed by Michael Trott, Jan 6, 2004