The Euler-Lagrange Equations
There is a moment in every physicist's education when mechanics stops being a catalogue of tricks and becomes a machine. It usually happens at these equations. Before them: free-body diagrams, tension components, fictitious forces to remember every time the coordinates bend or spin. After them: write one scalar function in whatever variables fit the problem, turn a crank — — and the correct equations of motion fall out, one per coordinate, in any coordinate system, with the constraint forces already gone. The Euler–Lagrange equations are the local content of Hamilton's principle: they are what "the action is stationary" means, instant by instant, along the path. That is one of their two birth certificates. The other is Newtonian — they follow from d'Alembert's principle without any mention of a variational idea — and the fact that two utterly different foundations produce the same equations is the deep reason to trust them: this is not an elegant heuristic riding on top of mechanics, it is mechanics. This article derives the equations honestly from the stationary-action demand, shows why their form survives any change of coordinates while has to be rebuilt chart by chart, and then does what one actually does with them: solve problems. An Atwood machine in three lines, a pendulum swinging from a free cart — a problem that is genuinely painful with forces — in a dozen. Master the crank here and the rest of analytical mechanics opens on schedule: conserved momenta from cyclic coordinates, the energy function, symmetries, and eventually the same equations run again with fields instead of coordinates, where they govern electromagnetism and the Standard Model.
- For each generalized coordinate, : one second-order ODE per degree of freedom, produced from the single scalar .
- They are exactly equivalent to the stationarity of the action under endpoint-fixed variations — and, independently, to d'Alembert's principle, hence to Newton's laws for holonomic, monogenic systems.
- Their decisive property is form-invariance: the same recipe works in Cartesian, polar, rotating, or any generalized coordinates — centrifugal-type terms generate themselves, and ideal constraint forces never appear.
- Read them Newtonianly: , with generalized momentum and generalized force .
- The Lagrangian is not unique — adding changes nothing — and the equations are solvable for the accelerations exactly when the velocity Hessian is invertible.
- Cyclic coordinate ⇒ conserved conjugate momentum; no explicit in ⇒ conserved energy function: conservation laws sit on the surface of these equations.
- Key idea: stationarity of the action under arbitrary endpoint-fixed variations is equivalent, for each generalized coordinate, to the local condition — a coordinate-independent reformulation of Newton's second law.
Where this lives today
Every serious robot runs these equations in its inner loop. The manipulator equation of robotics, , is the Euler–Lagrange system (7) for the robot's Lagrangian — the velocity Hessian, the chain-rule cross-terms, the potential gradient, the generalized forces from the motors. Modern dynamics engines (MuJoCo, Drake, Isaac) evaluate exactly this structure thousands of times per second for humanoids with 30-plus degrees of freedom, and the reinforcement-learning pipelines training 2026's robot policies differentiate through it, backpropagating rewards through the mass matrix. When a humanoid catches its balance, a pendulum-on-a-cart problem — literally the worked example above, with the sign of gravity flipped — is being solved in real time. The same structure has become a machine-learning prior. Lagrangian and Hamiltonian neural networks learn the scalar from trajectory data and then obtain forces by automatic differentiation of the learned function — building conservation laws and covariance into the model instead of hoping data teaches them. And at the opposite end of fundamentality, quantum field theory runs the identical crank with fields in place of coordinates: is equation (1) with the time derivative promoted to four spacetime derivatives. Maxwell's equations, the Klein–Gordon equation, and the Standard Model's field equations are all outputs of the same two-partial-derivatives-and-a-crank recipe you used on the Atwood machine.
The physical picture
Start with what "stationary action" can possibly say about a single instant. Hamilton's principle grades whole histories; a differential equation acts here and now. The bridge is the freedom to wiggle the path locally. Take the true path and deform it only inside a tiny time window — a small bump, zero everywhere else. Stationarity against that one bump is a statement about the path only inside the window. Slide the window anywhere: you get a condition at every instant separately. That per-instant condition — the price of flatness against localized bumps — is the Euler–Lagrange equation. The global principle was never mystical; it is a differential equation wearing an integral coat.
The second thing to see before any algebra is why these equations deserve their reputation: two independent foundations converge on them. From above, Hamilton's stationary action plus the calculus of variations. From below, Newton's laws filtered through d'Alembert's principle — constraint forces do no virtual work, so project the dynamics onto the directions the constraints allow. Same equations, letter for letter. If you distrust variational reasoning, the equations are still ordinary Newtonian mechanics; if you distrust virtual-work bookkeeping, they are still the flatness condition of a functional. The double derivation is the certificate that nothing physical has been smuggled in or lost.
Last, the practical superpower: covariance. Newton's law is a vector equation; bend the coordinates and you must transform every component, sprouting centrifugal and Coriolis corrections by hand. The action is a scalar built from a scalar ; its flat spot cannot depend on how paths are labelled. So the stationarity condition has the identical form in every chart — and all the coordinate-bending corrections are generated automatically by the derivatives of . Choose the angle of a pendulum, the arc length along a wire, the separation of a two-body pair: constraints vanish into the choice of coordinates, ideal constraint forces (which do no work along allowed motions) never enter , and the equations arrive already projected onto the directions in which the system can actually move.
The equations and how to read them
Here is the machine, stated first, derived immediately after. For a system with degrees of freedom described by independent generalized coordinates and Lagrangian — for ordinary mechanics, built as in the Lagrangian-function article — the motion obeys
where: and are partial derivatives taken treating , , as independent slots of the function ; the outer is a total derivative along the path, acting through , , and any explicit . That distinction — partials inside, total outside — is where most first attempts die, and it is worth a moment: the total derivative produces terms in , in , and in , all by the chain rule. The equations acquire physical eyes through two definitions. Name the things being differentiated:
where: — the generalized (conjugate) momentum of coordinate ; — the generalized force. Equation (1) then reads : rate of change of momentum equals force, Newton's second law in coordinate-free clothing. When is a Cartesian position, ; when is an angle, is an angular momentum — the formalism reshapes momentum to fit the coordinate, a story told fully in the generalized-forces-and-momenta article. The variational origin needs the action. Each admissible history between pinned endpoints is graded by
where: — the action functional (units J·s), whose anatomy has its own article; here it is the object whose flatness we now cash out.
The goal is the central equivalence of Lagrangian mechanics: the demand for all endpoint-clamped variations is exactly the system of equations (1). The strategy is the standard three-move combination — embed the candidate path in a one-parameter family so that functional differentiation becomes ordinary differentiation, integrate the velocity term by parts to strip the derivative off the variation, then invoke the fundamental lemma of the calculus of variations to convert an integral statement into a pointwise one. The lemma itself is proved in the calculus-of-variations article; we import it as certified machinery. Watch two things: the boundary term, which dies only because variations are clamped at the endpoints, and the independence of the variations, which is what lets a single scalar condition split into separate equations.
Step 1. Embed the path in a family with arbitrary smooth shapes obeying , and differentiate the action under the integral sign:
Why the chain rule looks like this: along the family, and — varying the path varies its velocity in lockstep; and are not independent knobs.
Step 2. The term is the obstruction — the variation appears differentiated. Integrate it by parts to move the derivative onto the known quantity:
Why the boundary term vanishes: — the clamping of the endpoints is used exactly here and nowhere else. Free an endpoint and this term survives, adding the natural boundary condition at the freed end.
Step 3. Collect everything under one integral:
Step 4. Demand this vanish for every admissible choice of the shapes . Because the coordinates are independent, choose all shapes zero except one; the fundamental lemma of the calculus of variations then forces its bracket to vanish identically on . Repeat for each :
Why independence of the coordinates matters: if the were related by an unresolved constraint, the could not be varied separately and the brackets could only be proven zero in combination — that failure mode is precisely where Lagrange multipliers enter, in their own article. *Verified: reproduces Goldstein §2.3 and Landau–Lifshitz §2; the two checkpoints are the boundary-term cancellation and the pointwise conclusion via the fundamental lemma (bump functions localized in the window, as in the hero figure).*
The same equations have a second, fully Newtonian pedigree. Starting from d'Alembert's principle — constraint forces do no virtual work — and projecting Newton's second law onto the generalized coordinates, one arrives (the full derivation lives in the d'Alembert article, whose property this route is) at
where: — the kinetic energy in generalized coordinates; — the generalized force of the applied forces only, constraint forces having dropped out. For monogenic forces, with velocity-independent, and defining absorbs the right side: equation (5) becomes equation (1). Keep (5) in your kit even after you trust (1): it is the form that welcomes friction and other nonpotential forces on the right-hand side. Two structural facts complete the toolbox. First, the Lagrangian producing a given dynamics is not unique:
where: — any smooth function. The addition shifts the action of every path by the same endpoint constant, so the flat spot never moves — the gauge freedom exploited constantly in electromagnetism. Second, the equations are second-order ODEs in disguise, and one should know when the disguise can be removed. Expanding the total derivative in (1) by the chain rule:
where: the matrix — the velocity Hessian, physically the mass matrix — multiplies the accelerations. Everything on the right is known once are given, so the system can be solved for exactly when is invertible. For a genuine kinetic energy , is positive-definite and the initial-value problem is well-posed; degenerate Hessians (Lagrangians linear in some velocity) signal constraints and lead toward Hamiltonian constraint theory.
Which form answers which question
| you want | use | notes |
|---|---|---|
| equations of motion from | eq. (1), one per coordinate | partials inside, total outside |
| a Newtonian reading | with (2) | momentum shaped by the coordinate |
| friction or applied torques | eq. (5) with on the right | the pre-potential form |
| check two Lagrangians agree | gauge test, eq. (6) | differ by ? |
| explicit for simulation | expanded form (7) | needs invertible mass matrix |
| the constraint force itself | Lagrange multipliers | own article — plain (1) hides it by design |
Covariance cashed in: one law, every chart
Go deeper · Derivation B · 2 minThe Same Crank in Cartesian and Polar Coordinates
The goal is to watch form-invariance pay: run equation (1) once in Cartesian coordinates to recover Newton's law exactly, then run the identical crank in polar coordinates and see the centrifugal term and angular-momentum conservation generate themselves — no fictitious forces inserted, no vector transformation performed. The strategy is pure computation, which is the point: the recipe does not change between charts; only 's expression does. Watch how every "extra" term in the polar equations traces to a derivative of the kinetic energy's coordinate dependence.
Step 1. Cartesian, single particle, potential : . The partials are and , so (1) gives
Why this matters: it is Newton's second law, recovered exactly — the formalism contains vanilla mechanics as its simplest chart, which anchors everything that follows.
Step 2. Now planar motion in polar coordinates with a central potential. The velocity has radial and tangential parts, , so
Why no constraint or force analysis was needed: the coordinate change is absorbed entirely into the expression of — the single scalar carries all the geometry.
Step 3. Crank the equation: , , hence
Why the centrifugal term appeared for free: is — the kinetic energy's dependence on the coordinate, differentiated by the recipe. In the Newtonian route this same term must be imported by hand as a frame correction; here it is bookkeeping the crank performs automatically.
Step 4. Crank the equation: — the angle never appears in — so (1) collapses to a conservation law:
Why this is a preview of a theorem: a coordinate absent from (a cyclic coordinate) always freezes its conjugate momentum — here the angular momentum . The systematic story is the cyclic-coordinates article; the deeper symmetry story is Noether's.
Step 5. Note what was not done: no unit-vector differentiation ( and rotate along the path — the usual source of the and terms in the Newtonian treatment), no fictitious forces, no components resolved. Two partial derivatives per coordinate and the crank. Verified: equations (8)–(9) match Goldstein §3.1 and Taylor §7.5 for central-force motion; setting from (9) into (8) reproduces the standard effective-potential radial equation.
Go deeper · Derivation C · 1 minWhen the Equations Can Be Solved for the Accelerations
The goal is the well-posedness fact quoted at equation (7): the Euler–Lagrange system determines the accelerations — and hence, with initial data, the whole motion — precisely when the velocity Hessian is invertible. The strategy is to expand the total time derivative in (1) honestly with the chain rule and inspect the linear-algebra structure of the result. The watch-out is conceptual: invertibility is not a technicality — its failure is physical information, signalling that the Lagrangian hides constraints rather than dynamics.
Step 1. The quantity is a function of evaluated along the path. Differentiate it totally:
Why three terms: the chain rule visits every slot through which time enters — velocities (producing ), coordinates (producing ), and explicit time. Forgetting the middle term is the most common by-hand error in this subject.
Step 2. Insert into (1) and isolate the accelerations — this is exactly equation (7): with everything on the right known at each instant.
Step 3. Invert where possible. For a mechanical Lagrangian , the Hessian is the mass matrix : symmetric and positive-definite whenever the kinetic energy is positive for every nonzero velocity. Then , the system is in normal form, and the standard existence–uniqueness theorem applies to the initial-value problem. Why positive-definiteness is physical: for any motion — a direction of zero kinetic cost would be a coordinate that isn't really there.
Step 4. Read the failure mode. If is linear in some velocity, that row of vanishes: the corresponding "equation of motion" contains no acceleration at all — it is a constraint among , not an evolution law. Such degenerate Lagrangians are the doorway to constrained Hamiltonian dynamics (gauge theories live there); within mechanics proper, they warn you the coordinate count is wrong. Verified: the expansion matches Goldstein eq. (1.57)'s structure; for , and Step 2 reduces to as it must.
Limiting cases
| Case | Result | Meaning |
|---|---|---|
| cyclic coordinate () | conservation laws read off by inspection | |
| free particle, Cartesian | Newton's first law recovered; straight line | |
| no explicit time () | conserved, | the energy function / Jacobi integral, own article |
| small oscillations | normal modes from the Hessian structure of | |
| identical equations | gauge freedom — Lagrangians are equivalence classes | |
| linear in some | Hessian row vanishes | constraint, not dynamics; the equation loses its |
Worked examples
1 · The Atwood machine in three lines (confidence builder)
Masses and hang from an ideal (massless, frictionless) pulley. Find the acceleration and the speed of after from rest. ()
Step 1. Spend the constraint on the coordinate. The string is inextensible, so if has descended by , has risen by : one degree of freedom. Both masses move at speed , so , and taking downward-positive for , . Hence .
Step 2. Crank equation (1): and , so .
Step 3. Numbers: , constant. From rest, after : , having fallen .
Step 4. Notice what never appeared: the tension. The Lagrangian route sacrificed it by design — ideal constraint forces do no work along allowed motions. If the tension itself is wanted, one line of after-market Newton delivers it, — or keep the constraint explicit and let a Lagrange multiplier produce it, the subject of that article.
2 · Pendulum on a free cart (exam level)
A cart of mass rolls without friction on a horizontal rail. From it hangs a pendulum: mass on a light rod of length . Find the equations of motion, the conserved momentum, and the small-oscillation frequency and period. Compare with a fixed-pivot pendulum.
Step 1. Coordinates: cart position , pendulum angle from the vertical. The bob sits at , so its velocity squared is . Assemble the scalar:
Step 2. The equation. is absent from (cyclic!), so equation (1) collapses to conservation of its conjugate momentum:
— the total horizontal momentum of cart plus bob: the rail exerts no horizontal force, and the formalism noticed by inspection.
Step 3. The equation. ; the total derivative (chain rule — the warning above earns its keep) gives ; and . The terms cancel, leaving .
Step 4. Small oscillations about the ground state ( small, start from so to first order). Substituting into the equation with , : , i.e.
where: the factor is the recoil correction — the pivot backs away from the bob, shortening the effective swing. Numbers: , so and .
Step 5. Compare: a fixed-pivot pendulum of the same length has , period . The free cart raises the frequency by — about faster. Sanity limits: recovers the fixed pivot; sends (a massless cart cannot anchor any swing). Attempting this with means rod forces on two bodies and an accelerating pivot; with the crank it is two partial derivatives per coordinate.
Origins · 1 minLeonhard Euler and how this was discovered
Euler wrote roughly a third of the entire mathematics and physics literature of the eighteenth century, and losing sight in one eye ("now I will have less distraction") barely slowed the flow — nearly half his output was dictated after he went almost fully blind. Mechanics owes him its analytic form: his Mechanica (1736) redid Newton with equations instead of geometry, and his Methodus inveniendi (1744) founded the calculus of variations, containing the equation now named for him and Lagrange, derived by cleverly polygonizing curves. Then, in 1755, a 19-year-old from Turin sent him a purely analytic derivation using the δ-machinery — no polygons, no geometry. Euler did something rare in the history of priority disputes: he recognized the student's method as superior, held back his own work so young Lagrange could publish first, and coined the name "calculus of variations" for the boy's technique. The equations were baptized twice over — invented by one, perfected by the other, and shared with a generosity the subject has been trying to live up to since.
Going further
References. Morin, Introduction to Classical Mechanics, Ch. 6 · Goldstein, Poole & Safko, Classical Mechanics 3rd ed., Ch. 1–2 · Landau & Lifshitz, Mechanics Vol. 1, §1–2 · Taylor, Classical Mechanics, Ch. 7
Provenance. Equations cross-checked against Goldstein (§1.4, §2.3), Landau–Lifshitz Mechanics (§1–2), Morin Ch. 6, and Taylor Ch. 7. A verifier should: (1) reproduce the integration-by-parts derivation and the d'Alembert derivation independently; (2) confirm the polar-coordinate equations and conservation of ; (3) verify the total-derivative gauge argument; (4) check the energy-function identity . No empirical numbers are asserted; all results are symbolic and textbook-standard. Worked-example numbers on this page (Atwood , string tension ; cart-pendulum , versus fixed-pivot, recoil factor ) are illustrative arithmetic recomputed from the boxed formulas.
Builds on: The Action Functional · Hamilton's Principle of Stationary Action · The Lagrangian Function · Generalized Coordinates and Configuration Space · d'Alembert's Principle · Degrees of Freedom Leads to: Cyclic Coordinates and Conservation of Conjugate Momenta · The Energy Function and Jacobi Integral · Symmetries and Continuous Transformations · Generalized Forces and Generalized Momenta
How can q and q̇ be treated as independent in the partial derivatives when q̇ is literally the derivative of q?
Because the partials interrogate the function , not the trajectory. is a rule assigning a number to any triple of arguments — say, "position 2 m, velocity 5 m/s, now" — whether or not any actual motion passes through that state. asks how the number changes if the velocity slot alone is perturbed: a question about the rule, perfectly well-defined. Only after the partials are computed do you evaluate them along a path , where the slots become correlated — and that is exactly when the outer (a total derivative) takes over the bookkeeping of the correlation via the chain rule. The variational origin says the same thing: along the varied family, and are locked together, and the integration by parts in Derivation A is precisely the step that accounts for the lock. Independent inside the partials, correlated along the path — two stages, never mixed.
Do the Euler–Lagrange equations hold in rotating or accelerating coordinate systems?
Yes — and this is stronger than the usual "any generalized coordinates" slogan. The derivation from stationary action never assumed the map from generalized coordinates to positions was time-independent, so time-dependent point transformations — including coordinates fixed to a rotating turntable or an accelerating elevator — preserve the form of equation (1) exactly. What changes is the expression of in the new chart: it acquires terms linear in and terms independent of , and when the crank differentiates those, the centrifugal, Coriolis, and Euler forces emerge automatically as pieces of and of the total time derivative. In the Newtonian framework those are corrections you must remember; in the Lagrangian framework they are outputs you cannot forget, because the machinery generates them. The rotating-frames articles derive the same forces the vector way — comparing the two derivations of the same physics is one of the best consistency exercises in mechanics.
When do I need Lagrange multipliers instead of the plain Euler–Lagrange equations?
Two situations. First, when you want the constraint force: the plain method eliminates it by construction — the Atwood example never sees its string tension. Keeping a redundant coordinate and appending the constraint with a multiplier makes the force reappear as , which is how one computes when a bead leaves a sphere or what friction a rolling constraint demands. Second, when the constraints cannot be spent on the coordinates at all — velocity-dependent (nonholonomic) constraints like rolling without slipping in two dimensions cannot be integrated into a coordinate choice, so independent variations are unavailable and Derivation A's Step 4 fails; multipliers restore the bookkeeping. Both stories, with the worked classics, live in the Lagrange-multipliers article. If the constraints are holonomic and you don't care about their forces, plain (1) with well-chosen coordinates is always the shorter path.
What breaks when there is friction, and what is the honest fix?
Derivation A needs every applied force to come from a potential (or a generalized, velocity-dependent one like the Lorentz force's) so that its virtual work is the variation of a scalar. Kinetic friction refuses: energy lost irreversibly along the way cannot be a function of endpoints. The honest fix is to stop before the potential is introduced: the d'Alembert-route form, equation (5), holds for arbitrary applied forces, so split them — monogenic ones into , the rest staying on the right as generalized forces: , with . For linear drags the bookkeeping packages neatly into a Rayleigh dissipation function. What you lose is the variational pedigree — no single functional is stationary — but the equations remain exactly Newton, projected onto your coordinates.
My coordinates turned out not to be independent. What actually goes wrong in the machinery?
The failure is precise and worth seeing. In Derivation A, Step 4 requires choosing each variation shape freely and separately — that is what splits one integral condition into brackets vanishing individually. If your coordinates are secretly related by a constraint , admissible variations must satisfy : you can no longer vary them independently, and the only legitimate conclusion is that the bracket vector is proportional to the constraint gradient, not zero — which is exactly the Lagrange-multiplier equation with as the proportionality factor. Symptoms downstream: too many equations that contradict each other, or a singular mass matrix in equation (7). The cure is either to eliminate the redundancy (solve the constraint, drop a coordinate) or to embrace it with multipliers. Count degrees of freedom first; the formalism assumes you did.
What happens if the Lagrangian contains accelerations — terms in q̈?
The variational machinery generalizes, but the physics turns hostile. For , stationarity with the appropriate endpoint data gives the Euler–Lagrange equation two integrations by parts deep: — generically a fourth-order ODE. Ostrogradsky showed in 1850 that the associated energy is then unbounded below in a structural way (linear in one of the momenta): the system can lower its energy without limit by exciting the extra modes, which in interacting theories means runaway instabilities. This "Ostrogradsky instability" is why fundamental Lagrangians are built from coordinates and first derivatives only, and why higher-derivative corrections in effective field theories must be treated as perturbations rather than taken literally. For mechanics coursework the rule of thumb stands: if a appears in your , either it belongs in a total derivative you can discard by equation (6), or something has gone wrong upstream.
Are the Euler–Lagrange equations always n independent second-order ODEs?
Only when the velocity Hessian has full rank — Derivation C's condition. For honest mechanical kinetic energies is the positive-definite mass matrix and the answer is yes: normal form, pieces of initial data, unique evolution. But Lagrangians linear in some velocity have a vanishing Hessian row: the corresponding equation contains no acceleration and is a constraint among positions and velocities rather than an evolution law. Far from pathological, this is the signature of gauge structure — electromagnetism's and the relativistic particle's reparametrization freedom both show up as degenerate Hessians — and handling it systematically (primary constraints, Dirac brackets) is the constrained-Hamiltonian story that begins where this article's mechanics ends. Within coursework mechanics: a singular almost always means a redundant or missing coordinate; recount your degrees of freedom before reaching for heavier machinery.
Is there a shortcut when L does not depend on time explicitly?
Yes — the energy function (Jacobi integral) , which obeys along any solution: when carries no explicit clock, is a constant of the motion, and for standard scleronomic systems it equals . Practically this replaces one second-order equation with a first-order one — often the fastest route to turning points, speeds at given positions, and phase portraits, and for one-dimensional systems it integrates the motion outright by quadrature. Two cautions, both developed in the energy-function article: need not equal the mechanical energy when constraints move (a bead on a rotating hoop conserves while a motor pumps energy in), and is not conserved the moment knows the time. The systematic origin of this and every such shortcut — cyclic coordinates included — is the symmetry-to-conservation dictionary of Noether's theorem, two articles ahead.