Lagrangian mechanics gives you a systematic way to turn a mechanics description into equations of motion. This guide explains how to choose generalized coordinates, construct the Lagrangian, apply the Euler–Lagrange equation, and check solutions for pendulums, coupled oscillators, central-force motion, and rolling systems.
Overview
The central quantity in Lagrangian mechanics is the Lagrangian, defined for many ordinary mechanical systems as
L(qi, ˙qi, t) = T - V,
where T is kinetic energy, V is potential energy, qi are generalized coordinates, and ˙qi are their time derivatives. The equations of motion follow from the Euler–Lagrange equation:
d/dt (∂L/∂˙qi) - ∂L/∂qi = 0.
A generalized coordinate is any variable that uniquely specifies the configuration of the system while already respecting its constraints. It may be a Cartesian position, an angle, a radial distance, or a combination of these. The best coordinate choice is usually the one that describes the motion with the fewest independent variables and makes the energy expressions simple.
This approach is especially useful when forces are difficult to resolve into components, when constraints are present, or when several bodies interact. Unlike a direct Newtonian treatment, you do not need to calculate every constraint force explicitly. The constraint is built into the coordinates or added with a multiplier.
Before beginning, separate the modeling assumptions from the algebra. Decide whether surfaces are frictionless, whether strings remain taut and massless, whether motion is small-angle, and whether the potential energy includes gravity, springs, or another interaction. For a broader problem-solving routine involving diagrams, units, and uncertainty, see How to Solve Physics Problems.
Checklist by scenario
Core workflow for any Lagrangian problem
- Describe the configuration. Draw the system and identify fixed points, moving bodies, geometric constraints, and allowed motions.
- Count degrees of freedom. Determine how many independent coordinates are needed after constraints are applied.
- Choose generalized coordinates. Prefer coordinates that follow the motion naturally, such as an angle for a pendulum or a radius and angle for planar central-force motion.
- Write positions in terms of those coordinates. This step prevents hidden dependencies from being missed when calculating velocity.
- Calculate kinetic energy. Find each velocity by differentiating the position with respect to time, then add the kinetic energies of all bodies.
- Choose a potential-energy reference. Only differences in potential energy matter, so set the zero where it makes the algebra convenient.
- Form L = T - V. Keep coordinates, velocities, and constants clearly separated.
- Apply one Euler–Lagrange equation per coordinate. Differentiate before simplifying aggressively.
- Insert initial or boundary conditions. The equations determine possible motion; initial values select a particular solution.
- Check the result. Test units, signs, limiting cases, conservation laws, and the number of equations against the number of coordinates.
Reference table: coordinates, constraints, and energy terms
| System or choice | Typical coordinate | Kinetic-energy term | Potential-energy term | Useful constraint or assumption |
|---|---|---|---|---|
| Free particle in one dimension | x | 1/2 m ˙x2 | V(x), or 0 if force-free | No geometric constraint |
| Simple pendulum | θ | 1/2 m l2 ˙θ2 | mgl(1 - cos θ) | Mass remains a fixed distance l from the pivot |
| Planar central-force motion | r, φ | 1/2 m(˙r2 + r2˙φ2) | V(r) | Force depends only on distance from the center |
| Two coupled masses and springs | x1, x2 | 1/2 m1˙x12 + 1/2 m2˙x22 | Spring terms in relative extensions | Motion restricted to one line |
| Rolling disk or cylinder | x, θ, or one coordinate | 1/2 M˙x2 + 1/2 I˙θ2 | Mg y(x), if height changes | Pure rolling: x = Rθ and ˙x = R˙θ |
Example 1: simple pendulum
For a bob of mass m attached to a massless rod of fixed length l, use the angle θ from the downward vertical. Its speed is l˙θ, so
T = 1/2 ml2˙θ2, V = mgl(1 - cos θ).
Therefore L = 1/2 ml2˙θ2 - mgl(1 - cos θ). Applying the Euler–Lagrange equation gives
ml2&ddot;θ + mgl sin θ = 0, or &ddot;θ + (g/l) sin θ = 0.
For small oscillations, replace sin θ with θ to obtain &ddot;θ + (g/l)θ = 0. State this approximation explicitly; it is not valid for arbitrarily large angles.
Example 2: two coupled oscillators
Consider two masses m connected in a line by three identical springs of constant k: a wall, the first mass, the second mass, and another wall. Let x1 and x2 be displacements from equilibrium. The kinetic energy is
T = 1/2 m˙x12 + 1/2 m˙x22.
The potential energy is
V = 1/2 kx12 + 1/2 k(x2 - x1)2 + 1/2 kx22.
The resulting equations are
m&ddot;x1 + 2kx1 - kx2 = 0,
m&ddot;x2 + 2kx2 - kx1 = 0.
To find normal modes, try xi = Ai cos(ωt + δ). Substitution produces a matrix equation. Nonzero amplitudes require the determinant to vanish, which gives the allowed normal frequencies. The two modes correspond to in-phase and out-of-phase motion.
Example 3: central-force motion
For a particle moving in a plane under a potential V(r), use polar coordinates r and φ. The Lagrangian is
L = 1/2 m(˙r2 + r2˙φ2) - V(r).
Because φ does not appear explicitly in L, it is a cyclic coordinate. Its conjugate momentum is conserved:
pφ = ∂L/∂˙φ = mr2˙φ = constant.
This is conservation of angular momentum. The radial equation can be expressed using an effective potential, which separates radial motion from the angular contribution. This coordinate choice is usually clearer than resolving the force into changing Cartesian components.
Example 4: rolling without slipping
For a rigid body of mass M and moment of inertia I rolling down an incline, one may begin with x and θ, then impose the no-slip constraint x = Rθ. A convenient reduced coordinate is x, giving
T = 1/2 M˙x2 + 1/2 I(˙x/R)2.
If the vertical height is y(x), then V = Mgy(x). Applying the Euler–Lagrange equation to x includes both translational and rotational inertia. The static friction force need not be found first because it does no work in ideal rolling and the geometric constraint has already related the motions. If slipping occurs, this model must be changed; kinetic friction is dissipative and cannot be represented by the same simple conservative L = T - V alone.
What to double-check
- Coordinate independence: Do the chosen coordinates actually vary independently? Do not treat x and θ as independent after imposing x = Rθ.
- Velocity calculation: Differentiate the complete position vector. In polar coordinates, the term r2˙φ2 is easy to omit.
- Potential-energy signs: Gravitational potential increases with height. A different zero is harmless, but a reversed change with height changes the force.
- Dimensions: L, T, and V must all have units of energy. Every term in an Euler–Lagrange equation must have compatible units.
- Conservation laws: If time does not appear explicitly in L, energy is conserved. If a coordinate is absent from L, its conjugate momentum is conserved. Compare these results with the physical symmetry of the system. The conservation-law method is also useful for checking an independent solution.
- Boundary and initial conditions: A pendulum may be specified by θ(0) and ˙θ(0); a static variational problem instead may specify coordinates at two endpoints. Do not substitute one type for the other.
- Approximations: Small-angle, small-displacement, rigid-body, massless-string, and no-slip assumptions each have a range of validity. Record them beside the derivation and test limiting cases.
For calculations based on measured parameters, propagate uncertainty through the final quantity rather than reporting more precision than the inputs support. The guide to uncertainty propagation provides a useful companion checklist.
Common mistakes
- Using too many coordinates: Extra variables create redundant equations or require constraint forces. Eliminate holonomic constraints where practical.
- Using the wrong potential: The expression V = mgh applies to a uniform gravitational field near a reference level, not automatically to every gravitational problem.
- Confusing L with total energy: The Lagrangian is T - V, whereas the conserved mechanical energy for a time-independent conservative system is typically T + V.
- Expanding before checking structure: Keep expressions factored long enough to see symmetries, cyclic coordinates, and coupled terms.
- Forgetting generalized forces: Friction, driving, and damping may require nonconservative generalized forces on the right-hand side of the Euler–Lagrange equation.
- Trusting computer algebra without a model check: A symbolic package can differentiate and simplify an expression, but it cannot decide whether the coordinate choice, sign convention, or physical assumption is correct. Use software to verify algebra, then inspect the output by hand.
A reliable computer-algebra workflow is to define symbols and functions, construct T and V separately, form L, calculate the two Euler–Lagrange terms, simplify their difference, and substitute a simple limiting case. Keep the unsimplified expression in your notes so that a later sign error can be traced.
When to revisit
Return to this checklist whenever you start a new analytical-mechanics assignment, change coordinate systems, add a constraint, or compare a Lagrangian derivation with a Newtonian solution. Revisit the model before applying a small-angle or no-slip approximation, and again after obtaining a numerical or symbolic result.
For a practical final pass, use this sequence:
- Draw the configuration and write down every assumption.
- Count degrees of freedom and choose the smallest complete coordinate set.
- Write positions, velocities, T, V, and L on separate lines.
- Derive one Euler–Lagrange equation for each coordinate.
- Apply initial or boundary conditions only after the governing equations are clear.
- Check units, signs, limiting behavior, conservation laws, and numerical scales.
- Compare with a second method or a special case when the system is complicated.
Keep the derivation and its assumptions together. That habit makes the solution easier to audit, easier to adapt when the physical setup changes, and more useful as a reusable physics study guide.