Classical MechanicsBSc · Notes

1. Why replace velocities by momenta?

A position alone does not specify how a system will evolve. The pendulum can pass the same angle in either direction and with many different speeds. Lagrangian mechanics completes the state with generalized velocities. Hamiltonian mechanics uses their conjugate momenta instead.

This is useful because momenta carry the conservation laws found in Unit 2, and because position and momentum can be treated as independent coordinates of a state space. The Hamiltonian then supplies two first-order evolution equations for each pair. It does not require a new force law.

The replacement must be possible mathematically. Starting from pi=∂L/∂q˙ip_i=\partial L/\partial\dot q_i, we must solve for all q˙i\dot q_i as functions of q,p,tq,p,t. A sufficient local condition is an invertible velocity Hessian ∂2L/∂q˙i∂q˙j\partial^2L/\partial\dot q_i\partial\dot q_j. For the regular mechanical systems studied here, this is the positive-definite inertia matrix. Singular Lagrangians need a different constraint theory and are outside this syllabus.

2. Constructing the Hamiltonian

Definition. The Hamiltonian obtained from a regular Lagrangian is

H(q,p,t)=∑ipiq˙i−L(q,q˙,t),\boxed{H(q,p,t)=\sum_i p_i\dot q_i-L(q,\dot q,t),}(12.1)

with every q˙i\dot q_i on the right replaced by its expression in q,p,tq,p,t. Before that substitution, the right-hand side is the energy function written using velocities. After substitution it is a function on phase space.

This operation is a Legendre transformation. The derivative ∂L/∂q˙i\partial L/\partial\dot q_i supplies the new variable, and subtracting LL from ∑piq˙i\sum p_i\dot q_i removes the old velocity as an independent argument. A completed Hamiltonian may contain prescribed parameters such as Ω\Omega; it must not contain an unresolved dynamical q˙\dot q.

For one free particle, L=mx˙2/2L=m\dot x^2/2 gives p=mx˙p=m\dot x, so x˙=p/m\dot x=p/m. Then

H=ppm−12m(pm)2=p2m−p22m=p22m.H=p\frac pm-\frac12m\left(\frac pm\right)^2 =\frac{p^2}{m}-\frac{p^2}{2m}=\frac{p^2}{2m}.(12.2)

The two terms in the definition are both needed. Merely replacing x˙\dot x by p/mp/m in LL would happen to work for a free particle but gives the wrong sign of potential energy for a general system.

3. A useful matrix construction

For L=12q˙TMq˙+bTq˙+c−VL=\tfrac12\dot q^{\mathsf T}M\dot q+b^{\mathsf T}\dot q+c-V, the superscript T\mathsf T means transpose, so the products are sums over coordinates. The momenta satisfy

p=Mq˙+b,q˙=M−1(p−b).p=M\dot q+b,\qquad \dot q=M^{-1}(p-b).(12.3)

Let v=M−1(p−b)v=M^{-1}(p-b). Substitution in pTv−Lp^{\mathsf T}v-L gives

H=(p−b)Tv−12vTMv−c+V=12(p−b)TM−1(p−b)−c+V.H=(p-b)^{\mathsf T}v-\frac12v^{\mathsf T}Mv-c+V =\boxed{\frac12(p-b)^{\mathsf T}M^{-1}(p-b)-c+V}.(12.4)

The second equality follows because p−b=Mvp-b=Mv and MM is symmetric. This is a compact construction rule; the component calculations below remain sufficient without matrix notation.

4. Applications

Example 1 · The spring oscillator

Choose displacement xx. Then T=mx˙2/2T=m\dot x^2/2, V=kx2/2V=kx^2/2, and L=T−VL=T-V. Since p=mx˙p=m\dot x,

H=ppm−[p22m−12kx2]=p22m+12kx2.H=p\frac pm-\left[\frac{p^2}{2m}-\frac12kx^2\right] =\frac{p^2}{2m}+\frac12kx^2.(12.5)

The potential changes sign in passing from LL to HH. Here HH equals total mechanical energy, because the coordinate transformation is stationary and TT is quadratic homogeneous. For m=2 kgm=2\,\mathrm{kg}, p=4 kg m s−1p=4\,\mathrm{kg\,m\,s^{-1}}, k=8 N m−1k=8\,\mathrm{N\,m^{-1}}, and x=0.5 mx=0.5\,\mathrm m, the kinetic and potential contributions are 4 J4\,\mathrm J and 1 J1\,\mathrm J, so H=5 JH=5\,\mathrm J.

Example 2 · Polar coordinates

For a particle in V(r)V(r),

L=12mr˙2+12mr2θ˙2−V(r).L=\frac12m\dot r^2+\frac12mr^2\dot\theta^2-V(r).(12.6)

The momenta are pr=mr˙p_r=m\dot r and pθ=mr2θ˙p_\theta=mr^2\dot\theta. Invert them: r˙=pr/m\dot r=p_r/m, θ˙=pθ/(mr2)\dot\theta=p_\theta/(mr^2). The sum prr˙+pθθ˙p_r\dot r+p_\theta\dot\theta is pr2/m+pθ2/(mr2)p_r^2/m+p_\theta^2/(mr^2), while TT is half that sum. Hence

H=pr22m+pθ22mr2+V(r).\boxed{H=\frac{p_r^2}{2m}+\frac{p_\theta^2}{2mr^2}+V(r).}(12.7)

Do not substitute pθ=mθ˙p_\theta=m\dot\theta: an angular conjugate momentum has different dimensions. When differentiating HH with respect to rr, hold pθp_\theta fixed. Holding θ˙\dot\theta fixed would mean differentiating a different function on a different state space.

Example 3 · Coupled velocities

Let L=12m(q˙12+2αq˙1q˙2+q˙22)−V(q1,q2)L=\tfrac12m(\dot q_1^2+2\alpha\dot q_1\dot q_2+\dot q_2^2)-V(q_1,q_2) with ∣α∣<1|\alpha|<1. From Chapter 10,

q˙1=p1−αp2m(1−α2),q˙2=p2−αp1m(1−α2).\dot q_1=\frac{p_1-\alpha p_2}{m(1-\alpha^2)},\qquad \dot q_2=\frac{p_2-\alpha p_1}{m(1-\alpha^2)}.(12.8)

Their momentum-weighted sum is (p12−2αp1p2+p22)/[m(1−α2)](p_1^2-2\alpha p_1p_2+p_2^2)/[m(1-\alpha^2)]. Since ∑ipiq˙i=2T\sum_i p_i\dot q_i=2T, subtracting L=T−VL=T-V gives

H=p12−2αp1p2+p222m(1−α2)+V.H=\frac{p_1^2-2\alpha p_1p_2+p_2^2}{2m(1-\alpha^2)}+V.(12.9)

The cross term changes sign in the inverse quadratic form. For α=0\alpha=0 the particles' kinetic terms separate; as ∣α∣→1|\alpha|\to1 the inverse fails, matching the loss of regularity already identified.

Example 4 · A translating coordinate origin

A free particle on a line has laboratory position x=q+Utx=q+Ut, with constant prescribed UU. Its physical kinetic energy is T=m(q˙+U)2/2T=m(\dot q+U)^2/2, and V=0V=0. Thus L=TL=T and

p=m(q˙+U),q˙=pm−U.p=m(\dot q+U),\qquad \dot q=\frac pm-U.(12.10)

The Hamiltonian is

H=p(pm−U)−p22m=p22m−Up.H=p\left(\frac pm-U\right)-\frac{p^2}{2m} =\frac{p^2}{2m}-Up.(12.11)

Laboratory energy is Elab=p2/(2m)E_{\rm lab}=p^2/(2m), so H≠ElabH\ne E_{\rm lab} even though both are constant for this free motion. The term −Up-Up is a consequence of the explicitly time-dependent coordinate transformation. Relative kinetic energy mq˙2/2m\dot q^2/2 equals H+mU2/2H+mU^2/2; the difference is a constant, but neither equals laboratory energy for arbitrary pp.

5. Momentum is coordinate-dependent

The Cartesian momentum of a particle is the vector mvm\mathbf v in this ordinary mechanical setting. The generalized momentum pip_i is its projection weighted by the positional response to qiq_i, possibly including terms from a more general velocity-dependent Lagrangian. It is not generally a Cartesian vector component.

For example, pθp_\theta in polar coordinates equals angular momentum, whereas prp_r is radial linear momentum. Treating them as interchangeable “momenta” without units obscures the mechanics. Their shared role is that each is conjugate to a coordinate and that their product piq˙ip_i\dot q_i has units of power times time, namely energy.

6. Construction checks

A correct construction defines the coordinates, writes T,V,LT,V,L, differentiates to obtain every momentum, inverts the complete set, and substitutes into HH. Check that all dynamical velocities have disappeared and that dimensions remain those of energy. The meaning of the resulting function, including when it is conserved and when it equals mechanical energy, will be examined after introducing its equations of motion.

Exercises

Hints and solutions are collected separately.

  1. 12.1 What must be checked before replacing velocities by momenta?

  2. 12.2 Construct HH for L=mx˙2/2−mgxL=m\dot x^2/2-mgx.

  3. 12.3 For L=Iθ˙2/2−U(θ)L=I\dot\theta^2/2-U(\theta) with constant I>0I>0, construct HH.

  4. 12.4 Why must a completed Hamiltonian contain no unresolved generalized velocities?

  5. 12.5 Construct HH for L=12a(q)q˙2−V(q)L=\tfrac12a(q)\dot q^2-V(q), a(q)>0a(q)>0.

  6. 12.6 For L=mq˙2/2+Bq˙−V(q)L=m\dot q^2/2+B\dot q-V(q) with constant BB, find pp and HH.

  7. 12.7 Invert p1=m(2q˙1+q˙2)p_1=m(2\dot q_1+\dot q_2), p2=m(q˙1+3q˙2)p_2=m(\dot q_1+3\dot q_2) and construct kinetic HH.

  8. 12.8 For x=q+Utx=q+Ut, prove H=p2/(2m)−UpH=p^2/(2m)-Up for a free particle.

  9. 12.9 For H=pr2/(2m)+pθ2/(2mr2)+V(r)H=p_r^2/(2m)+p_\theta^2/(2mr^2)+V(r), calculate HrH_r at fixed momenta.

  10. 12.10 Why is the Legendre construction not merely changing the sign of VV?

  11. 12.11 If m=3m=3, p=6p=6, k=2k=2, and x=2x=2 in SI units, find the spring Hamiltonian.

  12. 12.12 Explain why polar momentum coordinates fail at the origin although the free-particle problem is regular.

Reading progress is saved on this device.

Search the notes

Search all four units and the course references.