JOVANA
Explore Library Glossary Getting Started Three Levels Fields How it works Mission
Join the mission
All guides

Building and Solving Lagrangians

The five-step recipe in action: solve the pendulum and the Atwood machine, meet generalized momentum, and see the constraint forces disappear.

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.

  1. Choose generalized coordinates — as many as there are degrees of freedom, matched to the constraints.
  2. Write the kinetic energy T and potential energy V in those coordinates.
  3. Form the Lagrangian L=T-V.
  4. Apply the Euler-Lagrange equation once per coordinate.
  5. Solve or interpret the resulting equations of motion.

Worked example: the simple pendulum

One coordinate, the swing angle \theta, fully describes the simple pendulum. The rod's tension is a constraint we will never have to write down.

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.

T = \tfrac12 m\ell^2\dot\theta^2, \quad V = -mg\ell\cos\theta \;\Rightarrow\; L = \tfrac12 m\ell^2\dot\theta^2 + mg\ell\cos\theta

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.

\ddot\theta = -\frac{g}{\ell}\sin\theta \;\xrightarrow{\;\theta\ll 1\;}\; \ddot\theta \approx -\frac{g}{\ell}\,\theta,\quad \omega=\sqrt{g/\ell}

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.

L = \tfrac12(m_1+m_2)\dot x^2 + (m_1-m_2)g\,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.

a = \ddot x = \frac{(m_1-m_2)\,g}{m_1+m_2}

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.

p_i = \frac{\partial L}{\partial \dot q_i}

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.

h = \sum_i \dot q_i\,\frac{\partial L}{\partial \dot q_i} - L

The energy function — conserved when L has no explicit time dependence.