Euler–Lagrange Equations for Fields

When a mechanical system has a finite number of degrees of freedom qi(t)q_i(t), its dynamics follow from extremizing S=∫L dtS=\int L\,\mathrm{d}t, giving the familiar Euler–Lagrange equations. A continuous medium — a string, an elastic solid, an electromagnetic field — has a degree of freedom at every point of space. The natural variable is then a field ϕ(x,t)\phi(x,t), and the Lagrangian becomes a spatial integral of a Lagrangian density L\mathcal{L}. The action is now an integral over spacetime, S=∫L d4xS=\int\mathcal{L}\,\mathrm{d}^4x, and L\mathcal{L} depends not only on ϕ\phi but on all of its derivatives ∂μϕ=(∂tϕ,∇ϕ)\partial_\mu\phi=(\partial_t\phi,\nabla\phi). Requiring the action to be stationary under arbitrary variations δϕ\delta\phi that vanish on the boundary of the spacetime region leads, after integration by parts, to a partial differential equation for ϕ\phi — the field Euler–Lagrange equation. This single compact equation contains, as special cases, the one-dimensional wave equation (from the loaded-string continuum limit), the equations of linear elasticity, the Klein–Gordon equation, and Maxwell's equations. The power of the variational route is that symmetries of L\mathcal{L} translate directly into conservation laws via Noether's theorem, and Lorentz invariance is guaranteed whenever L\mathcal{L} is built as a Lorentz scalar. Conceptually the move from particles to fields replaces the index ii labeling particles by the continuous spatial coordinate x\mathbf{x}, sums over particles by integrals, and ordinary time derivatives by spacetime derivatives. The Hamiltonian density and canonical field momentum follow by the same Legendre transform used in particle mechanics, completing the bridge to canonical field theory.

Key takeaways
  • The Euler–Lagrange equations for fields generalize the particle equations of motion to systems with infinitely many degrees of freedom, where the dynamical variable ϕ(x,t)\phi(x,t) is a function of space and time.
  • Starting from a Lagrangian density L(ϕ,∂μϕ,x)\mathcal{L}(\phi,\partial_\mu\phi,x) and the action S=∫L d4xS=\int\mathcal{L}\,\mathrm{d}^4x, demanding δS=0\delta S=0 yields ∂μ ⁣(∂L/∂(∂μϕ))−∂L/∂ϕ=0\partial_\mu\!\left(\partial\mathcal{L}/\partial(\partial_\mu\phi)\right)-\partial\mathcal{L}/\partial\phi=0.
  • The key step is integration by parts in spacetime, with field variations vanishing on the boundary so all surface terms drop.
  • Each independent field component gets its own equation; the spatial derivatives that were a sum over discrete particles become a divergence over a continuum.
  • The formalism is manifestly Lorentz-covariant if L\mathcal{L} is a scalar, making it the natural language for relativistic field theory and the wave equation alike.
  • Spacetime-translation symmetry of L\mathcal{L} produces the conserved stress–energy tensor TμνT^\mu{}_\nu — energy and momentum conservation as one four-divergence.
  • Key idea: Vary the action S=∫L d4xS=\int\mathcal{L}\,\mathrm{d}^4x with respect to ϕ\phi, integrate by parts to move derivatives off δϕ\delta\phi, discard boundary terms, and read off the field equation ∂μ ⁣(∂L∂(∂μϕ))=∂L∂ϕ\partial_\mu\!\left(\dfrac{\partial\mathcal{L}}{\partial(\partial_\mu\phi)}\right)=\dfrac{\partial\mathcal{L}}{\partial\phi}.

Where this lives today

The entire Standard Model of particle physics is one Lagrangian density — a few dozen terms that fit on a mug — and every prediction ever tested at the LHC follows from cranking equation (2) on it. The 2026 frontier works the machinery in both directions. Forward: SMEFT (Standard Model Effective Field Theory) global fits add hundreds of candidate correction terms to L\mathcal{L} and let precision data vote on their coefficients — the field equation crank applied wholesale, by computer algebra. Backward: symbolic-regression and machine-learning pipelines now infer Lagrangian densities from simulation or experimental field data, on the logic that the density is the most compressed lawful description a field admits. Numerical relativity runs the same principle at its most extreme: the Einstein field equations that gravitational-wave observatories integrate to model black-hole mergers are the Euler–Lagrange equations of the Einstein–Hilbert action. For the path from this classical crank to quantum amplitudes — the payoff this chapter has been building toward — see the action-principle-to-QFT capstone.

The physical picture

Picture a row of beads on springs: each bead obeys its own Euler–Lagrange equation, coupled to its neighbours. Let the spacing shrink to zero and the discrete index becomes a continuous label xx; the coupling-to-neighbours term turns into a spatial derivative. The field equation is just the bead equation in the limit of infinitely many, infinitely close beads — the loaded-string article performs that limit explicitly, by both the Newtonian and the variational route, and finds the same PDE either way. This article takes the variational route as primary and runs it in full generality. The right mental model is a machine. In goes a single scalar function — the Lagrangian density, your one-line declaration of what the medium is. The crank is always the same: one formal partial per slot, one spacetime derivative per gradient slot, assemble, set to zero. Out comes the equation of motion. Change the input and the same crank yields the wave equation, Poisson's equation, or Klein–Gordon; nothing about the machinery changes.

Figure
One machine, many equations — every classical field equation is the same variational crank applied to a different one-line Lagrangian density
Input: choose 𝓛 string: kinetic - stretch scalar + mass term static + source the EL crank ∂𝓛/∂φ , ∂𝓛/∂(∂φ) then one ∂ per slot Output: field PDE wave equation Klein-Gordon Poisson equation Same crank every time — only the one-line declaration of the medium changes Symmetries of the input become conservation laws of the output (Noether)

The structure ∂μ(∂L/∂(∂μϕ))=∂L/∂ϕ\partial_\mu(\partial\mathcal{L}/\partial(\partial_\mu\phi))=\partial\mathcal{L}/\partial\phi reads: the divergence of the momentum-flux four-vector equals the force from the potential part of L\mathcal{L}. The time component reproduces ordinary p˙=F\dot p=F per unit volume; the space components are the new ingredient describing how disturbances propagate. The same bookkeeping, applied to translations instead of variations, yields a four-by-four array of conserved fluxes — the stress–energy tensor, whose components have direct physical readings.

Figure
The stress-energy tensor as a table of fluxes — each component measures how much energy or momentum crosses a surface of constant time or constant position
x t constant-t face: densities T⁰₀ , T⁰₁ constant-x face: fluxes T¹₀ , T¹₁ Reading the components T⁰₀ — energy density 𝓗 T¹₀ — energy flux (power) T⁰₁ — momentum density T¹₁ — momentum flux (stress) ∂μ Tμν = 0 : what leaves the faces equals what the cell loses One conservation law per translation symmetry — four in all, packed into one tensor

The core equations

The starting point assigns a number to every conceivable field history over a spacetime region. Nature's choice of history is the stationary one. Compared with the particle action, the only change is the integration measure — and that change is the whole subject.

S[ϕ]=∫ΩL(ϕ,∂μϕ,x) d4x(1)S[\phi]=\int_\Omega \mathcal{L}\big(\phi,\partial_\mu\phi,x\big)\,\mathrm{d}^4x \qquad (1)

where: SS — action functional, a number assigned to each field history; L\mathcal{L} — Lagrangian density; ϕ\phi — the field, the dynamical variable at each spacetime point; ∂μϕ\partial_\mu\phi — four-gradient (∂tϕ,∇ϕ)(\partial_t\phi,\nabla\phi); Ω\Omega — spacetime region; d4x=dt d3x\mathrm{d}^4x=\mathrm{d}t\,\mathrm{d}^3x. The density may depend on xx explicitly (inhomogeneous media); when it does not, conservation laws follow — see Derivation B. Stationarity delivers the master equation of classical field theory. It is derived as Derivation A; memorize its shape, because every field equation you will ever derive is this line with a specific L\mathcal{L} substituted.

∂μ ⁣(∂L∂(∂μϕ))−∂L∂ϕ=0(2)\partial_\mu\!\left(\frac{\partial\mathcal{L}}{\partial(\partial_\mu\phi)}\right)-\frac{\partial\mathcal{L}}{\partial\phi}=0 \qquad (2)

where: ∂μ\partial_\mu — total spacetime derivative, summed over μ=0,1,2,3\mu=0,1,2,3 (Einstein convention); ∂L/∂(∂μϕ)\partial\mathcal{L}/\partial(\partial_\mu\phi) — formal partial treating each ∂μϕ\partial_\mu\phi as an independent slot; ∂L/∂ϕ\partial\mathcal{L}/\partial\phi — formal partial with respect to the field value. Read it as: divergence of momentum flux equals force density. The particle equation of the finite-DOF Euler–Lagrange article is the special case where the field carries no space dependence at all. For non-relativistic problems it is often clearer to split time from space. The content is identical; only the bookkeeping changes. This is the form used throughout the elasticity articles later in the chapter.

∂∂t ⁣(∂L∂ϕ˙)+∇ ⁣⋅ ⁣(∂L∂(∇ϕ))−∂L∂ϕ=0(3)\frac{\partial}{\partial t}\!\left(\frac{\partial\mathcal{L}}{\partial\dot\phi}\right)+\nabla\!\cdot\!\left(\frac{\partial\mathcal{L}}{\partial(\nabla\phi)}\right)-\frac{\partial\mathcal{L}}{\partial\phi}=0 \qquad (3)

where: ϕ˙=∂tϕ\dot\phi=\partial_t\phi — time rate of change of the field; ∇ϕ\nabla\phi — spatial gradient; ∂L/∂(∇ϕ)\partial\mathcal{L}/\partial(\nabla\phi) — vector of partials with respect to each gradient component. The first term is the time derivative of the canonical momentum density; the second is the divergence of the stress the medium exerts on itself. The quantity under the time derivative deserves its own name — it is the handle by which Hamiltonian field theory grabs the formalism, developed fully in the Hamiltonian-density article.

π(x)≡∂L∂ϕ˙(4)\pi(x)\equiv\frac{\partial\mathcal{L}}{\partial\dot\phi} \qquad (4)

where: π\pi — canonical momentum density conjugate to ϕ\phi; for the string π=μϕ˙\pi=\mu\dot\phi, mass per length times transverse velocity. It is a density: only ∫π dx\int\pi\,\mathrm{d}x has the units of momentum-like quantities. When L\mathcal{L} has no explicit dependence on the spacetime coordinates, translations are symmetries, and Noether's theorem hands back four conserved currents packed into one object. Its conservation is proved in Derivation B; its component-by-component physical reading is the second figure above.

Tμν=∂L∂(∂μϕ) ∂νϕ−δνμ L,∂μTμν=0(5)T^\mu{}_\nu=\frac{\partial\mathcal{L}}{\partial(\partial_\mu\phi)}\,\partial_\nu\phi-\delta^\mu_\nu\,\mathcal{L},\qquad \partial_\mu T^\mu{}_\nu=0 \qquad (5)

where: TμνT^\mu{}_\nu — canonical stress–energy tensor, the flux of ν\nu-momentum through a surface of constant xμx^\mu; δνμ\delta^\mu_\nu — Kronecker delta. T00T^0{}_0 is the Hamiltonian density H\mathcal{H}; Ti0T^i{}_0 is the energy flux; T0iT^0{}_i the momentum density; TijT^i{}_j the stress. For the string, T10=−Tϕ′ϕ˙T^1{}_0=-T\phi'\dot\phi reproduces the energy flux found by direct computation in the Lagrangian-density article. The two workhorse examples, cranked in full below (Derivation C for Klein–Gordon; the string case in three lines): the stretched string and the free relativistic scalar.

L=12μ (∂tϕ)2−12T (∂xϕ)2  ⇒  μ ∂t2ϕ−T ∂x2ϕ=0(6)\mathcal{L}=\tfrac{1}{2}\mu\,(\partial_t\phi)^2-\tfrac{1}{2}T\,(\partial_x\phi)^2\;\Rightarrow\;\mu\,\partial_t^2\phi-T\,\partial_x^2\phi=0 \qquad (6)

where: μ\mu — mass per unit length; TT — tension. The three slot-partials are ∂L/∂ϕ=0\partial\mathcal{L}/\partial\phi=0, ∂L/∂ϕ˙=μϕ˙\partial\mathcal{L}/\partial\dot\phi=\mu\dot\phi, ∂L/∂ϕ′=−Tϕ′\partial\mathcal{L}/\partial\phi'=-T\phi'; equation (3) assembles them into the wave equation with speed T/μ\sqrt{T/\mu} — full solution theory in the wave-equation article.

Which form when:

SituationUseWhy
Relativistic or index-heavy theorycovariant form (2)one term per spacetime index, Lorentz covariance manifest
String, elasticity, any lab-frame medium3+1 form (3)time and space play visibly different roles
Several fields ϕa\phi^a(2) once per component aacomponents vary independently
Energy/momentum bookkeeping(5)conservation laws without solving the PDE
Derivation AField Euler-Lagrange equation from the stationary action

We derive equation (2) from δS=0\delta S=0. The strategy is the field version of the finite-DOF proof — expand to first order, integrate by parts, invoke the arbitrariness of the variation — executed once in covariant notation so that all four spacetime derivatives are handled in a single stroke. The point to watch is the boundary condition: δϕ\delta\phi must vanish on the whole three-dimensional boundary ∂Ω\partial\Omega of the spacetime region, which pins the field at initial and final times and at spatial infinity simultaneously.

Step 1. Vary ϕ→ϕ+δϕ\phi\to\phi+\delta\phi with δϕ∣∂Ω=0\delta\phi|_{\partial\Omega}=0 and expand L\mathcal{L} to first order:

δS=∫Ω ⁣[∂L∂ϕ δϕ+∂L∂(∂μϕ) ∂μ(δϕ)]d4x\delta S=\int_\Omega\!\left[\frac{\partial\mathcal{L}}{\partial\phi}\,\delta\phi+\frac{\partial\mathcal{L}}{\partial(\partial_\mu\phi)}\,\partial_\mu(\delta\phi)\right]\mathrm{d}^4x

Why: the chain rule distributes the variation over the slots of L\mathcal{L}, and δ(∂μϕ)=∂μ(δϕ)\delta(\partial_\mu\phi)=\partial_\mu(\delta\phi) because the variation compares two configurations at the same spacetime point, so label-derivatives commute with it.

Step 2. Integrate the gradient term by parts using ∂L∂(∂μϕ)∂μ(δϕ)=∂μ ⁣(∂L∂(∂μϕ)δϕ)−∂μ ⁣(∂L∂(∂μϕ))δϕ\frac{\partial\mathcal{L}}{\partial(\partial_\mu\phi)}\partial_\mu(\delta\phi)=\partial_\mu\!\big(\frac{\partial\mathcal{L}}{\partial(\partial_\mu\phi)}\delta\phi\big)-\partial_\mu\!\big(\frac{\partial\mathcal{L}}{\partial(\partial_\mu\phi)}\big)\delta\phi:

δS=∮∂Ω∂L∂(∂μϕ) δϕ dSμ+∫Ω ⁣[∂L∂ϕ−∂μ∂L∂(∂μϕ)]δϕ d4x\delta S=\oint_{\partial\Omega}\frac{\partial\mathcal{L}}{\partial(\partial_\mu\phi)}\,\delta\phi\,\mathrm{d}S_\mu+\int_\Omega\!\left[\frac{\partial\mathcal{L}}{\partial\phi}-\partial_\mu\frac{\partial\mathcal{L}}{\partial(\partial_\mu\phi)}\right]\delta\phi\,\mathrm{d}^4x

Why: the total-divergence piece converts to a boundary flux by Gauss's theorem in four dimensions — this one move replaces the separate time and space integrations by parts of the 3+1 treatment.

Step 3. The boundary flux vanishes because δϕ=0\delta\phi=0 everywhere on ∂Ω\partial\Omega. What remains must vanish for every interior variation, and an integral against an arbitrary function vanishes only if its coefficient does:

∂μ ⁣(∂L∂(∂μϕ))−∂L∂ϕ=0\partial_\mu\!\left(\frac{\partial\mathcal{L}}{\partial(\partial_\mu\phi)}\right)-\frac{\partial\mathcal{L}}{\partial\phi}=0

Why: choose δϕ\delta\phi to be a bump localized around any point of Ω\Omega; the integral then samples the bracket there — the fundamental lemma of the calculus of variations, applied in four dimensions.

Step 4. For several fields ϕa\phi^a, the variations δϕa\delta\phi^a are independent, so the argument runs once per component and yields one equation per field. Two quick checks confirm the result: suppressing all spatial dependence collapses equation (2) to the familiar particle equation ddt(∂L/∂q˙)=∂L/∂q\frac{\mathrm{d}}{\mathrm{d}t}(\partial L/\partial\dot q)=\partial L/\partial q, and substituting the string density (6) yields μϕ¨=Tϕ′′\mu\ddot\phi=T\phi'', matching the Newtonian bead-chain limit.

Go deeper · Derivation B · 1 minConservation of the stress-energy tensor from translation symmetry
Derivation BConservation of the stress-energy tensor from translation symmetry

We show that when L\mathcal{L} carries no explicit xx-dependence, the tensor TμνT^\mu{}_\nu of equation (5) is divergence-free on shell — that is, once the field equation holds. The strategy is direct: differentiate the definition, then eliminate the force term using the Euler–Lagrange equation. Watch the distinction between the total derivative ∂νL\partial_\nu\mathcal{L} (through the field's dependence on xx) and explicit dependence (absent by assumption) — the entire theorem lives in that distinction.

Step 1. Differentiate the definition of TμνT^\mu{}_\nu with the product rule:

∂μTμν=∂μ ⁣(∂L∂(∂μϕ))∂νϕ+∂L∂(∂μϕ) ∂μ∂νϕ−∂νL\partial_\mu T^\mu{}_\nu=\partial_\mu\!\left(\frac{\partial\mathcal{L}}{\partial(\partial_\mu\phi)}\right)\partial_\nu\phi+\frac{\partial\mathcal{L}}{\partial(\partial_\mu\phi)}\,\partial_\mu\partial_\nu\phi-\partial_\nu\mathcal{L}

Why: δνμ∂μ=∂ν\delta^\mu_\nu\partial_\mu=\partial_\nu turns the last term of the definition into the total derivative of the density along direction ν\nu.

Step 2. Expand ∂νL\partial_\nu\mathcal{L} by the chain rule through the field:

∂νL=∂L∂ϕ ∂νϕ+∂L∂(∂μϕ) ∂ν∂μϕ\partial_\nu\mathcal{L}=\frac{\partial\mathcal{L}}{\partial\phi}\,\partial_\nu\phi+\frac{\partial\mathcal{L}}{\partial(\partial_\mu\phi)}\,\partial_\nu\partial_\mu\phi

Why: with no explicit xx-dependence, L\mathcal{L} changes from point to point only because ϕ\phi and ∂μϕ\partial_\mu\phi do; an explicit-dependence term (∂νL)expl(\partial_\nu\mathcal{L})_{\text{expl}} would survive here and break the conservation law — which is exactly what happens in an inhomogeneous medium.

Step 3. Subtract: the mixed-derivative terms cancel (partial derivatives commute), leaving

∂μTμν=[∂μ∂L∂(∂μϕ)−∂L∂ϕ]∂νϕ=0\partial_\mu T^\mu{}_\nu=\left[\partial_\mu\frac{\partial\mathcal{L}}{\partial(\partial_\mu\phi)}-\frac{\partial\mathcal{L}}{\partial\phi}\right]\partial_\nu\phi=0

Why: the bracket is precisely the Euler–Lagrange combination, zero on solutions — conservation is a property of the dynamics, inherited from symmetry exactly as Noether's theorem prescribes.

Step 4. The ν=0\nu=0 component is energy conservation, ∂tH+∇⋅SE=0\partial_t\mathcal{H}+\nabla\cdot\mathbf{S}_E=0; the ν=i\nu=i components are momentum conservation with the stress TjiT^j{}_i as momentum flux. As a check, the string density gives T00=12μϕ˙2+12Tϕ′2T^0{}_0=\tfrac12\mu\dot\phi^2+\tfrac12 T\phi'^2 and T10=−Tϕ′ϕ˙T^1{}_0=-T\phi'\dot\phi, reproducing the expected energy density and energy flux.

Go deeper · Derivation C · 1 minKlein-Gordon equation from a relativistic scalar Lagrangian
Derivation CKlein-Gordon equation from a relativistic scalar Lagrangian

We crank the machine once on a relativistic input to show that a Lorentz-scalar density yields a manifestly covariant field equation. Conventions: metric signature (+,−,−,−)(+,-,-,-), units c=1c=1, so ∂μϕ ∂μϕ=(∂tϕ)2−(∇ϕ)2\partial_\mu\phi\,\partial^\mu\phi=(\partial_t\phi)^2-(\nabla\phi)^2. The step to watch is the differentiation of the quadratic gradient term with respect to ∂μϕ\partial_\mu\phi — the factor 2 and the raised index both come from careful index hygiene.

Step 1. Declare the medium — a free scalar field of mass parameter mm:

L=12 ∂νϕ ∂νϕ−12m2ϕ2\mathcal{L}=\tfrac{1}{2}\,\partial_\nu\phi\,\partial^\nu\phi-\tfrac{1}{2}m^2\phi^2

Why: this is the most general quadratic Lorentz scalar with at most first derivatives — the relativistic sibling of the string density, with the mass term playing the role of a local restoring force.

Step 2. Field-slot partial:

∂L∂ϕ=−m2ϕ\frac{\partial\mathcal{L}}{\partial\phi}=-m^2\phi

Why: only the mass term contains the undifferentiated field.

Step 3. Gradient-slot partial. Write ∂νϕ ∂νϕ=gνρ ∂νϕ ∂ρϕ\partial_\nu\phi\,\partial^\nu\phi=g^{\nu\rho}\,\partial_\nu\phi\,\partial_\rho\phi and differentiate with respect to ∂μϕ\partial_\mu\phi: each of the two factors contributes a Kronecker delta, giving 2gμρ∂ρϕ2g^{\mu\rho}\partial_\rho\phi, and the prefactor 12\tfrac12 absorbs the 2:

∂L∂(∂μϕ)=∂μϕ\frac{\partial\mathcal{L}}{\partial(\partial_\mu\phi)}=\partial^\mu\phi

Why: this is the field-theory analogue of ∂(12mq˙2)/∂q˙=mq˙\partial(\tfrac12 m\dot q^2)/\partial\dot q=m\dot q; the metric contraction is what raises the index on the surviving gradient.

Step 4. Assemble equation (2):

∂μ∂μϕ+m2ϕ=0i.e.(□+m2) ϕ=0\partial_\mu\partial^\mu\phi+m^2\phi=0\qquad\text{i.e.}\qquad(\Box+m^2)\,\phi=0

Why: the d'Alembertian □=∂μ∂μ=∂t2−∇2\Box=\partial_\mu\partial^\mu=\partial_t^2-\nabla^2 is built from scalars, so the equation holds in every inertial frame without further checking.

Step 5. Plane waves ϕ∝cos⁡(kx−ωt)\phi\propto\cos(kx-\omega t) solve it when ω2=k2+m2\omega^2=k^2+m^2 (c=1c=1) — the Klein–Gordon dispersion relation, whose numbers are exercised in Worked example 2. Setting m=0m=0 recovers the massless wave equation. A dimension check in physical units restores ω2=c2k2+(mc2/ℏ)2\omega^2=c^2k^2+(mc^2/\hbar)^2. The string-on-foundation dispersion relation is this same equation in a non-relativistic costume.

Limiting cases

Specific Lagrangian densities collapse the general equation to familiar PDEs:

CaseResultMeaning
Vibrating stringL=12μ (∂tϕ)2−12T (∂xϕ)2\mathcal{L}=\tfrac{1}{2}\mu\,(\partial_t\phi)^2-\tfrac{1}{2}T\,(\partial_x\phi)^2Gives μ ∂t2ϕ−T ∂x2ϕ=0\mu\,\partial_t^2\phi-T\,\partial_x^2\phi=0, the wave equation with speed v=T/μv=\sqrt{T/\mu}.
Free scalar fieldL=12∂μϕ ∂μϕ−12m2ϕ2\mathcal{L}=\tfrac{1}{2}\partial_\mu\phi\,\partial^\mu\phi-\tfrac{1}{2}m^2\phi^2Gives the Klein–Gordon equation (□+m2)ϕ=0(\Box+m^2)\phi=0 in units ℏ=c=1\hbar=c=1.
Static, no time dependenceL=−12(∇ϕ)2−ρ ϕ\mathcal{L}=-\tfrac{1}{2}(\nabla\phi)^2-\rho\,\phiYields Poisson's equation ∇2ϕ=−ρ\nabla^2\phi=-\rho (electrostatics, steady elasticity).
Many fields ϕa\phi^a∂μ ⁣(∂L∂(∂μϕa))=∂L∂ϕa\partial_\mu\!\left(\dfrac{\partial\mathcal{L}}{\partial(\partial_\mu\phi^a)}\right)=\dfrac{\partial\mathcal{L}}{\partial\phi^a}One equation per component; vector/tensor fields (elasticity, electromagnetism) follow directly.
No spatial dependenceϕ(x,t)→q(t)\phi(x,t)\to q(t)The divergence term dies and the particle Euler–Lagrange equation returns — fields contain particles as the zero-mode limit.

Worked examples

Example 1 — piano wire, from density to frequency (confidence builder). A plain steel piano string of diameter d=0.60 mmd=0.60\ \mathrm{mm} (steel density ρ=7850 kg/m3\rho=7850\ \mathrm{kg/m^3}) is stretched to tension T=660 NT=660\ \mathrm{N} over a speaking length L=0.62 mL=0.62\ \mathrm{m}. Use the field Euler–Lagrange machinery to predict its fundamental frequency.

Step 1. Linear mass density: μ=ρ πd2/4=7850×π×(6.0×10−4)2/4=2.22×10−3 kg/m\mu=\rho\,\pi d^2/4=7850\times\pi\times(6.0\times10^{-4})^2/4=2.22\times10^{-3}\ \mathrm{kg/m}.

Step 2. The medium's declaration is L=12μϕ˙2−12Tϕ′2\mathcal{L}=\tfrac12\mu\dot\phi^2-\tfrac12 T\phi'^2. Slot partials: ∂L/∂ϕ=0\partial\mathcal{L}/\partial\phi=0, ∂L/∂ϕ˙=μϕ˙\partial\mathcal{L}/\partial\dot\phi=\mu\dot\phi, ∂L/∂ϕ′=−Tϕ′\partial\mathcal{L}/\partial\phi'=-T\phi'. Equation (3) assembles to μϕ¨−Tϕ′′=0\mu\ddot\phi-T\phi''=0.

Step 3. Wave speed: c=T/μ=660/2.22×10−3=2.97×105=545 m/sc=\sqrt{T/\mu}=\sqrt{660/2.22\times10^{-3}}=\sqrt{2.97\times10^{5}}=545\ \mathrm{m/s}.

Step 4. A string clamped at both ends supports standing waves with λ1=2L\lambda_1=2L, so f1=c/2L=545/(2×0.62)=440 Hzf_1=c/2L=545/(2\times0.62)=440\ \mathrm{Hz}.

The variational crank predicts concert-pitch A4 (440 Hz) from nothing but the wire's diameter, its material, and its tension — and the ~660 N is why a full piano frame must hold about 20 tonnes of accumulated string tension.

Example 2 — Klein–Gordon dispersion with the pion's numbers (exam level). The neutral pion field has mass energy mc2=135.0 MeVmc^2=135.0\ \mathrm{MeV}. For a classical Klein–Gordon wave of this field with wavenumber k=1.00 fm−1=1.00×1015 m−1k=1.00\ \mathrm{fm^{-1}}=1.00\times10^{15}\ \mathrm{m^{-1}}, find the angular frequency, the phase velocity, and the group velocity. (ℏ=6.582×10−22 MeV s\hbar=6.582\times10^{-22}\ \mathrm{MeV\,s}, c=2.998×108 m/sc=2.998\times10^{8}\ \mathrm{m/s}.)

Step 1. Restore units in the dispersion relation from Derivation C: ω2=c2k2+ω02\omega^2=c^2k^2+\omega_0^2 with ω0=mc2/ℏ=135.0/(6.582×10−22)=2.051×1023 rad/s\omega_0=mc^2/\hbar=135.0/(6.582\times10^{-22})=2.051\times10^{23}\ \mathrm{rad/s}.

Step 2. Spatial term: ck=(2.998×108)(1.00×1015)=2.998×1023 s−1ck=(2.998\times10^{8})(1.00\times10^{15})=2.998\times10^{23}\ \mathrm{s^{-1}}.

Step 3. Combine: ω2=(2.998×1023)2+(2.051×1023)2=(8.99+4.21)×1046=1.320×1047\omega^2=(2.998\times10^{23})^2+(2.051\times10^{23})^2=(8.99+4.21)\times10^{46}=1.320\times10^{47}, so ω=3.633×1023 rad/s\omega=3.633\times10^{23}\ \mathrm{rad/s}.

Step 4. Phase velocity: vp=ω/k=3.633×108 m/s=1.21cv_p=\omega/k=3.633\times10^{8}\ \mathrm{m/s}=1.21c — superluminal, and harmless, because crests carry no information.

Step 5. Group velocity: vg=dω/dk=c2k/ω=(8.99×1016)(1015)/(3.633×1023)=2.474×108 m/s=0.825cv_g=\mathrm{d}\omega/\mathrm{d}k=c^2k/\omega=(8.99\times10^{16})(10^{15})/(3.633\times10^{23})=2.474\times10^{8}\ \mathrm{m/s}=0.825c.

Check: vp vg=(1.21c)(0.825c)=1.00 c2v_p\,v_g=(1.21c)(0.825c)=1.00\,c^2 — the Klein–Gordon identity vpvg=c2v_pv_g=c^2 holds to rounding. ω=3.63×1023 rad/s\omega=3.63\times10^{23}\ \mathrm{rad/s}, vp=1.21cv_p=1.21c, vg=0.83cv_g=0.83c; the mass term slows energy transport below cc while pushing crest speed above it.

Origins · 1 minLeonhard Euler and how this was discovered
LE
Leonhard Euler
1707–1783 · Basel, St Petersburg and Berlin

Euler built the calculus of variations essentially alone: his 1744 Methodus inveniendi turned "find the curve that extremizes an integral" from a bag of tricks into an equation — the one that now bears his name jointly with Lagrange, who in 1755, aged nineteen, sent Euler the clean δ\delta-notation derivation that replaced Euler's polygonal approximations. Euler's response set the tone for scientific generosity: he held back his own publications so the young man's method would get credit. Euler never saw a field theory, but the equation he forged is indifferent to how many degrees of freedom you feed it; the passage from his broken-line curves to today's ∂μ(∂L/∂(∂μϕ))\partial_\mu(\partial\mathcal{L}/\partial(\partial_\mu\phi)) required changing the index set, not the idea. Blind for his last seventeen years, he produced roughly half his output in that darkness, computing in his head what others could not manage on paper.

History
1744
— Euler's Methodus inveniendi founds the calculus of variations with the first general extremal equation
1755
— Lagrange's letter to Euler introduces the delta-variation; the Euler–Lagrange equation takes its modern form
1788
— Mécanique analytique makes the variational principle the foundation of mechanics
1915
— Noether, at Göttingen, links every continuous symmetry of an action to a conservation law
1928
— Dirac's equation joins Klein–Gordon and Maxwell as field Euler–Lagrange equations, completing the variational toolkit of early quantum field theory

Going further

References. Goldstein, Classical Mechanics, 3rd ed., §13.1–13.3 · Landau & Lifshitz, Mechanics (Vol. 1), §32; Classical Theory of Fields (Vol. 2), §27, §32 · Morin, Introduction to Classical Mechanics, Ch. on coupled oscillators and the continuum · Taylor, Classical Mechanics, Ch. 16 Key results to keep in mind: the variation δS\delta S and integration by parts yield the field EL equation; the loaded-string second-difference limit gives v=T/μv=\sqrt{T/\mu}; the Klein–Gordon equation follows from L=12∂μϕ∂μϕ−12m2ϕ2\mathcal{L}=\tfrac12\partial_\mu\phi\partial^\mu\phi-\tfrac12 m^2\phi^2; and ∂μTμν=0\partial_\mu T^\mu{}_\nu=0 follows from the field equation on shell.

Builds on: Lagrangian Density and Continuum Lagrangian Formalism · Discrete Loaded String and the Continuum Limit · Four-Vectors and Minkowski Spacetime Leads to: The One-Dimensional Wave Equation · Hamiltonian Density and Canonical Field Momentum · Elastic Waves in Solids

In Derivation C the index migrates upstairs — the gradient-slot partial comes out with a raised index. Where does that actually come from?

From the metric hiding inside the contraction. Write the kinetic term as 12gνρ∂νϕ ∂ρϕ\tfrac12 g^{\nu\rho}\partial_\nu\phi\,\partial_\rho\phi: the differentiation variable ∂μϕ\partial_\mu\phi carries a lower index, and each of the two factors matches it through a Kronecker delta, leaving gμρ∂ρϕ=∂μϕg^{\mu\rho}\partial_\rho\phi=\partial^\mu\phi. The metric is the only object that raises the index, and the factor 2 from the two identical factors cancels the 12\tfrac12. If you work in the (−,+,+,+)(-,+,+,+) signature instead, signs shuffle consistently and the final equation is unchanged — but mixing conventions mid-calculation is the classic way to manufacture a wrong sign on the mass term.

When there are several fields, or a complex field, do I really get to vary each one independently?

Yes for genuinely independent components: the variations δϕa\delta\phi^a are arbitrary separately, so each yields its own equation. For a complex scalar the honest statement is that ϕ=(ϕ1+iϕ2)/2\phi=(\phi_1+i\phi_2)/\sqrt{2} has two real components; varying ϕ\phi and its conjugate "as if independent" is a change of variables from (ϕ1,ϕ2)(\phi_1,\phi_2) to (ϕ,ϕ∗)(\phi,\phi^*) — linear and invertible, hence legitimate. It is a bookkeeping convenience, not a physical claim: the equation from varying ϕ∗\phi^* is the conjugate of the one from varying ϕ\phi, and together they carry exactly the information of the two real equations.

Is the field equation just Newton's second law in disguise?

Locally, yes — and that is a feature. The 3+1 form reads ∂tπ=−∇⋅(stress)+(force density)\partial_t\pi=-\nabla\cdot(\text{stress})+(\text{force density}): rate of change of momentum density equals net force per unit volume, which is F=maF=ma for an infinitesimal cell of the medium. What the variational route adds is universality and bookkeeping: one scalar function generates the equation of motion AND the energy density AND the stress AND the conservation laws, all mutually consistent by construction. Deriving those from Newtonian cell-by-cell arguments is possible (the elasticity articles do it) but laborious, and consistency must then be checked by hand.

What happens to the stress-energy conservation law if the density depends on position explicitly?

It breaks, informatively. Repeating Derivation B with an explicit-dependence term gives ∂μTμν=−(∂νL)explicit\partial_\mu T^\mu{}_\nu=-(\partial_\nu\mathcal{L})_{\text{explicit}}. A string with position-dependent tension T(x)T(x) does not conserve field momentum: the inhomogeneity exerts a net force, exactly as a ball on a hilly landscape exchanges momentum with the ground. Energy fails similarly if L\mathcal{L} depends on tt (a parametrically driven medium). Noether's accounting is precise: you lose exactly the conservation laws whose symmetries the explicit dependence destroys, and the loss rate is computable.

Why is the sign of the gradient term negative in every Lagrangian density here?

Because gradients cost potential energy, and L\mathcal{L} is kinetic minus potential. A curved string element is stretched; a spatially varying field configuration stores energy in the springs of the underlying chain. In the relativistic scalar form the relative minus sign inside ∂μϕ ∂μϕ=(∂tϕ)2−(∇ϕ)2\partial_\mu\phi\,\partial^\mu\phi=(\partial_t\phi)^2-(\nabla\phi)^2 is dictated by the metric signature, and the overall sign is fixed by demanding the kinetic term come out positive. Get the relative sign wrong and the "field equation" becomes elliptic in time — Laplace-like — which propagates nothing and blows up initial-value problems: an immediate diagnostic that a sign slipped.

The equation involves second derivatives, but the density only contains first derivatives. Where does the second derivative come from?

From the outer ∂μ\partial_\mu acting on a quantity that already contains ∂μϕ\partial_\mu\phi. The slot partial ∂L/∂(∂μϕ)\partial\mathcal{L}/\partial(\partial_\mu\phi) is an expression in first derivatives (e.g. μϕ˙\mu\dot\phi for the string); applying the total spacetime derivative then produces second derivatives (μϕ¨\mu\ddot\phi). This is the same structure as the particle case, where ddt(mq˙)=mq¨\frac{\mathrm{d}}{\mathrm{d}t}(m\dot q)=m\ddot q. Densities containing second derivatives outright would produce fourth-order equations — see the beam-bending discussion in the Lagrangian-density article's FAQ.

Do dissipative media have Euler-Lagrange field equations?

Not directly — friction is not variational. The action principle produces time-reversible dynamics, and a damping term +γϕ˙+\gamma\dot\phi in a field equation cannot come from any local L(ϕ,∂ϕ)\mathcal{L}(\phi,\partial\phi). The workarounds mirror particle mechanics: a Rayleigh dissipation functional added alongside the variational terms, effective doubled-field actions, or explicitly time-dependent densities like eγtLe^{\gamma t}\mathcal{L} that mimic decay at the price of broken time-translation symmetry (and hence non-conserved TμνT^\mu{}_\nu — consistently, since dissipation really does drain field energy to unmodeled microscopic degrees of freedom).

Before this

Where this leads