The Principle of Least Action
The most compact and powerful formulation of all of classical mechanics: nature chooses the path that makes the action \(S = \int L\,dt\) stationary. From this single principle, all equations of motion follow.
Historical Context
The variational approach to mechanics has a rich history stretching back centuries. Pierre de Fermat proposed in 1662 that light travels along the path of least time. Maupertuis extended this idea to mechanics in 1744, postulating a "principle of least action" (though his formulation was vague). Euler gave the first rigorous treatment the same year. It was Lagrange who, in his 1788 masterwork Mecanique Analytique, transformed the principle into a systematic method for solving all of mechanics.
Hamilton refined the principle in 1834-35, giving it the precise form we use today: the true trajectory is one for which the action functional is stationary (not necessarily a minimum — hence the more accurate name "principle of stationary action"). This formulation became the foundation for all of modern theoretical physics, from general relativity to quantum field theory.
1. The Action Functional
Consider a mechanical system described by generalized coordinates \(q_1, q_2, \ldots, q_n\). The Lagrangian is a function of these coordinates, their time derivatives, and possibly time itself:
\[L = L(q_1, \ldots, q_n, \dot{q}_1, \ldots, \dot{q}_n, t)\]
For most mechanical systems, the Lagrangian takes the simple form \(L = T - V\), where \(T\) is the kinetic energy and \(V\) is the potential energy. However, this is not the most general case — the Lagrangian for a charged particle in an electromagnetic field, for instance, involves velocity-dependent potentials.
The action is a functional — a map from the space of trajectories to the real numbers:
\[S[q] = \int_{t_1}^{t_2} L(q(t), \dot{q}(t), t)\,dt\]
The square bracket notation \(S[q]\) emphasizes that \(S\) depends on the entire trajectory \(q(t)\), not just a single value. Each possible path from \(q(t_1)\)to \(q(t_2)\) gives a different number for the action.
Key Insight: Functionals vs. Functions
A function maps numbers to numbers: \(f: \mathbb{R} \to \mathbb{R}\). A functional maps functions to numbers: \(S: \{\text{paths}\} \to \mathbb{R}\). The calculus of variations is the extension of ordinary calculus to functionals. Just as ordinary calculus finds extrema of functions by setting \(df = 0\), variational calculus finds extrema of functionals by setting \(\delta S = 0\).
2. Hamilton's Principle
Hamilton's principle (1834) is the precise statement of the variational formulation:
"Of all possible paths connecting \(q(t_1)\) to \(q(t_2)\), the physical trajectory is the one for which the action is stationary."
\[\delta S = 0\]
"Stationary" means that the first-order variation vanishes — the action is at a critical point, which could be a minimum, maximum, or saddle point. For sufficiently short time intervals, the true path is always a minimum, which justifies the historical name "least action." For longer intervals, the stationary path may be a saddle point (as happens for the harmonic oscillator after half a period).
Deriving the Variation
Let \(q(t)\) be the true path. Consider a nearby path \(q(t) + \varepsilon\,\eta(t)\), where \(\eta(t)\) is an arbitrary smooth function vanishing at the endpoints:\(\eta(t_1) = \eta(t_2) = 0\). The variation of the action is:
\[S[q + \varepsilon\eta] = \int_{t_1}^{t_2} L(q + \varepsilon\eta,\, \dot{q} + \varepsilon\dot{\eta},\, t)\,dt\]
Expanding to first order in \(\varepsilon\):
\[S[q + \varepsilon\eta] = S[q] + \varepsilon \int_{t_1}^{t_2} \left(\frac{\partial L}{\partial q}\eta + \frac{\partial L}{\partial \dot{q}}\dot{\eta}\right)dt + O(\varepsilon^2)\]
The first variation is the coefficient of \(\varepsilon\):
\[\delta S = \int_{t_1}^{t_2} \left(\frac{\partial L}{\partial q}\eta + \frac{\partial L}{\partial \dot{q}}\dot{\eta}\right)dt\]
3. Derivation of the Euler-Lagrange Equation
To extract the equation of motion from \(\delta S = 0\), we integrate the second term by parts. The key step:
\[\int_{t_1}^{t_2} \frac{\partial L}{\partial \dot{q}}\dot{\eta}\,dt = \left[\frac{\partial L}{\partial \dot{q}}\eta\right]_{t_1}^{t_2} - \int_{t_1}^{t_2} \frac{d}{dt}\frac{\partial L}{\partial \dot{q}}\,\eta\,dt\]
The boundary term vanishes because \(\eta(t_1) = \eta(t_2) = 0\). Substituting back:
\[\delta S = \int_{t_1}^{t_2} \left(\frac{\partial L}{\partial q} - \frac{d}{dt}\frac{\partial L}{\partial \dot{q}}\right)\eta\,dt = 0\]
Now comes the crucial argument: since \(\eta(t)\) is arbitrary, the only way this integral can vanish for all choices of \(\eta\) is if the integrand itself is identically zero. This is the fundamental lemma of the calculus of variations. Therefore:
The Euler-Lagrange Equation
\[\frac{d}{dt}\frac{\partial L}{\partial \dot{q}} - \frac{\partial L}{\partial q} = 0\]
For a system with \(n\) degrees of freedom, we get \(n\) such equations, one for each coordinate \(q_i\). This is the complete set of equations of motion, equivalent to Newton's second law but far more general.
Example: Free Particle
For a free particle in one dimension, \(L = \frac{1}{2}m\dot{x}^2\). Then:
\(\frac{\partial L}{\partial \dot{x}} = m\dot{x}\), \(\frac{\partial L}{\partial x} = 0\)
\(\Rightarrow \frac{d}{dt}(m\dot{x}) = 0 \Rightarrow m\ddot{x} = 0\)
The particle moves in a straight line at constant velocity — Newton's first law.
Example: Particle in a Potential
For \(L = \frac{1}{2}m\dot{x}^2 - V(x)\):
\(\frac{\partial L}{\partial \dot{x}} = m\dot{x}\), \(\frac{\partial L}{\partial x} = -V'(x)\)
\(\Rightarrow m\ddot{x} = -V'(x) = F(x)\) — Newton's second law.
4. Fermat's Principle for Light
The variational approach to mechanics was inspired by optics. Fermat's principle (1662) states that light travels between two points along the path that minimizes the optical path length (equivalently, the travel time):
\[\delta \int n(\mathbf{r})\,ds = 0\]
where \(n(\mathbf{r})\) is the index of refraction and \(ds\) is the arc length element. This is precisely a variational principle, and applying the Euler-Lagrange equation to it yields Snell's law of refraction as a direct consequence.
Derivation of Snell's Law
Consider light crossing a boundary between two media at \(y = 0\), with refractive indices \(n_1\) (above) and \(n_2\) (below). The light goes from point \(A = (0, a)\)to point \(B = (d, -b)\), crossing the boundary at \((x, 0)\). The optical path length is:
\[\text{OPL}(x) = n_1\sqrt{x^2 + a^2} + n_2\sqrt{(d-x)^2 + b^2}\]
Setting \(d(\text{OPL})/dx = 0\):
\[n_1 \frac{x}{\sqrt{x^2 + a^2}} = n_2 \frac{d-x}{\sqrt{(d-x)^2 + b^2}}\]
Recognizing \(\sin\theta_1 = x/\sqrt{x^2 + a^2}\) and \(\sin\theta_2 = (d-x)/\sqrt{(d-x)^2 + b^2}\):
\[n_1 \sin\theta_1 = n_2 \sin\theta_2\]
Snell's Law
5. Multiple Degrees of Freedom and the Brachistochrone
For \(n\) degrees of freedom, the action is:
\[S[q_1, \ldots, q_n] = \int_{t_1}^{t_2} L(q_1, \ldots, q_n, \dot{q}_1, \ldots, \dot{q}_n, t)\,dt\]
The variation with respect to each \(q_i\) independently gives \(n\) coupled Euler-Lagrange equations:
\[\frac{d}{dt}\frac{\partial L}{\partial \dot{q}_i} - \frac{\partial L}{\partial q_i} = 0, \quad i = 1, 2, \ldots, n\]
The Brachistochrone Problem
One of the most famous problems in the calculus of variations: find the curve connecting two points along which a bead slides (frictionlessly, under gravity) in the shortest time. Johann Bernoulli posed this challenge in 1696, and its solution — a cycloid — demonstrated the power of variational methods.
Using energy conservation, the speed at height \(y\) (measured downward) is \(v = \sqrt{2gy}\). The time functional is:
\[T[y] = \int_0^{x_f} \frac{\sqrt{1 + y'^2}}{\sqrt{2gy}}\,dx\]
Since the integrand does not depend on \(x\) explicitly, we can use the Beltrami identity (a special case of the Euler-Lagrange equation):
\[f - y'\frac{\partial f}{\partial y'} = C \quad \Rightarrow \quad \frac{1}{\sqrt{2gy(1 + y'^2)}} = C\]
The solution is a cycloid: \(x = a(\theta - \sin\theta)\), \(y = a(1 - \cos\theta)\).
6. Least Action vs. Stationary Action
A subtle but important point: \(\delta S = 0\) means the action is stationary, not necessarily minimal. To determine whether a stationary path is a true minimum, we must examine the second variation \(\delta^2 S\).
For the harmonic oscillator \(L = \frac{1}{2}m(\dot{x}^2 - \omega^2 x^2)\), the classical path from \(x(0) = 0\) to \(x(T) = 0\) is \(x(t) = 0\). But if\(T > \pi/\omega\), this path is no longer a minimum of the action — it becomes a saddle point. The time \(T = \pi/\omega\) is called a conjugate point, and its existence is related to the Morse index theorem.
Despite this subtlety, the equations of motion derived from \(\delta S = 0\) are always correct. The distinction between minimum and saddle point is important for the path integral formulation of quantum mechanics, where one sums over all paths weighted by \(e^{iS/\hbar}\).
Python Simulation: Comparing Paths and Their Actions
This simulation compares the action for different trial trajectories of a particle in a gravitational field. The true (parabolic) path has the minimum action, while nearby paths all have larger action values. We also compute the brachistochrone (cycloid) and compare it to a straight-line path.
Action Principle: Comparing Paths and the Brachistochrone
PythonClick Run to execute the Python code
Code will be executed with Python 3 on the server
7. Deeper Connections
Path Integrals (Quantum)
In Feynman's path integral formulation, the quantum amplitude to go from A to B is a sum over all paths, each weighted by \(e^{iS[q]/\hbar}\). In the classical limit \(\hbar \to 0\), the sum is dominated by the path of stationary action — recovering Hamilton's principle.
Field Theory
The action principle extends naturally to fields: \(S[\phi] = \int \mathcal{L}(\phi, \partial_\mu \phi)\,d^4x\). The Euler-Lagrange equations become the field equations of motion. This is the starting point for all of modern particle physics.
General Relativity
Einstein's field equations follow from the Einstein-Hilbert action\(S = \int R\sqrt{-g}\,d^4x\), where \(R\) is the Ricci scalar. The variational principle \(\delta S = 0\) yields the complete theory of gravity.
Optimal Control
The Pontryagin maximum principle in control theory is a direct generalization of the principle of stationary action. The "cost functional" in control theory plays the role of the action, and the optimal control law comes from an Euler-Lagrange-like equation.
Summary
- The action \(S = \int L\,dt\) is a functional that assigns a number to each possible trajectory.
- Hamilton's principle: the physical path makes the action stationary, \(\delta S = 0\).
- Integrating by parts and using the fundamental lemma of calculus of variations yields the Euler-Lagrange equation.
- Fermat's principle for light is a special case; Snell's law follows as a consequence.
- The brachistochrone problem demonstrates the power of variational methods.
- The action is stationary, not necessarily minimal — the distinction matters for conjugate points and quantum mechanics.