14.4: Hamiltonian Mechanics Examples
( \newcommand{\kernel}{\mathrm{null}\,}\)
I’ll do two examples by hamiltonian methods – the simple harmonic oscillator and the soap slithering in a conical basin. Both are conservative systems, and we can write the hamiltonian as T+V, but we need to remember that we are regarding the hamiltonian as a function of the generalized coordinates and momenta. Thus we shall generally write translational kinetic energy as p2(2m) rather than as 12mν2, and rotational kinetic energy as L2(2I) rather than as 12Iω2
Simple harmonic oscillator
The potential energy is 12kx2, so the hamiltonian is
H=p22m+12kx2.
From equation D, we find that ˙x=pm, from which, by differentiation with respect to the time, ˙p=m¨x. And from equation C, we find that ˙p=−kx. Hence we obtain the equation of motion m¨x=−kx.
Conical basin
We refer to Section 13.6:
T=12m(˙r2+r2sin2α˙ϕ2)
V=mgrcosα
L=12m(˙r2+r2sin2α˙ϕ2)−mgrcosα
L=12m(˙r2+r2sin2α˙ϕ2)+mgrcosα
But, in the hamiltonian formulation, we have to write the hamiltonian in terms of the generalized momenta, and we need to know what they are. We can get them from the lagrangian and equation A applied to each coordinate in turn. Thus
Pr=∂L∂˙r=m˙r
and
Pϕ=∂L∂˙ϕ=mr2sin2α˙ϕ.
Thus the hamiltonian is
H=P2r2m+p2ϕ2mr2sin2α+mgrcosα.
Now we can obtain the equations of motion by applying equation D in turn to r and ϕ and then equation C in turn to r and ϕ:
˙r=∂H∂pr=prm,
˙ϕ=∂H∂pϕ=pϕmr2sin2α,
˙pr=−∂H∂r=p2ϕmr3sin2α−mgcosα,
˙pϕ=∂H∂ϕ=0.
Equations ??? and ??? tell us that mr2sin2α˙ϕ is constant and therefore that
r2˙ϕisconstant,=h,say.
This is one of the equations that we arrived at from the lagrangian formulation, and it expresses constancy of angular momentum.
By differentiation of Equation ??? with respect to time, we see that the left hand side of Equation ??? is m¨r. On the right hand side of Equation ???, we have pϕ, which is constant and equal to mhsin2α. Equation ??? therefore becomes
¨r=h2sin2αr3−gcosα,
which we also derived from the lagrangian formulation.