How Is the Lagrangian Derived in Classical Mechanics?
At a glance
- 1. Choose coordinates
Describe the system with generalized coordinates q and identify its kinetic and potential energies.
- 2. Form the action
For a conservative mechanical system, integrate L = T − V over time to define the action.
- 3. Vary the path
Compare nearby paths with the same endpoints and set the first variation of the action to zero.
- 4. Apply Euler–Lagrange
Use the resulting equations to recover the system’s equations of motion.
The Lagrangian is a function that packages a mechanical system’s dynamics into a form from which its equations of motion can be found. For many conservative systems, it is the kinetic energy minus the potential energy, . The derivation uses the stationary-action principle: the physical path makes the action stationary when compared with nearby paths that share the same endpoints.
This principle gives the Euler–Lagrange equations. For a particle in a potential, those equations reduce to Newton’s second law. The choice is standard and useful, but it is not a unique formula that applies unchanged to every physical system.
From the action to the Euler–Lagrange equation
Describe the system using a coordinate ; for multiple coordinates, apply the same steps to each . Define the action over a time interval from to as
where . Hamilton’s principle says that the actual path makes stationary under small variations that leave the endpoints fixed. “Stationary” means that the first-order change in is zero; it need not be a minimum.
To test this, replace the path by a nearby one, , where is small and . Differentiating the action with respect to at zero gives
Integrate the second term by parts. Its boundary term vanishes because the variation is zero at both endpoints:
Since the variation can be chosen freely between the endpoints, the expression in square brackets must vanish at every time. Thus
This is the Euler–Lagrange equation. With several coordinates, there is one such equation for each coordinate .
Why use ?
For a particle of mass moving in Cartesian coordinates under a time-independent conservative potential , set
Substituting this into the Euler–Lagrange equation for each Cartesian coordinate gives
or . The force from a potential is , so this is Newton’s second law, .
The minus sign between and is what makes the potential-energy gradient appear as a force. In generalized coordinates—such as an angle describing a pendulum—the same variational procedure works, even though the kinetic energy may have a more complicated expression.
Worked example: a mass on a spring
Take a mass attached to a spring with spring constant . Let be its displacement from equilibrium. Its energies are
so the Lagrangian is . Apply the Euler–Lagrange equation:
Dividing by gives , the familiar equation for simple harmonic motion. If the mass starts at with zero velocity, its motion is , where is measured in seconds. The angular frequency is .
What is—and is not—being derived
The variation calculation derives the Euler–Lagrange equations from the stationary-action principle. It does not prove that nature must obey that principle. In elementary mechanics, you can motivate the Lagrangian by checking that reproduces Newton’s laws for conservative forces; the action principle then provides a systematic way to obtain motion equations, including in complicated coordinates.
Nor is the Lagrangian unique. Adding the total time derivative of a function of coordinates and time, , changes the action only by endpoint terms when the endpoints are fixed, so it leaves the Euler–Lagrange equations unchanged. Multiplying the Lagrangian by a nonzero constant also leaves those equations unchanged. Different-looking Lagrangians can therefore describe the same motion.
Common mistakes
- Confusing Lagrangian and action: is evaluated at an instant; accumulates it over a time interval.
- Assuming every system uses only : Velocity-dependent interactions, electromagnetic forces, and nonconservative forces may require a more general Lagrangian or additional generalized-force terms.
- Treating stationarity as a guaranteed minimum: The physical path makes the action stationary, which can mean a minimum, maximum, or saddle point.
- Using ordinary Cartesian coordinates without checking constraints: Generalized coordinates can simplify a constrained system, but the kinetic energy and coordinate dependence must be expressed correctly.
For a standard conservative mechanical system, start with , choose coordinates suited to the constraints, and apply one Euler–Lagrange equation per coordinate. Check that the resulting equations have the expected units and, in simple Cartesian cases, agree with Newton’s laws.
References
- Classical Mechanics, Third Edition — Herbert Goldstein, Charles Poole, and John Safko
- Classical Mechanics — John R. Taylor
Spotted an error? Send a correction. Read how we write and check articles in our editorial policy.