Chapter 8, Section 8.8.1, Figures 8.9–8.11

Use Eq.(8.135) to define a function xval that returns the roots of the cubic to give the locations of the equilibrium points for given values of δb =  \(TraditionalForm\`δ\&_\).

xval[δb_]:=NRoots[x^3+δb*x-2 == 0, x]

Use Eq.(8.131) to define a function h1 that returns the value of the Hamiltonian for given values of x, y and δb.

h1[x_,y_,δb_]:=
   (1/2)*δb*(x^2+y^2)+(x^2+y^2)^2/4-2*x

Plot \(TraditionalForm\`δ\&_\) as a function of x.  See Fig.8.9.

Plot[-(x^3-2)/x,{x,-4,4},
     PlotRange->{{-4,4},{-15,15}},
     Frame->True,
     AspectRatio->1,PlotPoints->50]

Now create Fig.8.10 by plotting curves of constant Hamiltonian for four different values of \(TraditionalForm\`δ\&_\).

First we use \(TraditionalForm\`δ\&_\)=15 and plot 6 curves.  See Fig.8.10a.

ContourPlot[h1[x,y,15],{x,-4,4},{y,-4,4},
   ContourShading->False,
   Contours->{1,3,10,20,50,100},PlotPoints->100]

Next we use \(TraditionalForm\`δ\&_\)=0 and plot 9 curves.  See Fig.8.10b.

ContourPlot[h1[x,y,0],{x,-4,4},{y,-4,4},
   ContourShading->False, 
   Contours->{-1.8,-1.5,-1,0,1,2,5,10,20},
   PlotPoints->100]

Next we use \(TraditionalForm\`δ\&_\)=–3 (the bifurcation value) and plot 6 curves.  See Fig.8.10c.

ContourPlot[h1[x,y,-3],{x,-4,4},{y,-4,4},
   ContourShading->False,
   Contours->{-5,-4,-2,0,0.75,2},PlotPoints->100]

Finally we use \(TraditionalForm\`δ\&_\)=–15 and plot curves for 5 values of the Hamiltonian.  Note that for some values of the Hamiltonian there are two branches (inner and outer) of the curves.  See Fig.8.10d.

ContourPlot[h1[x,y,-15],{x,-6,6},{y,-6,6},
   ContourShading->False, 
   Contours->{-63,-55,-48.57188892,-20,-1},
   PlotPoints->100]

Now plot curves of constant Hamiltonian close to the origin (i.e. corresponding to low eccentricity) for large positive \(TraditionalForm\`δ\&_\) showing that they are concentric circles shifted to the right of the origin.  See Fig.8.11a.

ContourPlot[h1[x,y,15],{x,-1,1},{y,-1,1},
   ContourShading->False,
   Contours->{-0.1,0,0.2,0.5,1,2,3,4,5},
   PlotPoints->100]

Now plot curves of constant Hamiltonian close to the origin (i.e. corresponding to low eccentricity) for large negative \(TraditionalForm\`δ\&_\) showing that they are concentric circles shifted to the left of the origin.  See Fig.8.11b.

ContourPlot[h1[x,y,-15],{x,-1,1},{y,-1,1},
   ContourShading->False,
   Contours->{-4,-3,-2,-1,-0.5,-0.2,0,0.1},
   PlotPoints->100]