Mechanicsundergraduategraduate

The Hamiltonian (Legendre Transform)

Also known as: Hamiltonian function · Legendre transform of L

Swap each velocity for its momentum; what's left is (usually) the total energy as a function of position and momentum.

H(q,p,t)=ipiq˙iLH(q, p, t) = \sum_i p_i \dot{q}_i - L
Live simulation
warming up the physics…

Phase-space portrait: nested constant-H ellipses with a state point gliding along its own energy contour. T and V bars trade while H stays pinned. Sliders set m, k, and the energy.

Equivalent forms

H=T+V  (natural systems)H = T + V \;\text{(natural systems)}
H=p22m+V(q)H = \frac{p^2}{2m} + V(q)
The Legendre transform turns second-order equations into first-order flow on phase space — dynamics becomes geometry.