Physic Labs

Analytical mechanics

Generalized momentum and the Hamiltonian

Study the harmonic oscillator in the Hamiltonian picture: the surface H(q,p)=p2/(2m)+mω2q2/2H(q,p) = p^2/(2m) + m\omega^2 q^2/2 and its phase-space orbits. Verify that the level curve H=EH = E is an ellipse with qmax=2E/mω2q_{max} = \sqrt{2E/m\omega^2}, pmax=2mEp_{max} = \sqrt{2mE}.

Undergraduate

Equipment

  • «1. Mặt H(q, p)» canvas: the oscillator's 3D energy surface, rotatable by dragging or arrow keys
  • «2. Quỹ đạo trên mặt phẳng pha» canvas: the phase ellipse for one energy level
  • «Tần số góc ω» (angular frequency) slider, 50–200 rad/s
  • «Năng lượng E» (energy) slider, 20–180 J
  • Readouts «H(q,p)=…, ω=…, E=…» and «qmax = √(2E/mω²) = …; pmax = √(2mE) = …»

Procedure

  1. Read the Hamiltonian on the energy surface

    In section 1, move «Tần số góc ω» and «Năng lượng E» and read «H(q,p)=p²/(2m)+mω²q²/2; m=1 kg, ω=…, E=…». Rotate the surface by dragging to see its curvature grow with ω: the potential mω2q2/2m\omega^2q^2/2 steepens, and planes H = const cut the surface along ellipses.

  2. Measure the phase-ellipse semi-axes

    Go to section 2 and read «qmax = √(2E/mω²)» and «pmax = √(2mE)». Check yourself: at ω = 100 rad/s, E = 80 J (m = 1 kg) you should get qmax=2⋅80/1002=0.126q_{max} = \sqrt{2\cdot80/100^2} = 0.126 m and pmax=160=12.65p_{max} = \sqrt{160} = 12.65 kg·m/s. Compare with the ellipse extents on the canvas and record.

  3. Check the tangent flow of Hamilton's equations

    Watch the phase ellipse: at q = qmax, p = 0 and p˙=−mω2q<0\dot p = -m\omega^2 q < 0, so the state point moves downward; at p = pmax, q˙=p/m>0\dot q = p/m > 0, so it moves right — the orbit circulates clockwise in the (q, p) plane. Change ω and E: the ellipse rescales but the flow direction and H=EH = E are preserved.

  4. Predict the effect of ω and E

    Predict before sliding: doubling ω halves qmax but leaves pmax unchanged (it depends only on E); raising E scales both semi-axes by E\sqrt{E}. The ellipse area A=πqmaxpmax=2πE/ωA = \pi q_{max}p_{max} = 2\pi E/\omega — check by holding E, changing ω, and re-reading the two values: the product qmax·pmax must shrink exactly as 1/ω.

Simulation

Experiment history

In 1788 Joseph-Louis Lagrange published Mécanique analytique, restating mechanics through generalized coordinates q_i and conjugate momenta p_i = ∂L/∂q̇_i, without force diagrams. Adrien-Marie Legendre had already introduced (1787) the transform bearing his name, which swaps the independent variable from q̇ to p. In 1834–1835 William Rowan Hamilton wrote two memoirs «On a General Method in Dynamics», recasting Lagrange's second-order equations as 2n first-order equations q˙i=∂H/∂pi\dot q_i = \partial H/\partial p_i, p˙i=−∂H/∂qi\dot p_i = -\partial H/\partial q_i with H=∑piq˙i−LH = \sum p_i\dot q_i - L. When H has no explicit time dependence it is conserved and equals the energy — precisely the level surface H(q,p) = E shown in the simulation.

Related physicists

Related library topics