Calculus of Variations

Lagrangian and Hamiltonian mechanics

/ la-GRAHN-jee-un, ham-il-TOH-nee-un /

Lagrangian and Hamiltonian mechanics are two reformulations of Newtonian dynamics that grow directly out of the calculus of variations. Instead of tracking vector forces, you describe a whole system by scalar energy functions and let an extremal principle do the work. They are not new physics — for ordinary mechanics they give exactly the same motions as Newton — but they are vastly more powerful for complicated systems, and they are the language in which modern physics is actually written.

Lagrangian mechanics starts from the Lagrangian L = T - V (kinetic minus potential energy), written in any convenient generalized coordinates q. Hamilton's principle, delta S = 0 for S = integral of L dt, yields the Euler-Lagrange equations of motion, here called Lagrange's equations: d/dt of (dL/dq') = dL/dq for each coordinate. Hamiltonian mechanics then performs a change of variables, a Legendre transform, replacing the velocities q' by momenta p = dL/dq' and replacing L by the Hamiltonian H = (sum of p q') - L, which for standard systems equals the total energy T + V. The single second-order Lagrange equation splits into a pair of clean first-order equations: q' = dH/dp and p' = -dH/dq, called Hamilton's canonical equations.

Why bother with two reformulations? The Lagrangian view makes constraints and symmetries transparent — choose coordinates that respect the constraints and the unwanted forces vanish, and every continuous symmetry of L yields a conservation law by Noether's theorem. The Hamiltonian view, working in phase space (positions and momenta together), exposes the geometric structure of dynamics, drives statistical mechanics and chaos theory, and is the launching pad for quantum mechanics, where the Hamiltonian becomes the energy operator. The honest scope: these methods assume the forces derive from a potential (or are otherwise expressible in the Lagrangian); genuinely dissipative forces like sliding friction need extra machinery and are not captured by a plain L = T - V.

For a pendulum of length l and angle theta, L = (1/2) m l^2 theta'^2 + m g l cos(theta). Lagrange's equation gives theta'' + (g/l) sin(theta) = 0. The momentum is p = m l^2 theta', and the Hamiltonian H = p^2/(2 m l^2) - m g l cos(theta) is the conserved total energy.

One scalar Lagrangian generates the pendulum's equation; its Legendre transform gives the energy.

H equals the total energy T + V only for standard 'natural' systems (kinetic energy quadratic in velocities, potential velocity-independent, no explicit time). In general H is the Legendre transform of L, which need not be the energy.

Also called
analytical mechanics分析力学分析力學