Physics · Article
The Euler–Lagrange equations
Use a constant-force particle to turn an energy-based description into a local equation, then test a second path that fits the endpoints but fails that equation.
Previous article: The principle of stationary action
Back to PhysicsAfter reading, you can
- Calculate position and velocity partial derivatives while holding the other arguments fixed.
- Apply d/dt(∂L/∂v) − ∂L/∂x = 0 with compatible units in one Cartesian model.
- Distinguish a momentum from its time rate and a calculated residual from an applied force.
- Explain the fixed-endpoint variation and regularity behind the local equation.
- Write separate equations for independent coordinates and state what data are still needed.
One particle under a supplied constant force
Supply a classical model on a fixed inertial coordinate line, with right positive: a point particle has constant mass m = 2 kg and force F = +4 N. Position x is a length; velocity v = dx/dt is its time rate; acceleration a = dv/dt is the rate of velocity change. The supplied Newtonian equation ma = F gives a = +2 m/s².
Choose x(0) = 0.5 m and v(0) = 1 m/s. Over 0 ≤ t ≤ 2 s the model’s history is xₐ(t) = 0.5 m + (1 m/s)t + (1 m/s²)t², with vₐ(t) = 1 m/s + (2 m/s²)t. It ends at xₐ(2 s) = 6.5 m. These exact supplied values will let us check another way of expressing the same equation.
The first checks use simple polynomial rates. Published derivative and integral preparation supports the later derivation; the small model and its graph can be read first. The needed energy and variation notation is introduced below.
Write one energy-based function
Kinetic energy is K = mv²/2 for this constant-mass classical particle. A conservative force can be represented by a position potential V with F = −dV/dx. For our supplied constant F, choose V(x) = −Fx, with zero at x = 0. The Lagrangian is L(x, v) = K − V = mv²/2 + Fx. Both terms have units J; mechanical energy would use K + V.
L takes a position and a velocity as separate arguments. Along a history, substitute x(t) and v(t) = dx/dt. The action is S[x] = ∫₀ᵀ L(x(t), v(t), t)dt, with units J s. We have written the possible explicit time argument for the general notation; our current L has none.
Stationary action means that the first-order action change is zero for every allowed small change of the history with endpoint positions and endpoint times fixed. It does not mean that action is always a minimum. Below we use that condition to obtain an equation that can be checked at each time.
Take partial derivatives, then follow the history
The symbol ∂ marks a partial derivative: change one argument of L while holding the others fixed. For ∂L/∂v, keep x and any explicit t fixed. Differentiating the quadratic velocity term gives ∂L/∂v = mv; the Fx term contributes zero. For ∂L/∂x, hold v and t fixed: ∂L/∂x = F.
In this Cartesian constant-mass example, mv is momentum p and has units kg m/s. Now take the ordinary time derivative along the chosen history: d/dt(∂L/∂v) = d(mv)/dt = ma, with units N. The position partial ∂L/∂x also has units J/m = N. These two compatible quantities can be equated.
The Euler–Lagrange equation for x is d/dt(∂L/∂v) − ∂L/∂x = 0. Here it is simply ma − F = 0. Holding v fixed in a partial derivative does not say that v stays constant during motion; the subsequent time derivative follows its actual time dependence.
Check a history with a local residual
Define R(t) = d/dt(∂L/∂v) − ∂L/∂x evaluated on a candidate history. A history satisfies this local equation when R(t) = 0 throughout the interior of the interval. For our smooth polynomials, their one-sided endpoint values extend continuously too. R is a calculated equation residual, not an extra interaction applied to the particle.
For xₐ, the momentum rate is (2 kg)(2 m/s²) = 4 N and the position partial is 4 N, so Rₐ = 0. Now try xᵦ(t) = 0.5 m + (2 m/s)t + (0.5 m/s²)t² over the same interval. It has the same positions at 0 and 2 s, but vᵦ = 2 m/s + (1 m/s²)t and aᵦ = 1 m/s². Thus Rᵦ = (2 kg)(1 m/s²) − 4 N = −2 N.
The second history fits the endpoints and is smooth, so it is allowed in a fixed-endpoint variation comparison. It is not a motion of this supplied force model. Its initial velocity is also 2 m/s, rather than the selected 1 m/s. Fixing endpoint positions for comparison does not fix initial trial velocity.
Read the path and residual together
The upper plot draws both exact position histories over 0 to 2 s. A solid line and circles identify xₐ; a dashed line and squares identify xᵦ. Shared endpoint diamonds show the common positions. The intermediate positions differ, although both paths fit the same start and finish.
The lower plot has the same time axis but a different vertical quantity: R in N, from −3 to +1 N. The xₐ series stays at zero; the xᵦ series stays at −2 N. A nonzero residual diagnoses failure of the equation, rather than uncertainty, a measured discrepancy or another force arrow. The table gives exact values.
The position curves are exact quadratic drawings within the labeled 0 to 7 m window. Their construction controls are not sampled observations. Selected markers and the residual lines come from the stipulated model; there are no measured data or unshown extrapolations.
xₐ: equation-satisfying history; solid line and circles
xᵦ: endpoint-fitting trial; dashed line and squares
Shared endpoint positions: diamonds
m = 2 kg; F = +4 N; V(x) = −Fx; 0 ≤ t ≤ 2 s
d/dt(∂L/∂v) − ∂L/∂x = 0
R = d/dt(∂L/∂v) − ∂L/∂x; Rₐ = 0 N; Rᵦ = −2 N
| t (s) | xₐ (m) | xᵦ (m) | Rₐ (N) | Rᵦ (N) |
|---|---|---|---|---|
| 0 | 0.5 | 0.5 | 0 | −2 |
| 0.5 | 1.25 | 1.625 | 0 | −2 |
| 1 | 2.5 | 3 | 0 | −2 |
| 1.5 | 4.25 | 4.625 | 0 | −2 |
| 2 | 6.5 | 6.5 | 0 | −2 |
How fixed-endpoint variation gives the equation
For this derivation, let L(x, v, t) have continuous partial derivatives through second order near the histories being compared, and let x(t) be twice continuously differentiable on a finite fixed interval. Choose xε(t) = x(t) + εη(t), where ε is dimensionless and η has position units, is continuously differentiable, and satisfies η(0) = η(T) = 0. Then the velocity change is εη′(t), where η′ = dη/dt.
Write Lₓ = ∂L/∂x and Lᵥ = ∂L/∂v, evaluated along x(t). Differentiating the action with respect to ε at zero gives δS = ∫₀ᵀ[Lₓη + Lᵥη′]dt. Here δS names the first-variation coefficient, with units J s. Position and velocity changes are related by η′; they are not independent functions that can be set separately.
Integration by parts follows from the product rule d(Lᵥη)/dt = (dLᵥ/dt)η + Lᵥη′. After accumulating in time, δS = [Lᵥη]₀ᵀ + ∫₀ᵀ[Lₓ − dLᵥ/dt]η dt. The bracket is the final endpoint value minus the initial one. It vanishes because η is zero at both endpoints, not because momentum must vanish there.
Stationarity requires the remaining integral to be zero for every allowed η. If its continuous coefficient had a nonzero value at an interior time, it would retain a strict sign in a small nearby interval. A smooth nonnegative η confined to that interval would make the integral nonzero. Therefore Lₓ − dLᵥ/dt = 0 throughout the interior, which is the Euler–Lagrange equation. Conversely, that equation makes this first variation zero under the stated regularity and boundary conditions. It establishes stationarity, not a minimum.
One equation for each independent coordinate
For independent coordinates q₁, q₂, … with a suitable smooth L(q₁, q₂, …, q̇₁, q̇₂, …, t), the same argument allows each coordinate to vary separately. It gives d/dt(∂L/∂q̇ᵢ) − ∂L/∂qᵢ = 0 for each i. A dot means a time derivative. The other coordinates, velocities and explicit time stay fixed when taking each partial.
For a concrete two-dimensional Cartesian example, supply L = m(vₓ² + vᵧ²)/2 − ky²/2 with m = 2 kg and k = 8 N/m. The independent length coordinates x and y give m aₓ = 0 and m aᵧ = −ky. At y = 0.5 m, aₓ = 0 and aᵧ = −2 m/s². This is a local model check, not a complete trajectory without initial data.
The interpretation ∂L/∂v = ordinary momentum belongs to our Cartesian kinetic-energy form. Other coordinate choices require their own quantity interpretation; every equation must still compare compatible units. Independence of the coordinates and valid allowed variations must be justified before applying the separate-coordinate argument to a constrained system.
Supply data and keep the model scoped
An equation of motion does not itself supply initial position and velocity. In our constant-force case those chosen data select xₐ. Other data give other histories satisfying the same local equation. A boundary-value problem instead specifies endpoint conditions; existence and uniqueness need their own conditions, so they are not guaranteed by writing the Euler–Lagrange equations.
Our physical examples use positive constant masses, inertial Cartesian coordinates and smooth conservative potentials. Friction, more general applied forces, fields or relativistic motion need the appropriate formulation. Simply inserting an arbitrary force into a position potential, or dropping reactions from an arbitrary constraint, is not a general method.
Use the equations as a workflow: state the model and data, identify independent arguments, take the partials, then take the time derivative and check units and boundaries. The next lesson, Noether’s theorem and conserved quantities, studies how specified continuous symmetries relate to conservation under suitable action assumptions.
Worked examples
Momentum and its time rate at 1 s
For the supplied history xₐ, find the momentum at t = 1 s, its time rate, and the Euler–Lagrange residual.
- The velocity is 1 m/s + (2 m/s²)(1 s) = 3 m/s. Thus p = mv = (2 kg)(3 m/s) = 6 kg m/s.
- Differentiate p(t) = (2 kg)[1 m/s + (2 m/s²)t] in time: dp/dt = 4 N. Do not substitute the momentum value itself for this rate.
- The position partial is ∂L/∂x = F = 4 N. Subtract compatible terms: R = 4 N − 4 N = 0.
p = 6 kg m/s; dp/dt = 4 N; R = 0. Momentum and its time rate have different units and meanings.
Fitting endpoints does not satisfy the equation
Check xᵦ(t) at the endpoints and at t = 1 s, then test the local equation.
- At t = 0 the position is 0.5 m. At 2 s it is 0.5 m + 4 m + 2 m = 6.5 m. At 1 s it is 3 m, while xₐ is 2.5 m.
- Differentiating gives vᵦ = 2 m/s + (1 m/s²)t and aᵦ = 1 m/s². Therefore d/dt(∂L/∂v) = maᵦ = 2 N.
- The supplied position partial remains 4 N; it does not change to accommodate our trial. Hence Rᵦ = 2 N − 4 N = −2 N at every time in the interval.
Both endpoints fit, but the residual is −2 N. This smooth comparison history fails the supplied equation.
Use a different potential in a spring model
Supply m = 3 kg, k = 12 N/m and L = mv²/2 − kx²/2. At an instant x = 0.25 m and v = −0.5 m/s, what acceleration does the Euler–Lagrange equation require?
- Hold v fixed when taking the position partial: ∂L/∂x = −kx = −3 N. Hold x fixed when taking the velocity partial: ∂L/∂v = mv, which is −1.5 kg m/s at this instant.
- The time derivative of that velocity partial is ma, not its instantaneous momentum value. The equation requires (3 kg)a = −3 N.
- Divide by the stated positive mass to obtain a = −1 m/s². The given negative velocity and negative acceleration happen to have the same sign here; the acceleration came from the potential and position, not from the velocity sign alone.
a = −1 m/s². The position partial is −3 N; the instantaneous momentum is −1.5 kg m/s.
Try it yourself
In the main constant-force model, what are ∂L/∂v and d/dt(∂L/∂v) at t = 1 s?
Show the answer and reasoning
∂L/∂v = 6 kg m/s; d/dt(∂L/∂v) = 4 N.
The first is mv with v = 3 m/s; the second is ma with a = 2 m/s². A value and its time rate must not be interchanged.
A candidate for the same 2 kg, +4 N model has acceleration +3 m/s² at an interior time. What is R there, and does it satisfy the equation?
Show the answer and reasoning
R = +2 N; it does not satisfy the equation at that time.
ma − F = (2 kg)(3 m/s²) − 4 N = 2 N. A single nonzero interior residual is enough to reject that candidate as a solution over the whole interval.
The trial xᵦ has initial velocity 2 m/s rather than xₐ’s 1 m/s. Does this alone make it inadmissible in the fixed-position-endpoint variation comparison?
Show the answer and reasoning
No. That comparison fixes endpoint positions and times, not endpoint velocities.
The trial’s endpoints fit and it is smooth. It remains different from the initial-value solution selected by x(0) = 0.5 m and v(0) = 1 m/s, and its nonzero residual separately shows model failure.
For the 3 kg spring model with k = 12 N/m, what position partial and required acceleration occur at x = −0.25 m?
Show the answer and reasoning
∂L/∂x = +3 N and a = +1 m/s².
−kx = −(12 N/m)(−0.25 m) = +3 N. The local equation ma = −kx gives a = +1 m/s², toward the equilibrium position from this side.
Why may [Lᵥη]₀ᵀ be removed in the derivation? Would the same reason apply to a constant nonzero endpoint shift?
Show the answer and reasoning
η is zero at both endpoints. A constant nonzero shift does not meet that condition.
Neither zero momentum nor zero endpoint velocity was assumed. Changing endpoint positions changes the variational problem and its boundary term; the fixed-endpoint argument cannot simply be reused.
Use the two-coordinate model with m = 2 kg, k = 8 N/m and y = 0.5 m. Find aₓ and aᵧ. Does this determine a complete trajectory without more data?
Show the answer and reasoning
aₓ = 0 and aᵧ = −2 m/s². Initial or other suitable boundary data are still needed.
The x position partial is zero; the y partial is −ky = −4 N. Divide each by 2 kg. These local equations do not supply the missing positions and velocities.
What to carry forward
- Take partial derivatives while holding the other Lagrangian arguments fixed, then take the ordinary time derivative along the history.
- For the selected Cartesian constant-mass form, the equation compares momentum rate with a force-sized position partial.
- A smooth path can fit both endpoints and still have a nonzero Euler–Lagrange residual.
- The local equation follows from all allowed fixed-endpoint variations under explicit regularity; stationarity does not establish a minimum.
- Independent coordinates, compatible units, physical model scope and sufficient data remain essential.
References
Sources for the concepts and teaching approaches in this article.
- La fuerza de la matemática en movimiento: MecánicaViviana Alejandra Díaz · Universidad Nacional del Sur · 2019 course notesCourse notes · PDF§5.1: El principio de Hamilton — Euler–Lagrange derivation
- Advanced Classical MechanicsIain W. Stewart · Massachusetts Institute of Technology · 2016 notes for Classical Mechanics IIICourse notes · PDF§1.5 Calculus of Variations & Lagrange Multipliers: fixed-endpoint derivation§1.2 Lagrangian & Hamiltonian Mechanics: notation and scope