Chapter 8, Section 8.8.2, Figure 8.12

Start by defining the Hamiltonian function h2.  This returns the value of the Hamiltonian at given values of x, y and δb.

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

Plot curves of constant Hamiltonian for \(TraditionalForm\`δ\&_\)=7.  See Fig.8.12a.

ContourPlot[h2[x,y,7],{x,-2,2},{y,-2,2},
   ContourShading->False, 
   Contours->{0.05,0.2,1,3,6,10},PlotPoints->100]

Plot curves of constant Hamiltonian for \(TraditionalForm\`δ\&_\)=4.  See Fig.8.12b.

ContourPlot[h2[x,y,4],{x,-2,2},{y,-2,2},
   ContourShading->False,
   Contours->{0.04,0.2,0.5,1,2,3},PlotPoints->100]

Plot curves of constant Hamiltonian for \(TraditionalForm\`δ\&_\)=0.  See Fig.8.12c.

ContourPlot[h2[x,y,0],{x,-4,4},{y,-4,4},
   ContourShading->False, 
   Contours->{-3.7,-3,-2,-1,0,1,3,6,10,15},
   PlotPoints->100]

Plot curves of constant Hamiltonian for \(TraditionalForm\`δ\&_\)=–4.  See Fig.8.12d.

ContourPlot[h2[x,y,-4],{x,-5,5},{y,-5,5},
   ContourShading->False, 
   Contours->{-15,-8,-3,0,2,4,10,20},PlotPoints->200]

Plot curves of constant Hamiltonian for \(TraditionalForm\`δ\&_\)=–7.  See Fig.8.12e.

ContourPlot[h2[x,y,-7],{x,-5,5},{y,-5,5},
   ContourShading->False, 
   Contours->{-28,-20,-8,-3,-2.25,-1,4,10},
   PlotPoints->100]

Plot curves of constant Hamiltonian for \(TraditionalForm\`δ\&_\)=–10.  See Fig.8.12f.

ContourPlot[h2[x,y,-10],{x,-6,6},{y,-6,6},
   ContourShading->False, 
   Contours->{-48,-40,-30,-20,-15,-9,-4,-1,10},
   PlotPoints->100]