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 L=T−VL = T - V in whatever variables fit the problem, turn a crank — ddt(∂L/∂q˙i)=∂L/∂qi\tfrac{\mathrm{d}}{\mathrm{d}t}(\partial L/\partial\dot q_i) = \partial L/\partial q_i — 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 F=ma\mathbf F = m\mathbf a 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.

Key takeaways
  • For each generalized coordinate, ddt ⁣(∂L∂q˙i)−∂L∂qi=0\frac{\mathrm{d}}{\mathrm{d}t}\!\big(\frac{\partial L}{\partial \dot q_i}\big) - \frac{\partial L}{\partial q_i} = 0: one second-order ODE per degree of freedom, produced from the single scalar L(q,q˙,t)L(q,\dot q,t).
  • They are exactly equivalent to the stationarity of the action S=∫L dtS=\int L\,\mathrm{d}t 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: p˙i=Qi\dot p_i = Q_i, with generalized momentum pi=∂L/∂q˙ip_i = \partial L/\partial\dot q_i and generalized force ∂L/∂qi\partial L/\partial q_i.
  • The Lagrangian is not unique — adding dF(q,t)/dt\mathrm{d}F(q,t)/\mathrm{d}t changes nothing — and the equations are solvable for the accelerations exactly when the velocity Hessian ∂2L/∂q˙i∂q˙j\partial^2L/\partial\dot q_i\partial\dot q_j is invertible.
  • Cyclic coordinate ⇒ conserved conjugate momentum; no explicit tt in LL ⇒ conserved energy function: conservation laws sit on the surface of these equations.
  • Key idea: stationarity of the action S=∫L dtS=\int L\,\mathrm{d}t under arbitrary endpoint-fixed variations is equivalent, for each generalized coordinate, to the local condition ddt∂L∂q˙i=∂L∂qi\frac{\mathrm{d}}{\mathrm{d}t}\frac{\partial L}{\partial \dot q_i}=\frac{\partial L}{\partial q_i} — 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, M(q)q¨+C(q,q˙)q˙+g(q)=τM(q)\ddot q + C(q,\dot q)\dot q + g(q) = \tau, is the Euler–Lagrange system (7) for the robot's Lagrangian — M(q)M(q) the velocity Hessian, CC the chain-rule cross-terms, gg the potential gradient, τ\tau 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 LL 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: ∂μ(∂L/∂(∂μϕ))=∂L/∂ϕ\partial_\mu\big(\partial\mathcal L/\partial(\partial_\mu\phi)\big) = \partial\mathcal L/\partial\phi 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.

Figure
A localized bump probes one instant — stationarity becomes a per-instant law
(t₁, q₁) (t₂, q₂) wiggle window (t*−ε, t*+ε) bump η(t): zero outside the window δS = 0 here constrains the path HERE flatness against every localized bump, at every t*, is a differential equation at each instant — the Euler–Lagrange equation

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.

Figure
Two independent routes, one set of equations — the reason to trust the machinery
Hamilton's principle δ∫L dt = 0, endpoints pinned global · variational d'Alembert's principle Σ(F − ma)·δr = 0, each instant local · Newtonian integrate by parts, fundamental lemma project onto generalized coordinates d/dt (∂L/∂q̇ᵢ) − ∂L/∂qᵢ = 0 one equation per coordinate, in every chart two foundations that share no assumptions beyond Newton — and one output: the equations are mechanics, not a heuristic

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 LL; 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 LL. 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 LL, 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 nn degrees of freedom described by independent generalized coordinates q1,…,qnq_1,\dots,q_n and Lagrangian L(q,q˙,t)L(q,\dot q,t) — for ordinary mechanics, L=T−VL=T-V built as in the Lagrangian-function article — the motion obeys

ddt ⁣(∂L∂q˙i)−∂L∂qi=0,i=1,…,n(1)\frac{\mathrm{d}}{\mathrm{d}t}\!\left(\frac{\partial L}{\partial \dot q_i}\right) - \frac{\partial L}{\partial q_i} = 0, \qquad i = 1,\dots,n \qquad (1)

where: ∂L/∂q˙i\partial L/\partial\dot q_i and ∂L/∂qi\partial L/\partial q_i are partial derivatives taken treating qq, q˙\dot q, tt as independent slots of the function LL; the outer d/dt\mathrm{d}/\mathrm{d}t is a total derivative along the path, acting through q(t)q(t), q˙(t)\dot q(t), and any explicit tt. That distinction — partials inside, total outside — is where most first attempts die, and it is worth a moment: the total derivative produces terms in q¨\ddot q, in q˙\dot q, and in ∂2L/∂q˙i∂t\partial^2L/\partial\dot q_i\partial t, all by the chain rule. The equations acquire physical eyes through two definitions. Name the things being differentiated:

pi≡∂L∂q˙i,Qi≡∂L∂qi(2)p_i \equiv \frac{\partial L}{\partial \dot q_i}, \qquad Q_i \equiv \frac{\partial L}{\partial q_i} \qquad (2)

where: pip_i — the generalized (conjugate) momentum of coordinate qiq_i; QiQ_i — the generalized force. Equation (1) then reads p˙i=Qi\dot p_i = Q_i: rate of change of momentum equals force, Newton's second law in coordinate-free clothing. When qiq_i is a Cartesian position, pi=mq˙ip_i = m\dot q_i; when qiq_i is an angle, pip_i 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

S[q]=∫t1t2L(q(t),q˙(t),t) dt(3)S[q] = \int_{t_1}^{t_2} L\big(q(t),\dot q(t),t\big)\,\mathrm{d}t \qquad (3)

where: SS — the action functional (units J·s), whose anatomy has its own article; here it is the object whose flatness we now cash out.

Derivation AFrom Stationary Action to the Euler Lagrange Equations

The goal is the central equivalence of Lagrangian mechanics: the demand δS=0\delta S = 0 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 nn variations, which is what lets a single scalar condition split into nn separate equations.

Step 1. Embed the path in a family qi(t,ε)=qi(t)+ε ηi(t)q_i(t,\varepsilon) = q_i(t) + \varepsilon\,\eta_i(t) with arbitrary smooth shapes ηi\eta_i obeying ηi(t1)=ηi(t2)=0\eta_i(t_1)=\eta_i(t_2)=0, and differentiate the action under the integral sign:

dSdε∣0=∫t1t2∑i(∂L∂qi ηi+∂L∂q˙i η˙i)dt\left.\frac{\mathrm{d}S}{\mathrm{d}\varepsilon}\right|_{0} = \int_{t_1}^{t_2}\sum_i\left(\frac{\partial L}{\partial q_i}\,\eta_i + \frac{\partial L}{\partial\dot q_i}\,\dot\eta_i\right)\mathrm{d}t

Why the chain rule looks like this: along the family, ∂qi/∂ε=ηi\partial q_i/\partial\varepsilon = \eta_i and ∂q˙i/∂ε=η˙i\partial\dot q_i/\partial\varepsilon = \dot\eta_i — varying the path varies its velocity in lockstep; η\eta and η˙\dot\eta are not independent knobs.

Step 2. The η˙i\dot\eta_i term is the obstruction — the variation appears differentiated. Integrate it by parts to move the derivative onto the known quantity:

∫t1t2∂L∂q˙i η˙i dt=[∂L∂q˙i ηi]t1t2−∫t1t2ηi ddt ⁣(∂L∂q˙i)dt\int_{t_1}^{t_2}\frac{\partial L}{\partial\dot q_i}\,\dot\eta_i\,\mathrm{d}t = \left[\frac{\partial L}{\partial\dot q_i}\,\eta_i\right]_{t_1}^{t_2} - \int_{t_1}^{t_2}\eta_i\,\frac{\mathrm{d}}{\mathrm{d}t}\!\left(\frac{\partial L}{\partial\dot q_i}\right)\mathrm{d}t

Why the boundary term vanishes: ηi(t1)=ηi(t2)=0\eta_i(t_1)=\eta_i(t_2)=0 — the clamping of the endpoints is used exactly here and nowhere else. Free an endpoint and this term survives, adding the natural boundary condition pi=0p_i=0 at the freed end.

Step 3. Collect everything under one integral:

dSdε∣0=∫t1t2∑i(∂L∂qi−ddt∂L∂q˙i)ηi dt(4)\left.\frac{\mathrm{d}S}{\mathrm{d}\varepsilon}\right|_{0} = \int_{t_1}^{t_2}\sum_i\left(\frac{\partial L}{\partial q_i} - \frac{\mathrm{d}}{\mathrm{d}t}\frac{\partial L}{\partial\dot q_i}\right)\eta_i\,\mathrm{d}t \qquad (4)

Step 4. Demand this vanish for every admissible choice of the shapes ηi\eta_i. 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 (t1,t2)(t_1,t_2). Repeat for each ii:

ddt∂L∂q˙i−∂L∂qi=0for each i\frac{\mathrm{d}}{\mathrm{d}t}\frac{\partial L}{\partial\dot q_i} - \frac{\partial L}{\partial q_i} = 0 \quad\text{for each } i

Why independence of the coordinates matters: if the qiq_i were related by an unresolved constraint, the ηi\eta_i 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

ddt∂T∂q˙i−∂T∂qi=Qi,Qi=∑aFa⋅∂ra∂qi(5)\frac{\mathrm{d}}{\mathrm{d}t}\frac{\partial T}{\partial\dot q_i} - \frac{\partial T}{\partial q_i} = Q_i, \qquad Q_i = \sum_a \mathbf F_a\cdot\frac{\partial\mathbf r_a}{\partial q_i} \qquad (5)

where: TT — the kinetic energy in generalized coordinates; QiQ_i — the generalized force of the applied forces only, constraint forces having dropped out. For monogenic forces, Qi=−∂V/∂qiQ_i = -\partial V/\partial q_i with VV velocity-independent, and defining L=T−VL = T - V 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:

L′(q,q˙,t)=L(q,q˙,t)+ddtF(q,t)  ⇒  same equations (1)(6)L'(q,\dot q,t) = L(q,\dot q,t) + \frac{\mathrm{d}}{\mathrm{d}t}F(q,t) \;\Rightarrow\; \text{same equations (1)} \qquad (6)

where: F(q,t)F(q,t) — 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:

∑j∂2L∂q˙i ∂q˙j q¨j  =  ∂L∂qi−∑j∂2L∂q˙i ∂qj q˙j−∂2L∂q˙i ∂t(7)\sum_j \frac{\partial^2 L}{\partial\dot q_i\,\partial\dot q_j}\,\ddot q_j \;=\; \frac{\partial L}{\partial q_i} - \sum_j\frac{\partial^2 L}{\partial\dot q_i\,\partial q_j}\,\dot q_j - \frac{\partial^2 L}{\partial\dot q_i\,\partial t} \qquad (7)

where: the matrix Wij=∂2L/∂q˙i∂q˙jW_{ij} = \partial^2L/\partial\dot q_i\partial\dot q_j — the velocity Hessian, physically the mass matrix — multiplies the accelerations. Everything on the right is known once (q,q˙,t)(q,\dot q,t) are given, so the system can be solved for q¨\ddot q exactly when WW is invertible. For a genuine kinetic energy T=12∑Mij(q)q˙iq˙jT=\tfrac12\sum M_{ij}(q)\dot q_i\dot q_j, W=MW = M 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 wantusenotes
equations of motion from LLeq. (1), one per coordinatepartials inside, total d/dt\mathrm{d}/\mathrm{d}t outside
a Newtonian readingp˙i=Qi\dot p_i = Q_i with (2)momentum shaped by the coordinate
friction or applied torqueseq. (5) with Qi(nc)Q_i^{(\mathrm{nc})} on the rightthe pre-potential form
check two Lagrangians agreegauge test, eq. (6)differ by dF(q,t)/dt\mathrm{d}F(q,t)/\mathrm{d}t?
explicit q¨=…\ddot q = \dots for simulationexpanded form (7)needs invertible mass matrix
the constraint force itselfLagrange multipliersown 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
Derivation BThe 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 LL'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 V(r)V(\mathbf r): L=12m(x˙2+y˙2+z˙2)−V(x,y,z)L = \tfrac12 m(\dot x^2+\dot y^2+\dot z^2) - V(x,y,z). The partials are ∂L/∂x˙=mx˙\partial L/\partial\dot x = m\dot x and ∂L/∂x=−∂V/∂x\partial L/\partial x = -\partial V/\partial x, so (1) gives

mx¨=−∂V∂x(and likewise y,z)m\ddot x = -\frac{\partial V}{\partial x} \quad\text{(and likewise } y, z\text{)}

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 (r,θ)(r,\theta) with a central potential. The velocity has radial and tangential parts, v2=r˙2+r2θ˙2v^2 = \dot r^2 + r^2\dot\theta^2, so

L=12mr˙2+12mr2θ˙2−V(r)L = \tfrac12 m\dot r^2 + \tfrac12 m r^2\dot\theta^2 - V(r)

Why no constraint or force analysis was needed: the coordinate change is absorbed entirely into the expression of TT — the single scalar carries all the geometry.

Step 3. Crank the rr equation: ∂L/∂r˙=mr˙\partial L/\partial\dot r = m\dot r, ∂L/∂r=mrθ˙2−V′(r)\partial L/\partial r = mr\dot\theta^2 - V'(r), hence

mr¨−mrθ˙2=−V′(r)(8)m\ddot r - m r\dot\theta^2 = -V'(r) \qquad (8)

Why the centrifugal term appeared for free: mrθ˙2mr\dot\theta^2 is ∂T/∂r\partial T/\partial r — 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 θ\theta equation: ∂L/∂θ=0\partial L/\partial\theta = 0 — the angle never appears in LL — so (1) collapses to a conservation law:

ddt(mr2θ˙)=0(9)\frac{\mathrm{d}}{\mathrm{d}t}\big(m r^2\dot\theta\big) = 0 \qquad (9)

Why this is a preview of a theorem: a coordinate absent from LL (a cyclic coordinate) always freezes its conjugate momentum — here the angular momentum mr2θ˙mr^2\dot\theta. 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 (r^\hat r and θ^\hat\theta rotate along the path — the usual source of the −rθ˙2-r\dot\theta^2 and 2r˙θ˙2\dot r\dot\theta 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 θ˙=ℓ/(mr2)\dot\theta = \ell/(mr^2) 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
Derivation CWhen 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 Wij=∂2L/∂q˙i∂q˙jW_{ij}=\partial^2L/\partial\dot q_i\partial\dot q_j 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 ∂L/∂q˙i\partial L/\partial\dot q_i is a function of (q,q˙,t)(q,\dot q,t) evaluated along the path. Differentiate it totally:

ddt∂L∂q˙i=∑j∂2L∂q˙i∂q˙j q¨j+∑j∂2L∂q˙i∂qj q˙j+∂2L∂q˙i∂t\frac{\mathrm{d}}{\mathrm{d}t}\frac{\partial L}{\partial\dot q_i} = \sum_j\frac{\partial^2 L}{\partial\dot q_i\partial\dot q_j}\,\ddot q_j + \sum_j\frac{\partial^2 L}{\partial\dot q_i\partial q_j}\,\dot q_j + \frac{\partial^2 L}{\partial\dot q_i\partial t}

Why three terms: the chain rule visits every slot through which time enters — velocities (producing q¨\ddot q), coordinates (producing q˙\dot q), 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): ∑jWij q¨j=Ri(q,q˙,t)\sum_j W_{ij}\,\ddot q_j = R_i(q,\dot q,t) with everything on the right known at each instant.

Step 3. Invert where possible. For a mechanical Lagrangian L=12∑ijMij(q)q˙iq˙j−V(q)L = \tfrac12\sum_{ij}M_{ij}(q)\dot q_i\dot q_j - V(q), the Hessian is the mass matrix M(q)M(q): symmetric and positive-definite whenever the kinetic energy is positive for every nonzero velocity. Then q¨=M−1R\ddot q = M^{-1}R, the system is in normal form, and the standard existence–uniqueness theorem applies to the initial-value problem. Why positive-definiteness is physical: T=12q˙TMq˙>0T = \tfrac12\dot q^{\mathsf T}M\dot q > 0 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 LL is linear in some velocity, that row of WW vanishes: the corresponding "equation of motion" contains no acceleration at all — it is a constraint among (q,q˙)(q,\dot q), 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 L=12mx˙2−VL=\tfrac12 m\dot x^2 - V, W=m>0W = m > 0 and Step 2 reduces to mx¨=−V′(x)m\ddot x = -V'(x) as it must.

Limiting cases

CaseResultMeaning
cyclic coordinate (∂L/∂qk=0\partial L/\partial q_k=0)pk=∂L/∂q˙k=constp_k = \partial L/\partial\dot q_k = \text{const}conservation laws read off by inspection
free particle, Cartesianmx¨=0m\ddot x = 0Newton's first law recovered; straight line
no explicit time (∂L/∂t=0\partial L/\partial t=0)h=∑iq˙i ∂L/∂q˙i−Lh=\sum_i\dot q_i\,\partial L/\partial\dot q_i - L conserved, dh/dt=−∂L/∂t\mathrm{d}h/\mathrm{d}t=-\partial L/\partial tthe energy function / Jacobi integral, own article
small oscillationsMq¨+Kq=0M\ddot{\mathbf q}+K\mathbf q=0normal modes from the Hessian structure of LL
L→L+dF(q,t)/dtL \to L + \mathrm{d}F(q,t)/\mathrm{d}tidentical equationsgauge freedom — Lagrangians are equivalence classes
LL linear in some q˙\dot qHessian row vanishesconstraint, not dynamics; the equation loses its q¨\ddot q

Worked examples

1 · The Atwood machine in three lines (confidence builder)

Masses m1=3.0 kgm_1 = 3.0\ \mathrm{kg} and m2=2.0 kgm_2 = 2.0\ \mathrm{kg} hang from an ideal (massless, frictionless) pulley. Find the acceleration and the speed of m1m_1 after 1.0 s1.0\ \mathrm{s} from rest. (g=9.81 m/s2g = 9.81\ \mathrm{m/s^2})

Figure
The Atwood machine — one coordinate, no tension
m₁ m₂ x inextensible string: m₂ rises exactly as m₁ falls — one degree of freedom the constraint is spent choosing x; the string tension never enters L

Step 1. Spend the constraint on the coordinate. The string is inextensible, so if m1m_1 has descended by xx, m2m_2 has risen by xx: one degree of freedom. Both masses move at speed ∣x˙∣|\dot x|, so T=12(m1+m2)x˙2T = \tfrac12(m_1+m_2)\dot x^2, and taking xx downward-positive for m1m_1, V=−m1gx+m2gxV = -m_1gx + m_2gx. Hence L=12(m1+m2)x˙2+(m1−m2)gxL = \tfrac12(m_1{+}m_2)\dot x^2 + (m_1{-}m_2)gx.

Step 2. Crank equation (1): ∂L/∂x˙=(m1+m2)x˙\partial L/\partial\dot x = (m_1{+}m_2)\dot x and ∂L/∂x=(m1−m2)g\partial L/\partial x = (m_1{-}m_2)g, so (m1+m2)x¨=(m1−m2)g(m_1{+}m_2)\ddot x = (m_1{-}m_2)g.

Step 3. Numbers: x¨=(3.0−2.0)(9.81)3.0+2.0=9.815=1.96 m/s2\ddot x = \dfrac{(3.0-2.0)(9.81)}{3.0+2.0} = \dfrac{9.81}{5} = \boxed{1.96\ \mathrm{m/s^2}}, constant. From rest, after 1.0 s1.0\ \mathrm{s}: v=1.96 m/sv = \boxed{1.96\ \mathrm{m/s}}, having fallen 0.98 m0.98\ \mathrm{m}.

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, Tstr=m1(g−x¨)=3.0(9.81−1.96)=23.5 NT_{\mathrm{str}} = m_1(g-\ddot x) = 3.0(9.81-1.96) = 23.5\ \mathrm{N} — 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 M=2.0 kgM = 2.0\ \mathrm{kg} rolls without friction on a horizontal rail. From it hangs a pendulum: mass m=0.50 kgm = 0.50\ \mathrm{kg} on a light rod of length ℓ=1.0 m\ell = 1.0\ \mathrm{m}. Find the equations of motion, the conserved momentum, and the small-oscillation frequency and period. Compare with a fixed-pivot pendulum.

Figure
Pendulum on a cart — two coordinates, one of them cyclic
M m θ ℓ x x never appears in L — total horizontal momentum conserved a genuinely painful problem with forces; two coordinates and the crank with L

Step 1. Coordinates: cart position xx, pendulum angle θ\theta from the vertical. The bob sits at (x+ℓsin⁡θ, −ℓcos⁡θ)(x+\ell\sin\theta,\, -\ell\cos\theta), so its velocity squared is x˙2+2ℓx˙θ˙cos⁡θ+ℓ2θ˙2\dot x^2 + 2\ell\dot x\dot\theta\cos\theta + \ell^2\dot\theta^2. Assemble the scalar:

L=12(M+m)x˙2+mℓ x˙ θ˙cos⁡θ+12mℓ2θ˙2+mgℓcos⁡θL = \tfrac12(M{+}m)\dot x^2 + m\ell\,\dot x\,\dot\theta\cos\theta + \tfrac12 m\ell^2\dot\theta^2 + mg\ell\cos\theta

Step 2. The xx equation. xx is absent from LL (cyclic!), so equation (1) collapses to conservation of its conjugate momentum:

px=(M+m)x˙+mℓθ˙cos⁡θ=constp_x = (M{+}m)\dot x + m\ell\dot\theta\cos\theta = \text{const}

— the total horizontal momentum of cart plus bob: the rail exerts no horizontal force, and the formalism noticed by inspection.

Step 3. The θ\theta equation. ∂L/∂θ˙=mℓx˙cos⁡θ+mℓ2θ˙\partial L/\partial\dot\theta = m\ell\dot x\cos\theta + m\ell^2\dot\theta; the total derivative (chain rule — the warning above earns its keep) gives mℓx¨cos⁡θ−mℓx˙θ˙sin⁡θ+mℓ2θ¨m\ell\ddot x\cos\theta - m\ell\dot x\dot\theta\sin\theta + m\ell^2\ddot\theta; and ∂L/∂θ=−mℓx˙θ˙sin⁡θ−mgℓsin⁡θ\partial L/\partial\theta = -m\ell\dot x\dot\theta\sin\theta - mg\ell\sin\theta. The x˙θ˙sin⁡θ\dot x\dot\theta\sin\theta terms cancel, leaving ℓθ¨+x¨cos⁡θ+gsin⁡θ=0\ell\ddot\theta + \ddot x\cos\theta + g\sin\theta = 0.

Step 4. Small oscillations about the ground state (θ,θ˙\theta,\dot\theta small, start from px=0p_x=0 so x˙=−mℓM+mθ˙\dot x = -\tfrac{m\ell}{M+m}\dot\theta to first order). Substituting into the θ\theta equation with cos⁡θ→1\cos\theta\to1, sin⁡θ→θ\sin\theta\to\theta: ℓθ¨(1−mM+m)+gθ=0\ell\ddot\theta\big(1-\tfrac{m}{M+m}\big) + g\theta = 0, i.e.

ω2=gℓ M+mM(10)\omega^2 = \frac{g}{\ell}\,\frac{M+m}{M} \qquad (10)

where: the factor (M+m)/M>1(M{+}m)/M > 1 is the recoil correction — the pivot backs away from the bob, shortening the effective swing. Numbers: ω2=9.81×2.52.0×1.0=12.26 s−2\omega^2 = \dfrac{9.81\times2.5}{2.0\times1.0} = 12.26\ \mathrm{s^{-2}}, so ω=3.50 rad/s\omega = \boxed{3.50\ \mathrm{rad/s}} and Tosc=1.79 sT_{\mathrm{osc}} = \boxed{1.79\ \mathrm{s}}.

Step 5. Compare: a fixed-pivot pendulum of the same length has ω0=g/ℓ=3.13 rad/s\omega_0 = \sqrt{g/\ell} = 3.13\ \mathrm{rad/s}, period 2.01 s2.01\ \mathrm{s}. The free cart raises the frequency by 1+m/M=1.25=1.118\sqrt{1+m/M} = \sqrt{1.25} = 1.118 — about 12%12\% faster. Sanity limits: M→∞M\to\infty recovers the fixed pivot; M→0M\to0 sends ω→∞\omega\to\infty (a massless cart cannot anchor any swing). Attempting this with F=ma\mathbf F=m\mathbf a 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
LE
Leonhard Euler
1707–1783 · Basel, St Petersburg and Berlin

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.

History
1687
— Newton's Principia states the laws of motion in geometric language; every problem still demands its own construction.
1736
— Euler's Mechanica recasts Newtonian dynamics as analysis — differential equations replace diagrams.
1744
— Euler's Methodus inveniendi derives the extremal-curve equation, the first general Euler–Lagrange equation, by polygonal approximation.
1755
— Lagrange, aged 19, sends Euler the δ-calculus derivation; Euler adopts the method, names the field, and delays his own publication in the young man's favor.
1788
— Lagrange's Mécanique analytique presents mechanics with "no figures": the equations in full generality, constraints and generalized coordinates included.
1834
— Hamilton exhibits the equations as the stationarity condition of the action integral, unifying the variational and dynamical threads.

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 mr¨−mrθ˙2=−V′(r)m\ddot r-mr\dot\theta^2=-V'(r) and conservation of mr2θ˙mr^2\dot\theta; (3) verify the total-derivative gauge argument; (4) check the energy-function identity dh/dt=−∂L/∂t\mathrm{d}h/\mathrm{d}t=-\partial L/\partial t. No empirical numbers are asserted; all results are symbolic and textbook-standard. Worked-example numbers on this page (Atwood x¨=1.96 m/s2\ddot x = 1.96\ \mathrm{m/s^2}, string tension 23.5 N23.5\ \mathrm{N}; cart-pendulum ω=3.50 rad/s\omega = 3.50\ \mathrm{rad/s}, Tosc=1.79 sT_{\mathrm{osc}} = 1.79\ \mathrm{s} versus 2.01 s2.01\ \mathrm{s} fixed-pivot, recoil factor 1.25=1.118\sqrt{1.25}=1.118) 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 LL, not the trajectory. L(q,q˙,t)L(q,\dot q,t) 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. ∂L/∂q˙\partial L/\partial\dot q 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 q(t)q(t), where the slots become correlated — and that is exactly when the outer d/dt\mathrm{d}/\mathrm{d}t (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, η\eta and η˙\dot\eta 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 q→Q(q,t)q \to Q(q,t) — including coordinates fixed to a rotating turntable or an accelerating elevator — preserve the form of equation (1) exactly. What changes is the expression of TT in the new chart: it acquires terms linear in Q˙\dot Q and terms independent of Q˙\dot Q, and when the crank differentiates those, the centrifugal, Coriolis, and Euler forces emerge automatically as pieces of ∂T/∂Q\partial T/\partial Q 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 λ\lambda makes the force reappear as λ ∂f/∂q\lambda\,\partial f/\partial q, 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 ηi\eta_i 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 LL, the rest staying on the right as generalized forces: ddt∂L/∂q˙i−∂L/∂qi=Qi(nc)\frac{\mathrm{d}}{\mathrm{d}t}\partial L/\partial\dot q_i - \partial L/\partial q_i = Q_i^{(\mathrm{nc})}, with Qi(nc)=∑aFa(nc)⋅∂ra/∂qiQ_i^{(\mathrm{nc})} = \sum_a \mathbf F_a^{(\mathrm{nc})}\cdot\partial\mathbf r_a/\partial q_i. 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 ηi\eta_i freely and separately — that is what splits one integral condition into nn brackets vanishing individually. If your coordinates are secretly related by a constraint f(q,t)=0f(q,t)=0, admissible variations must satisfy ∑i(∂f/∂qi) ηi=0\sum_i(\partial f/\partial q_i)\,\eta_i = 0: 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 λ\lambda 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 L(q,q˙,q¨)L(q,\dot q,\ddot q), stationarity with the appropriate endpoint data gives the Euler–Lagrange equation two integrations by parts deep: ∂L∂q−ddt∂L∂q˙+d2dt2∂L∂q¨=0\frac{\partial L}{\partial q} - \frac{\mathrm{d}}{\mathrm{d}t}\frac{\partial L}{\partial\dot q} + \frac{\mathrm{d}^2}{\mathrm{d}t^2}\frac{\partial L}{\partial\ddot q} = 0 — 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 q¨\ddot q appears in your LL, 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 Wij=∂2L/∂q˙i∂q˙jW_{ij} = \partial^2L/\partial\dot q_i\partial\dot q_j has full rank — Derivation C's condition. For honest mechanical kinetic energies WW is the positive-definite mass matrix and the answer is yes: normal form, 2n2n 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 A0A_0 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 WW 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) h=∑iq˙i ∂L/∂q˙i−Lh = \sum_i\dot q_i\,\partial L/\partial\dot q_i - L, which obeys dh/dt=−∂L/∂t\mathrm{d}h/\mathrm{d}t = -\partial L/\partial t along any solution: when LL carries no explicit clock, hh is a constant of the motion, and for standard scleronomic systems it equals T+VT+V. 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: hh need not equal the mechanical energy when constraints move (a bead on a rotating hoop conserves hh while a motor pumps energy in), and hh is not conserved the moment LL 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.

Before this

Where this leads