09.02.02 · classical-mech / lagrangian

Euler-Lagrange equations

draft3 tiersLean: nonepending prereqs

Anchor (Master): Arnold, *Mathematical Methods of Classical Mechanics*, 2nd ed. (1989), §12; Landau & Lifshitz, *Mechanics*, 3rd ed. (1976), §1–3

Intuition [Beginner]

In the previous unit 09.02.01 pending you saw the action principle: nature picks the path that makes stationary. But "stationary" is a condition on the whole path — how do you actually find such a path? The Euler-Lagrange equations are the answer. They are a set of differential equations that every stationary-action path must satisfy. Solve them (with the right boundary conditions) and you have the physical trajectory.

Think of it this way. The action principle is the goal ("find the path with stationary "). The Euler-Lagrange equations are the recipe for achieving that goal. You write down the Lagrangian in whatever coordinates you like, plug it into the Euler-Lagrange equation, and out come the equations of motion — no force diagrams required.

The Euler-Lagrange equation for one coordinate reads: take the slope of with respect to (velocity), differentiate that in time, and subtract the slope of with respect to (position). Set the result to zero. Using subscript notation for "slope of with respect to":

For each generalised coordinate you have one such equation. A system with three degrees of freedom gives three coupled second-order differential equations.

Here is the key insight that makes this powerful: the Euler-Lagrange equations give the correct equations of motion in any coordinate system. Newton's requires Cartesian components or careful resolution of forces. The Euler-Lagrange equations require only that you write in your chosen coordinates and turn the crank.

Consider a simple pendulum: a mass on a rigid rod of length , swinging under gravity. In Cartesian coordinates you would need the tension force (unknown!) and two equations coupled by the constraint . In the angular coordinate , the Lagrangian is . One equation of motion, one unknown, no constraint forces. The Euler-Lagrange equation handles the constraint automatically because the coordinate already respects it.

The quantity (the slope of with respect to velocity) is called the conjugate momentum (or generalised momentum). For , this gives — ordinary momentum. But in general need not equal mass times velocity. When depends on and through an electromagnetic potential, the conjugate momentum picks up a vector-potential term.

If does not depend on a particular coordinate — that coordinate is called cyclic — then the Euler-Lagrange equation for reduces to , meaning the conjugate momentum is conserved. Conservation laws fall out of the coordinate structure of with no extra work.

Visual [Beginner]

Figure: A simple pendulum drawn in two panels. Left panel: Cartesian coordinates with the tension force drawn along the rod and gravity pointing down — two equations coupled by the constraint , with the unknown tension as an extra variable. Right panel: the same pendulum described by the single angle from vertical — one coordinate, one Euler-Lagrange equation, no constraint force needed. An arrow connects the two panels labelled "coordinate choice eliminates the constraint." Below, the Euler-Lagrange equation for is written out, with each term annotated: "rate of change of angular momentum " and "gravitational torque ."

Pendulum in Cartesian vs angular coordinates, showing how the Euler-Lagrange equation in the angle coordinate automatically handles the rod-length constraint

Worked example [Beginner]

A simple pendulum has mass on a rigid rod of length , swinging under gravity . Describe the motion using the Euler-Lagrange equation.

Step 1. Choose a coordinate. Use the angle from the downward vertical. The mass moves on a circle of radius , so its speed is .

Step 2. Write the Lagrangian. Kinetic energy: . Potential energy (zero at the bottom): . So .

Step 3. Compute the two pieces of the Euler-Lagrange equation.

The slope of with respect to velocity : .

Differentiate this in time: .

The slope of with respect to position : .

Step 4. Assemble. The Euler-Lagrange equation gives:

This is the exact nonlinear pendulum equation. For small angles, , giving simple harmonic motion with angular frequency . The entire derivation required no force diagrams, no tension calculation, and no constraint equations — just the Lagrangian and the Euler-Lagrange recipe.

Check your understanding [Beginner]

Formal definition [Intermediate+]

Let be a smooth -dimensional configuration manifold with local coordinates . A smooth curve has tangent vector . The Lagrangian is a smooth function on the tangent bundle and time.

Hamilton's principle 09.02.01 pending states that the physical path makes the action stationary under variations vanishing at the endpoints. The first-variation computation (integration by parts of the term, using the boundary conditions ) yields the necessary and sufficient condition:

These are the Euler-Lagrange equations. Each is a second-order ODE for the coordinate . The system of equations determines the trajectory given initial conditions and .

Derivation from Hamilton's principle. Consider a variation with . The first variation of is:

Integrate the second term by parts. The boundary term vanishes because vanishes at both endpoints. The result is:

By the fundamental lemma of the calculus of variations — if a continuous function satisfies for all smooth vanishing at the endpoints, then — the integrand must vanish pointwise. The Euler-Lagrange equations follow.

Conjugate momentum. The quantity

is the conjugate momentum (also canonical momentum or generalised momentum) associated with . For this gives , the ordinary momentum. In general may depend on both and .

Cyclic coordinates. If (the coordinate is absent from ), the Euler-Lagrange equation reduces to : the conjugate momentum is conserved. Such a coordinate is called cyclic (or ignorable). Each cyclic coordinate reduces the effective dimension of the problem by one, since can be treated as a constant and recovered later by integrating .

The total time derivative. Note the distinction between (partial derivative, holding and fixed) and (total time derivative along a trajectory, which expands via the chain rule as ). This distinction is the single most common source of computational error.

Counterexamples to common slips

  • The Euler-Lagrange equations are not . They involve the total time derivative of , not just the partial derivative of with respect to . A Lagrangian can have no explicit -dependence and still produce nontrivial dynamics (the free particle: , , giving — constant velocity, not "nothing happens").

  • Conjugate momentum is not always . In an electromagnetic field with , the conjugate momentum is , not the kinetic momentum . The difference is physically significant: under a gauge transformation , the canonical momentum changes but the equations of motion do not.

  • The Euler-Lagrange equations require differentiability of . If is not at least in , the derivation via integration by parts breaks down. Systems with friction (Rayleigh dissipation), impacts, or discontinuous potentials require modified frameworks.

Key theorem with proof [Intermediate+]

Theorem (Equivalence of Euler-Lagrange equations and Newton's second law for holonomic systems). Consider particles with masses in a potential subject to holonomic constraints , . Let with be independent generalised coordinates that solve the constraints. Then the Euler-Lagrange equations for the Lagrangian (expressed in the ) are equivalent to Newton's second law including the constraint forces.

Proof. Write the particle positions as functions of the generalised coordinates: . The kinetic energy is

For time-independent constraints (), is a homogeneous quadratic in the (plus lower-order terms if constraints are time-dependent).

Compute :

Take the total time derivative:

The second term simplifies by exchanging the order of differentiation (, which follows from commuting with ):

Also, . Substituting into the Euler-Lagrange equation :

Now apply Newton's second law for the constrained system: where are the constraint forces. The constraint forces satisfy the virtual work principle — they are orthogonal to the allowed displacements — so . The remaining term gives:

which holds identically by the chain rule (). The constraint forces cancel automatically. The Euler-Lagrange equations are Newton's second law with the constraints absorbed into the coordinate choice. ∎

Worked example: the Atwood machine

Two masses and hang from a massless, inextensible rope over a frictionless pulley. The constraint is (constant rope length), giving one degree of freedom. Choose (the downward displacement of ), so and .

The Lagrangian is (plus a constant from the terms). The Euler-Lagrange equation:

The acceleration is constant: if , mass 1 descends and mass 2 ascends. The tension in the rope is not needed for the equation of motion — it is a constraint force that drops out of the Euler-Lagrange framework. If you want , recover it from Newton's second law for either mass: .

Bridge. The equivalence just proved is the foundational reason that Lagrangian mechanics reproduces all of Newtonian dynamics without ever resolving a force diagram. The central insight is that constraint forces vanish from the Euler-Lagrange equations by construction when generalised coordinates are chosen to respect the constraints — this is exactly the mechanism that makes the Lagrangian approach superior for constrained systems. The result generalises in 09.03.01 pending Noether's theorem, where the same EL framework generates conservation laws from continuous symmetries of , and appears again in 09.04.01 pending the Legendre transform, where the conjugate momenta become the phase-space coordinates of Hamiltonian mechanics.

Exercises [Intermediate+]

Lean formalization [Intermediate+]

Mathlib has the calculus infrastructure (Frechet derivatives, smooth manifold theory) and ODE theory (Analysis.ODE) needed to state the Euler-Lagrange equations, but does not formalise the variational derivation — the action functional on a path space, integration by parts in this generality, or the fundamental lemma of the calculus of variations as a named theorem. The Hessian regularity condition and its role in the Legendre transform are also absent. Formalising the EL equations as a theorem relating the variational condition to the pointwise ODE system is a nontrivial project requiring assembly of these fragments. lean_status: none.

Advanced results [Master]

The Euler-Lagrange equations on a manifold

The coordinate-free statement of the Euler-Lagrange framework uses the geometry of the tangent bundle . Let be a smooth -dimensional manifold, its tangent bundle with projection , and a smooth Lagrangian. The vertical endomorphism is defined in local coordinates by ; it projects any tangent vector to onto its vertical component (the part tangent to the fibres). The Cartan 1-form (or Liouville form on ) is , and the Cartan 2-form is .

A smooth curve lifts to a curve via . The Euler-Lagrange vector field on is defined by the condition where is the energy function. In coordinates, where the are determined by the Euler-Lagrange equations. The integral curves of are the physical trajectories.

The regularity condition ensures that the Euler-Lagrange equations can be solved for as functions of , making a genuine second-order vector field on . For singular Lagrangians (degenerate Hessian), the Euler-Lagrange equations define a differential-algebraic system, and the Dirac-Bergmann constraint algorithm is needed to extract a consistent dynamical system.

A deeper geometric characterisation uses the Poincare-Cartan integral invariant. The 1-form on (the extended tangent bundle including time) satisfies the condition that its exterior derivative vanishes on the prolonged solution curves. Explicitly, for any closed curve in the space that is carried along the EL flow to a curve , the Poincare-Cartan invariant is independent of . This is the Lagrangian counterpart of Liouville's theorem in Hamiltonian mechanics 09.04.02 pending: the symplectic 2-form is preserved by the EL flow. The invariant reduces to the standard Poincare integral invariant after the Legendre transform 09.04.01 pending.

Constrained systems and Lagrange multipliers

For holonomic constraints , , the constrained Euler-Lagrange equations are

where are Lagrange multipliers — the constraint forces. Combined with the constraints , this is a system of equations in unknowns . The right-hand side is the generalised force of constraint.

For nonholonomic constraints (constraints on velocities that are not integrable to position constraints), the Lagrange multiplier method still applies but the variational derivation is more subtle — the d'Alembert principle, not Hamilton's principle, is the correct starting point. The prototypical example is a uniform disk of radius rolling without slipping on a horizontal plane. The configuration is where is the contact point, is the rolling angle, and is the heading. The no-slip condition gives and . These are nonholonomic: no function reproduces them. The unconstrained system has 4 degrees of freedom; the two nonholonomic constraints reduce the velocity-space dimension but not the configuration-space dimension, yielding a system whose dynamics must be handled by the Lagrange-d'Alembert equations rather than by restriction to a submanifold.

The Euler-Lagrange equations in field theory

The action principle generalises from particle mechanics to classical field theory. For a field (which may have multiple components) on spacetime, the Lagrangian density replaces , and the action is . The Euler-Lagrange equations become

This single equation generates Maxwell's equations (from the electromagnetic Lagrangian ), the Klein-Gordon equation (from ), the Dirac equation, and the Einstein field equations (from the Einstein-Hilbert action ). The field-theoretic Euler-Lagrange equations are developed in 10.09.01 pending.

Second-order Euler-Lagrange equations and the Helmholtz conditions

Expanding the total time derivative gives the second-order form:

The Hessian matrix determines whether the equations can be solved for the accelerations . If is invertible (the regular or non-degenerate case), , and the Euler-Lagrange equations define a unique second-order flow on . If is singular, the system is constrained in phase space — the Dirac-Bergmann theory of constrained Hamiltonian systems handles this case.

The inverse problem — given a system of second-order ODEs , does there exist a Lagrangian with the Euler-Lagrange equations? — is answered by the Helmholtz conditions: a system is variational (derivable from a Lagrangian) if and only if it satisfies certain integrability conditions. For one degree of freedom the condition is always satisfiable (the Jacobi last-multiplier method constructs from via an integrating factor). For degrees of freedom the Helmholtz conditions are nontrivial and generically restrictive.

The Helmholtz conditions have a clean geometric formulation. Define the Helmholtz operator . The first condition requires (symmetry of the leading coefficient). The second condition is the compatibility relation:

The third condition involves the full set of cross-derivatives. When all three are satisfied, the Lagrangian can be reconstructed by a line integral in the space of dynamical variables. The Helmholtz conditions are the variational analogue of the Frobenius integrability theorem for differential forms: they test whether the given ODE system arises as the Euler-Lagrange equations of some action functional.

Degenerate Lagrangians and gauge systems

Gauge theories (electromagnetism, Yang-Mills, general relativity) in their natural Lagrangian formulations have degenerate Hessians — the Hessian rank is less than because gauge symmetries produce zero eigenvalues. The Euler-Lagrange equations for such systems do not uniquely determine ; some degrees of freedom remain undetermined (the gauge freedoms). The Dirac-Bergmann algorithm identifies the constraints, classifies them as first-class (generating gauge transformations) or second-class (removable by gauge fixing), and constructs a reduced phase space on which the dynamics is deterministic.

The simplest physical example is free electromagnetism. With as configuration variables and , the Hessian has rank 3 (out of 4 components of ). The component (the scalar potential) has no conjugate momentum — is a primary constraint. The Dirac-Bergmann analysis reveals and (Gauss's law) as first-class constraints, generating the gauge transformation . The physical phase space has 2 degrees of freedom per spatial point (the two transverse polarisations), recovered from the original 4 components by quotienting out the gauge redundancy.

Synthesis. The Euler-Lagrange framework is the foundational reason that a single scalar function on encodes the complete dynamics of any mechanical system. The central insight is that the Hessian regularity condition determines whether the dynamics is deterministic: when is invertible the EL equations define a unique second-order flow on , and when is singular the gauge structure of the system is exposed through the Dirac-Bergmann constraint algorithm. Putting these together with the field-theoretic generalisation, the EL equations unify particle mechanics and classical field theory under a single variational principle — the bridge is between the finite-dimensional configuration manifold of mechanics and the infinite-dimensional configuration space of field configurations on spacetime. This is exactly the structure that appears again in 12.10.01 pending path integrals, where the classical EL path is the stationary-phase centre of the quantum amplitude, and the pattern generalises to the Einstein-Hilbert action and the Yang-Mills action in classical field theory 10.09.01 pending.

Full proof set [Master]

Proposition (Invariance under point transformations). Let be a configuration manifold with local coordinates and let be a diffeomorphism defining new coordinates . If is a Lagrangian expressed in the original coordinates and is the same Lagrangian in the new coordinates, then the Euler-Lagrange equations for in the variables are equivalent to the Euler-Lagrange equations for in the variables.

Proof. The coordinate transformation induces a tangent-bundle map . In coordinates, , so . Compute :

where the last equality uses the inverse Jacobian because . For the -derivative, the chain rule gives .

Taking of and using the product rule:

The second term cancels with the corresponding contribution from by the symmetry of mixed partials: . What remains is:

which holds if and only if the original EL equations hold, since is invertible.

Proposition (Beltrami identity — energy conservation for autonomous Lagrangians). If has no explicit time dependence, then the energy function is conserved along solutions of the Euler-Lagrange equations.

Proof. Compute along a solution:

Expand using the chain rule (noting has no explicit -dependence):

By the Euler-Lagrange equation, . Substituting:

So . For with a homogeneous quadratic in , Euler's theorem on homogeneous functions gives , so .

Proposition (Fundamental lemma of the calculus of variations). Let be continuous. If for every smooth function with , then on .

Proof. Suppose for some . By continuity, there exists such that for all . Choose to be a smooth bump function: positive on , zero outside , and vanishing at the endpoints . Then:

contradicting the hypothesis. The case is analogous (use ). Hence .

Proposition (Necessity and sufficiency of the EL equations for stationary action). Let be a Lagrangian. A curve with fixed endpoints makes stationary if and only if satisfies the Euler-Lagrange equations.

Proof. Necessity was shown in the Formal definition section: stationarity implies for all variations, which by the fundamental lemma (Proposition above) forces the EL equations pointwise. For sufficiency, suppose satisfies the EL equations. For any variation vanishing at the endpoints:

The boundary term vanishes because , and the integral vanishes because the EL equations make the integrand identically zero. Hence for all admissible variations, and is stationary at .

Proposition (Ostrogradsky instability for higher-derivative Lagrangians). Suppose the Lagrangian depends non-degenerately on the second derivative: with . Then the Hamiltonian obtained by the Legendre transform is linear in one of the velocities, and the energy is unbounded above and below. The equations of motion admit runaway solutions with exponentially growing acceleration.

Proof. The Ostrogradsky construction defines canonical momenta and (non-vanishing by hypothesis). The Hamiltonian is . Because can be expressed in terms of (by non-degeneracy), and depends on , , , the Hamiltonian is linear in through the term. The variable is a canonical coordinate in the extended phase space and is not determined by ; it can take any value, making unbounded. No stable ground state exists. This is the reason all fundamental Lagrangians in physics depend on positions and velocities only (first-order derivatives of the coordinates), never on accelerations or higher derivatives.

Connections [Master]

  • Action principle 09.02.01 pending — the Euler-Lagrange equations are the differential-equation consequence of the stationary-action condition; this unit takes the variational principle and turns it into concrete ODEs.

  • Newton's laws 09.01.02 pending — the Euler-Lagrange equations reproduce in Cartesian coordinates for the standard Lagrangian ; they generalise Newton's second law to arbitrary coordinate systems with built-in constraint handling.

  • Noether's theorem 09.03.01 pending — applies the Euler-Lagrange framework to prove that continuous symmetries of generate conserved quantities; the cyclic-coordinate observation in this unit is the simplest case.

  • Legendre transform 09.04.01 pending — converts the second-order Euler-Lagrange system on into the first-order Hamilton's equations on via the conjugate momenta introduced here.

  • Hamilton's equations 09.04.02 pending — the Hamiltonian reformulation of the Euler-Lagrange equations, obtained by Legendre transforming the Lagrangian; the two formulations are equivalent for hyper-regular Lagrangians.

  • Conservation laws 09.01.03 — energy conservation (from the Beltrami identity) and momentum conservation (from cyclic coordinates) are direct consequences of the Euler-Lagrange equations and the structure of .

  • Classical field theory 10.09.01 pending (pending) — the field-theoretic Euler-Lagrange equations generalise the particle version from curves in to field configurations on spacetime.

  • Path integrals 12.10.01 pending (pending) — the classical path in the Feynman path integral is identified as the stationary-action path satisfying the Euler-Lagrange equations; quantum fluctuations are deviations from this path.

  • Geometric mechanics 09.09.01 pending (pending) — the coordinate-free formulation of the Euler-Lagrange equations on the tangent bundle , with the Cartan 2-form and the Euler-Lagrange vector field .

  • Calculus of variations 02.14.01 pending (pending) — the Euler-Lagrange equations were originally derived for general variational problems (shortest path, minimal surface, brachistochrone), of which mechanics is a particular case.

Historical & philosophical context [Master]

The Euler-Lagrange equations have a dual authorship spanning half a century. Euler, in his Methodus inveniendi lineas curvas maximi minimive proprietate gaudentes (1744), derived the general differential equation for extremals of a variational problem , producing — what we now call the Euler equation for a single-variable variational problem. Euler's derivation used polygonal approximations to the curve, discretising the integral and passing to the continuum limit.

Lagrange, at age 19 in 1755, wrote to Euler with a far more elegant derivation using the modern method of introducing a variation , integrating by parts, and using the arbitrariness of to conclude the pointwise condition. Euler recognised the superiority of Lagrange's approach and adopted it, renaming the method "the calculus of variations" (a name Lagrange had coined). Lagrange then spent the next three decades building this variational framework into a complete reformulation of mechanics, published as Mecanique analytique (1788) — a treatise famously containing not a single diagram, consisting entirely of algebraic and variational arguments.

The term "Euler-Lagrange equations" reflects this joint contribution: Euler's equation for the general variational problem, Lagrange's method of derivation and its systematic application to all of mechanics. The notation for the conjugate momentum and the full multi-coordinate generalisation are due to Lagrange.

Jacobi's contribution, developed in his 1842-43 Knigsberg lectures (published posthumously as Vorlesungen uber Dynamik, 1866), reframed the EL equations in geometric terms. Jacobi observed that for conservative systems the EL equations describe geodesics of the Jacobi metric on configuration space, where is the mass matrix and is the total energy. This geometric interpretation — trajectories as geodesics of a Riemannian metric — was the direct precursor of the manifold formulation of mechanics developed by Arnold, Abraham, and Marsden in the twentieth century.

The philosophical significance of the Euler-Lagrange equations is that they separate the kinematics (the choice of coordinates and the form of ) from the dynamics (the form of ). Given any configuration space and any potential, the equations of motion follow by a single mechanical procedure. This universality — one recipe for all of mechanics — was the decisive argument for the variational approach and the direct ancestor of the Lagrangian formulation of modern field theory.

Bibliography [Master]

  • Euler, L., Methodus inveniendi lineas curvas maximi minimive proprietate gaudentes (1744).
  • Lagrange, J. L., Mecanique analytique (1788).
  • Taylor, J. R., Classical Mechanics (University Science Books, 2005), Ch. 7.
  • Susskind, L. & Hrabovsky, G., The Theoretical Minimum: Classical Mechanics (Basic Books, 2014), Lecture 6.
  • Arnold, V. I., Mathematical Methods of Classical Mechanics, 2nd ed. (Springer GTM 60, 1989), §12.
  • Landau, L. D. & Lifshitz, E. M., Mechanics, 3rd ed. (Course of Theoretical Physics Vol. 1, Pergamon, 1976), §1–3.
  • Goldstein, H., Poole, C. P. & Safko, J., Classical Mechanics, 3rd ed. (Pearson, 2002), Ch. 1–2.
  • Tong, D., Classical Dynamics (DAMTP Cambridge lecture notes), §2.
  • Marsden, J. E. & Ratiu, T. S., Introduction to Mechanics and Symmetry, 2nd ed. (Springer TAM 17, 1999), §7.2–7.3.
  • Abraham, R. & Marsden, J. E., Foundations of Mechanics, 2nd ed. (Addison-Wesley, 1978), §3.1–3.5.
  • Lanczos, C., The Variational Principles of Mechanics, 4th ed. (Dover, 1986), Ch. II–V.
  • Dirac, P. A. M., Lectures on Quantum Mechanics (Yeshiva University, 1964) — on constrained Hamiltonian systems and the Dirac-Bergmann algorithm.