The recipe
Every Lagrangian problem follows the same five moves. Master this loop and you can attack systems that would be a nightmare of coupled vector equations in the Newtonian picture.
- Choose generalized coordinates — as many as there are degrees of freedom, matched to the constraints.
- Write the kinetic energy T and potential energy V in those coordinates.
- Form the Lagrangian L=T-V.
- Apply the Euler-Lagrange equation once per coordinate.
- Solve or interpret the resulting equations of motion.
Worked example: the simple pendulum
A bob of mass m on a massless rod of length \ell. Coordinate: the angle \theta from vertical. Its speed is \ell\dot\theta, and its height, measured from the pivot, is -\ell\cos\theta. So the kinetic and potential energies are quick to write.
The pendulum's Lagrangian in the single coordinate \theta.
Now the Euler-Lagrange machine: \partial L/\partial\dot\theta = m\ell^2\dot\theta, whose time derivative is m\ell^2\ddot\theta; and \partial L/\partial\theta = -mg\ell\sin\theta. Setting the difference to zero gives the equation of motion.
The exact pendulum equation, and its small-angle limit — simple harmonic motion.
Worked example: the Atwood machine
Two masses m_1,m_2 hang from a light string over a frictionless pulley. The string's inextensibility is one constraint, so a single coordinate suffices: let x be how far m_1 has descended, so m_2 has risen by the same x. Both move with speed \dot x.
Kinetic energy of both masses, minus the (sign-tracked) gravitational potential.
One coordinate, one Euler-Lagrange equation: \tfrac{d}{dt}(m_1+m_2)\dot x = (m_1-m_2)g. The acceleration follows at once — and we never introduced the string tension that the Newtonian approach forces you to carry through two coupled equations.
The Atwood acceleration, derived without ever mentioning the tension.
Generalized momentum and the energy function
For each coordinate the quantity conjugate to it is the generalized momentum p_i=\partial L/\partial\dot q_i. Sometimes it is ordinary mv; for an angular coordinate it is angular momentum; in a magnetic field it acquires an extra piece. It is this generalized p, not mv, that the theory tracks.
The generalized (canonical) momentum conjugate to coordinate q_i.
There is also a natural energy-like quantity, the energy function (or Jacobi integral), h=\sum_i\dot q_i\,p_i-L. When L has no explicit time dependence, h is conserved; and when the coordinates are time-independent too, h equals the ordinary total energy T+V. This object is the seed of Hamiltonian mechanics.
The energy function — conserved when L has no explicit time dependence.