physics2u
Tier
⌕ Search ⌘K
Derivation

Euler-Lagrange Equations for Fields

D-366 Home PU-402 Threads fields · energy Depends on hamiltons-principle, minkowski-metric-signature
Statement

For a classical field \(\phi(x)\) with Lagrangian density \(\mathcal{L}(\phi,\partial_\mu\phi)\), the action \(S=\int_\Omega \mathcal{L}\,d^4x\) is stationary under variations \(\delta\phi\) that vanish on the boundary \(\partial\Omega\) if and only if the field satisfies the Euler–Lagrange field equation \(\partial_\mu\!\left(\dfrac{\partial\mathcal{L}}{\partial(\partial_\mu\phi)}\right)-\dfrac{\partial\mathcal{L}}{\partial\phi}=0\).

Why it matters

This is the single equation that turns a chosen Lagrangian density into a field's equation of motion. Specify \(\mathcal{L}\), turn the crank, and out come the Klein–Gordon equation, Maxwell's equations, the Dirac equation and every classical field theory built on Hamilton's principle. The whole modern practice of "write down a Lagrangian" rests on it.

It also makes the connection between symmetry and conservation explicit: because the dynamics come from a variational principle, Noether's theorem attaches a conserved current to every continuous symmetry of \(\mathcal{L}\). The energy and momentum threads of this unit both flow from here.

Assumptions
The action is a local integral of \(\mathcal{L}(\phi,\partial_\mu\phi)\), depending on \(\phi\) and its first derivatives only.If \(\mathcal{L}\) depends on \(\partial_\mu\partial_\nu\phi\) or higher, the field equation gains extra terms \(\partial_\mu\partial_\nu(\partial\mathcal{L}/\partial(\partial_\mu\partial_\nu\phi))\) and generically brings Ostrogradsky instability.
The variation \(\delta\phi\) vanishes on the boundary \(\partial\Omega\) of the integration region.Drop it and the surface term \(\oint_{\partial\Omega}(\partial\mathcal{L}/\partial(\partial_\mu\phi))\,\delta\phi\,dS_\mu\) survives; stationarity then also imposes boundary conditions, or fails.
\(\mathcal{L}\) is a smooth (\(C^2\)) function of its arguments and \(\phi\) is a smooth field.Without enough differentiability the interchange of variation and derivative, and the integration by parts, are not licensed.
The fundamental lemma of the calculus of variations applies: an integral against every admissible \(\delta\phi\) vanishing forces the integrand to vanish.This needs \(\delta\phi\) to range over a dense set of smooth compactly supported functions; on a restricted variation class the equation may not follow pointwise.
Derivation
1
\[ S[\phi]=\int_\Omega \mathcal{L}\big(\phi,\partial_\mu\phi\big)\,d^4x \]
Definition of the action for a field configuration on the spacetime region \(\Omega\), with \(d^4x=dt\,d^3x\) (units \(c=1\)). A
2
\[ \phi(x)\to\phi(x)+\varepsilon\,\eta(x),\qquad \eta|_{\partial\Omega}=0 \]
Introduce a one-parameter family of comparison fields; \(\eta\) is a smooth test field vanishing on the boundary, \(\varepsilon\) a scalar. Stationarity means \(dS/d\varepsilon|_{\varepsilon=0}=0\). A
3
\[ \delta S=\int_\Omega\left(\frac{\partial\mathcal{L}}{\partial\phi}\,\delta\phi+\frac{\partial\mathcal{L}}{\partial(\partial_\mu\phi)}\,\delta(\partial_\mu\phi)\right)d^4x \]
Chain rule for the first variation, \(\delta\phi=\varepsilon\eta\); repeated index \(\mu\) is summed over \(0,1,2,3\). A
4
\[ \delta(\partial_\mu\phi)=\partial_\mu(\delta\phi) \]
Variation and spacetime derivative commute because \(\delta\phi\) is an arbitrary smooth function of \(x\) and the two operations act on independent arguments. B
5
\[ \frac{\partial\mathcal{L}}{\partial(\partial_\mu\phi)}\,\partial_\mu(\delta\phi)=\partial_\mu\!\left(\frac{\partial\mathcal{L}}{\partial(\partial_\mu\phi)}\,\delta\phi\right)-\partial_\mu\!\left(\frac{\partial\mathcal{L}}{\partial(\partial_\mu\phi)}\right)\delta\phi \]
Leibniz product rule, rewriting the derivative-of-variation term as a total divergence minus a remainder — the field-theory integration by parts. B
6
\[ \delta S=\int_\Omega\left(\frac{\partial\mathcal{L}}{\partial\phi}-\partial_\mu\frac{\partial\mathcal{L}}{\partial(\partial_\mu\phi)}\right)\delta\phi\,d^4x+\int_\Omega\partial_\mu\!\left(\frac{\partial\mathcal{L}}{\partial(\partial_\mu\phi)}\,\delta\phi\right)d^4x \]
Substitute step 5 into step 3 and group the pointwise term against \(\delta\phi\) separately from the divergence. A
7
\[ \int_\Omega\partial_\mu\!\left(\frac{\partial\mathcal{L}}{\partial(\partial_\mu\phi)}\,\delta\phi\right)d^4x=\oint_{\partial\Omega}\frac{\partial\mathcal{L}}{\partial(\partial_\mu\phi)}\,\delta\phi\;dS_\mu=0 \]
Four-dimensional divergence (Gauss/Stokes) theorem turns the volume integral of a divergence into a boundary flux; it vanishes because \(\delta\phi=0\) on \(\partial\Omega\). This is where the boundary assumption is spent. C
8
\[ \delta S=\int_\Omega\left(\frac{\partial\mathcal{L}}{\partial\phi}-\partial_\mu\frac{\partial\mathcal{L}}{\partial(\partial_\mu\phi)}\right)\delta\phi\,d^4x=0\quad\forall\,\delta\phi \]
With the surface term gone, stationarity requires this integral to vanish for every admissible variation \(\delta\phi\). A
9
\[ \frac{\partial\mathcal{L}}{\partial\phi}-\partial_\mu\frac{\partial\mathcal{L}}{\partial(\partial_\mu\phi)}=0 \]
Fundamental lemma of the calculus of variations: a continuous integrand whose integral against every smooth compactly supported \(\delta\phi\) vanishes must itself be zero pointwise. C
Result
\[ \partial_\mu\!\left(\frac{\partial\mathcal{L}}{\partial(\partial_\mu\phi)}\right)-\frac{\partial\mathcal{L}}{\partial\phi}=0 \]

Reading. The rate of change (in spacetime) of the field's "conjugate momentum density" \(\pi^\mu\equiv\partial\mathcal{L}/\partial(\partial_\mu\phi)\) is balanced against the "force density" \(\partial\mathcal{L}/\partial\phi\). It is the field analogue of \(\tfrac{d}{dt}(\partial L/\partial\dot q)=\partial L/\partial q\): the particle time-derivative \(d/dt\) is promoted to the spacetime divergence \(\partial_\mu\), and \(q(t)\) to \(\phi(x)\).

Units check. With \(c=1\), \([\mathcal{L}]=\)energy density \(=\mathrm{E}\,\mathrm{L}^{-3}\) (per unit 3-volume) and \([\partial_\mu]=\mathrm{L}^{-1}\). Then \([\partial\mathcal{L}/\partial(\partial_\mu\phi)]=[\mathcal{L}]/([\partial_\mu][\phi])\), so \([\partial_\mu(\partial\mathcal{L}/\partial(\partial_\mu\phi))]=[\mathcal{L}]/[\phi]=[\partial\mathcal{L}/\partial\phi]\). Both terms share units \([\mathcal{L}]/[\phi]\) and the equation is dimensionally consistent for any field normalisation of \(\phi\).

Limiting cases
  • Free real scalar \(\mathcal{L}=\tfrac12\partial_\mu\phi\,\partial^\mu\phi-\tfrac12 m^2\phi^2\) gives the Klein–Gordon equation \((\Box+m^2)\phi=0\).
  • No spatial variation, \(\phi=\phi(t)\), collapses \(\partial_\mu\to d/dt\) and recovers ordinary Lagrangian mechanics \(\tfrac{d}{dt}(\partial L/\partial\dot q)-\partial L/\partial q=0\).
  • \(\mathcal{L}\) independent of \(\phi\) (only \(\partial_\mu\phi\)) makes \(\pi^\mu\) a conserved current, \(\partial_\mu\pi^\mu=0\): a shift symmetry \(\phi\to\phi+\text{const}\).
  • Several fields \(\phi^a\): the same derivation per component gives one Euler–Lagrange equation for each \(a\).
Breaks when
  • The boundary variation does not vanish (e.g. Gibbons–Hawking boundaries, or field theory on a region with fixed nonzero surface data). The surface term in step 7 survives and must be cancelled by boundary terms in \(S\); the bulk equation still holds but is no longer the whole story.
  • \(\mathcal{L}\) depends on second or higher derivatives (\(f(R)\) gravity, higher-derivative regulators). The Euler–Lagrange operator gains \(+\partial_\mu\partial_\nu(\partial\mathcal{L}/\partial(\partial_\mu\partial_\nu\phi))\) terms and the Ostrogradsky theorem signals a Hamiltonian unbounded below.
  • The field or \(\mathcal{L}\) is non-smooth: shocks, topological defects, or delta-function sources break the pointwise conclusion of the fundamental lemma, and the equation holds only in a distributional/weak sense.
  • Constraints or gauge redundancy (\(\mathcal{L}\) with a gauge symmetry, e.g. electromagnetism) make the naive variation degenerate; the field equations are not all independent and Dirac constraint analysis is needed.
Failure modes
  • Treating \(\phi\) and \(\partial_\mu\phi\) as dependent when differentiating \(\mathcal{L}\). In \(\partial\mathcal{L}/\partial\phi\) and \(\partial\mathcal{L}/\partial(\partial_\mu\phi)\) the field and its derivative are formally independent slots; differentiate one holding the other fixed.
  • Forgetting the sum over \(\mu\). \(\partial_\mu(\partial\mathcal{L}/\partial(\partial_\mu\phi))\) is a single sum \(=\partial_t\pi^0+\nabla\!\cdot\!\vec\pi\), not one term.
  • Sign errors from the metric. With signature \((+,-,-,-)\), \(\partial^\mu\phi=\eta^{\mu\nu}\partial_\nu\phi\) flips spatial signs; writing \(\partial_\mu\phi\,\partial_\mu\phi\) instead of \(\partial_\mu\phi\,\partial^\mu\phi\) loses the relative sign between time and space.
  • Dropping the boundary term without checking it vanishes. Legitimate only when \(\delta\phi|_{\partial\Omega}=0\); assuming it always disappears hides genuine boundary physics.
  • Varying \(S\) but forgetting the integrand must vanish for every \(\delta\phi\). Setting \(\delta S=0\) for one particular variation does not give the field equation.
Discussion

The Euler–Lagrange field equation is the natural upgrade of Hamilton's principle from finitely many coordinates \(q_i(t)\) to a continuum of degrees of freedom labelled by spatial position. The functional derivative \(\delta S/\delta\phi(x)\) is exactly the bracketed operator in step 8; the field equation is the statement that this functional derivative vanishes everywhere. Manifest Lorentz covariance is a bonus of doing the whole calculation with the four-divergence \(\partial_\mu\) rather than singling out time — nothing in the derivation prefers a frame, so a Lorentz-scalar \(\mathcal{L}\) yields Lorentz-covariant equations of motion automatically.

The quantity \(\pi^\mu=\partial\mathcal{L}/\partial(\partial_\mu\phi)\) is the seed of both the canonical momentum and the stress–energy tensor. Its time component \(\pi^0=\partial\mathcal{L}/\partial\dot\phi\) is the momentum density conjugate to \(\phi\) that launches the Hamiltonian/canonical-quantisation route; contracting the same object appropriately builds \(T^{\mu\nu}=\pi^\mu\partial^\nu\phi-\eta^{\mu\nu}\mathcal{L}\), whose conservation \(\partial_\mu T^{\mu\nu}=0\) is Noether's theorem for spacetime translations. So the energy and momentum currents of this unit are already latent in the structure of the field equation.

The boundary term is not a nuisance to be discarded but carries real content. Keeping \(\oint \pi^\mu\delta\phi\,dS_\mu\) and demanding it vanish is what fixes admissible boundary conditions (Dirichlet \(\delta\phi=0\), or Neumann \(\pi^\mu n_\mu=0\)); in gravity the analogous term is why the Gibbons–Hawking–York surface term is added to the Einstein–Hilbert action so that the variational problem is well posed. More deeply, the split "bulk equation + boundary term" is the classical shadow of the fact that the symplectic structure of the theory lives on the boundary of a Cauchy region.

Common misconceptions. The equation does not say \(\mathcal{L}\) is minimised — action is stationary, often a saddle. And \(\partial/\partial\phi\) here is a partial derivative treating \(\mathcal{L}\) as an ordinary function of independent slots, not the functional derivative \(\delta/\delta\phi\); the functional derivative is the full left-hand side, the two \(\partial\)-derivatives are its ingredients.

Worked examples
1
\[ \mathcal{L}=\tfrac12\,\partial_\mu\phi\,\partial^\mu\phi-\tfrac12 m^2\phi^2 \]
Free real scalar field. Compute each ingredient of the Euler–Lagrange operator symbolically, then read off the equation. A
2
\[ \frac{\partial\mathcal{L}}{\partial\phi}=-m^2\phi \]
Only the potential term \(-\tfrac12 m^2\phi^2\) depends on \(\phi\) itself. A
3
\[ \frac{\partial\mathcal{L}}{\partial(\partial_\mu\phi)}=\partial^\mu\phi \]
Differentiate \(\tfrac12\eta^{\alpha\beta}\partial_\alpha\phi\,\partial_\beta\phi\) with respect to \(\partial_\mu\phi\); the two symmetric factors cancel the \(\tfrac12\), and the metric raises the index. B
4
\[ \partial_\mu(\partial^\mu\phi)-(-m^2\phi)=\Box\phi+m^2\phi=0 \]
Assemble \(\partial_\mu(\partial\mathcal{L}/\partial(\partial_\mu\phi))-\partial\mathcal{L}/\partial\phi\), with \(\Box\equiv\partial_\mu\partial^\mu\). A
\[ (\Box+m^2)\phi=0 \]

Reading. The Klein–Gordon equation. Numerically, for a pion-mass field \(m\approx135\ \mathrm{MeV}\), a plane wave \(\phi\propto e^{-i(Et-\vec p\cdot\vec x)}\) must obey \(E^2=|\vec p|^2+m^2\); at rest \(E=m=135\ \mathrm{MeV}\), the field oscillates at \(\omega=m/\hbar\approx2.05\times10^{23}\ \mathrm{s^{-1}}\). Units: with \(\hbar=c=1\), \([m]=[E]=\mathrm{MeV}\); restoring factors, \(\omega=mc^2/\hbar\).

1
\[ \mathcal{L}=\tfrac12\,\partial_\mu\phi\,\partial^\mu\phi-\tfrac{\lambda}{4}\phi^4 \]
Massless self-interacting scalar (\(\phi^4\) theory), coupling \(\lambda\). Same machine, nonlinear potential. A
2
\[ \frac{\partial\mathcal{L}}{\partial\phi}=-\lambda\phi^3,\qquad \frac{\partial\mathcal{L}}{\partial(\partial_\mu\phi)}=\partial^\mu\phi \]
Differentiate the quartic term (\(d/d\phi\) of \(-\tfrac{\lambda}{4}\phi^4\)) and the kinetic term as before. B
3
\[ \Box\phi+\lambda\phi^3=0 \]
Assemble the Euler–Lagrange operator; the cubic term is the self-force. A
4
\[ \text{Static uniform field: }\ \Box\phi=0\ \Rightarrow\ \lambda\phi^3=0\ \Rightarrow\ \phi=0 \]
Set \(\partial_\mu\phi=0\) to find equilibrium; the only constant solution is the vacuum \(\phi=0\). With \(\lambda=0.1\), a small oscillation about it obeys \(\Box\,\delta\phi\approx0\) (massless), so ripples propagate at the speed of light. A
\[ \Box\phi+\lambda\phi^3=0 \]

Reading. A nonlinear wave equation: the \(\lambda\phi^3\) term couples Fourier modes and scatters waves off each other. For an amplitude \(\phi_0=1\) (in field units) and \(\lambda=0.1\), the self-force density \(\lambda\phi_0^3=0.1\) competes with the kinetic curvature \(\Box\phi\); when \(|\Box\phi|\gg\lambda\phi^3\) the field is effectively free. Units: \([\lambda\phi^3]=[\mathcal{L}]/[\phi]\) matches \([\Box\phi]=[\phi]\,\mathrm{L}^{-2}\), fixing \([\lambda]\) once \([\phi]\) is chosen (in \(d=4\), \(\lambda\) is dimensionless with \([\phi]=\mathrm{L}^{-1}\)).

Problems
  1. Derive the field equation for \(\mathcal{L}=\tfrac12\partial_\mu\phi\,\partial^\mu\phi-V(\phi)\) for a general potential \(V\).
    Solution \(\partial\mathcal{L}/\partial\phi=-V'(\phi)\) and \(\partial\mathcal{L}/\partial(\partial_\mu\phi)=\partial^\mu\phi\). Euler–Lagrange gives \(\partial_\mu\partial^\mu\phi-(-V'(\phi))=\Box\phi+V'(\phi)=0\), i.e. \(\Box\phi=-V'(\phi)\). For \(V=\tfrac12 m^2\phi^2\) this reduces to Klein–Gordon, confirming the general form.
  2. For the complex scalar \(\mathcal{L}=\partial_\mu\phi^*\,\partial^\mu\phi-m^2\phi^*\phi\), treating \(\phi\) and \(\phi^*\) as independent, find the equation from varying \(\phi^*\).
    Solution \(\partial\mathcal{L}/\partial\phi^*=-m^2\phi\) and \(\partial\mathcal{L}/\partial(\partial_\mu\phi^*)=\partial^\mu\phi\). Then \(\partial_\mu\partial^\mu\phi-(-m^2\phi)=(\Box+m^2)\phi=0\). Varying \(\phi\) instead gives the conjugate equation \((\Box+m^2)\phi^*=0\). The two fields obey independent Klein–Gordon equations, and the theory carries a conserved \(U(1)\) current \(j^\mu=i(\phi^*\partial^\mu\phi-\phi\,\partial^\mu\phi^*)\).
  3. Show that adding a total divergence \(\partial_\mu K^\mu(\phi)\) to \(\mathcal{L}\) leaves the field equation unchanged.
    Solution The extra action is \(\int_\Omega\partial_\mu K^\mu\,d^4x=\oint_{\partial\Omega}K^\mu dS_\mu\), a pure boundary term. Its variation \(\oint(\partial K^\mu/\partial\phi)\,\delta\phi\,dS_\mu\) vanishes because \(\delta\phi=0\) on \(\partial\Omega\). Hence \(\delta S\) in the bulk is unchanged and the Euler–Lagrange equation is identical. Directly: \(\partial\mathcal{L}_K/\partial\phi=\partial_\mu K^\mu{}'\) and \(\partial_\mu(\partial\mathcal{L}_K/\partial(\partial_\mu\phi))=\partial_\mu(K^{\mu}{}')\) cancel in the Euler–Lagrange combination.
  4. A field has \(\mathcal{L}=\tfrac12\dot\phi^2-\tfrac12(\nabla\phi)^2-\tfrac12 m^2\phi^2\) (signature \((+,-,-,-)\), \(c=1\)). Write out \(\partial_\mu(\partial\mathcal{L}/\partial(\partial_\mu\phi))\) explicitly in \(t\) and \(\vec x\) and identify the equation.
    Solution Here \(\partial\mathcal{L}/\partial\dot\phi=\dot\phi\) (the \(\mu=0\) term) and \(\partial\mathcal{L}/\partial(\partial_i\phi)=-\partial_i\phi\) (the \(\mu=i\) terms). So \(\partial_\mu(\cdots)=\partial_t\dot\phi+\partial_i(-\partial_i\phi)=\ddot\phi-\nabla^2\phi\). With \(\partial\mathcal{L}/\partial\phi=-m^2\phi\), the equation is \(\ddot\phi-\nabla^2\phi+m^2\phi=0\), i.e. \((\Box+m^2)\phi=0\) with \(\Box=\partial_t^2-\nabla^2\). This is Klein–Gordon written in \(3+1\) form.
  5. Estimate the rest-frame oscillation frequency of a Klein–Gordon field of mass \(m=1\ \mathrm{eV}/c^2\) (a candidate ultralight dark-matter scalar). Restore \(\hbar,c\).
    Solution At rest the field obeys \(\ddot\phi=-(m c^2/\hbar)^2\phi\), so \(\omega=mc^2/\hbar\). With \(mc^2=1\ \mathrm{eV}=1.602\times10^{-19}\ \mathrm{J}\) and \(\hbar=1.055\times10^{-34}\ \mathrm{J\,s}\), \(\omega=1.602\times10^{-19}/1.055\times10^{-34}\approx1.52\times10^{15}\ \mathrm{rad/s}\), a period \(T=2\pi/\omega\approx4.1\times10^{-15}\ \mathrm{s}\). Equivalently \(f=\omega/2\pi\approx2.4\times10^{14}\ \mathrm{Hz}\) — near-infrared frequencies, the Compton frequency of a \(1\ \mathrm{eV}\) particle.