Skip to content

Field Variations and Boundary Terms

For a first-order local action on a coordinate domain, one integration by parts separates its first variation into an interior term and a boundary term:

δS[ϕ;η]=UddxEa(L)ηa+UdΣμπaμηa.\delta S[\phi;\eta] =\int_U \mathrm d^d x\, \mathcal E_a(\mathcal L)\eta^a +\int_{\partial U}\mathrm d\Sigma_\mu\, \pi_a^\mu\eta^a.

If the action is stationary under every compactly supported variation, the fundamental lemma forces the Euler–Lagrange expressions Ea(L)\mathcal E_a(\mathcal L) to vanish in the interior. Such variations say nothing about the boundary. The surface term instead tests whether the declared boundary data and any boundary action make the variational problem stationary. This local argument needs a coordinate domain, differentiable fields, and Stokes’ formula—not a global bundle, metric, or phase-space construction.

This page derives that split, explains exactly when each term vanishes, and checks it for a scalar and an Abelian gauge potential. Quantization, higher-derivative stability, global gauge geometry, constraint reduction, and physical classifications of boundary conditions belong to later treatments.

Let URdU\subset\mathbb R^d be a fixed bounded oriented domain with piecewise C1C^1 boundary. Consider finitely many real fields ϕaC2(U)\phi^a\in C^2(\overline U) and a C2C^2 first-order Lagrangian density,

SU[ϕ]=UddxL(x,ϕa,μϕa).S_U[\phi] =\int_U\mathrm d^d x\, \mathcal L\bigl(x,\phi^a,\partial_\mu\phi^a\bigr).

Here aa labels field components and μ=0,,d1\mu=0,\ldots,d-1 labels coordinates. The density may depend explicitly on xx. “First order” means that L\mathcal L contains at most first derivatives of the fields; its Euler–Lagrange equations will generally contain second derivatives.

A field variation at fixed coordinates is a one-parameter family

ϕϵa(x)=ϕa(x)+ϵηa(x),δϕa=ηa,\phi_\epsilon^a(x)=\phi^a(x)+\epsilon\eta^a(x), \qquad \delta\phi^a=\eta^a,

with ηaC1(U)\eta^a\in C^1(\overline U). The domain and coordinates do not move. Consequently,

δ(μϕa)=μηa.\delta(\partial_\mu\phi^a)=\partial_\mu\eta^a.

The smoothness assumptions license differentiation under the integral and the integration by parts used below. We define the directed surface element dΣμ\mathrm d\Sigma_\mu by Stokes’ formula itself:

UddxμVμ=UdΣμVμ.\int_U\mathrm d^d x\,\partial_\mu V^\mu =\int_{\partial U}\mathrm d\Sigma_\mu\,V^\mu.

This definition fixes the signs without choosing a Lorentzian unit normal. It therefore remains useful on spacelike, timelike, and regular null faces. Compact support also lets the interior argument be made inside one coordinate patch, so no global geometric structure is being assumed.

The directional derivative of the action along η\eta is

δSU[ϕ;η]ddϵSU[ϕϵ]ϵ=0.\delta S_U[\phi;\eta] \equiv \left.\frac{\mathrm d}{\mathrm d\epsilon} S_U[\phi_\epsilon]\right|_{\epsilon=0}.

Introduce the first-order momentum density and Euler–Lagrange expression

πaμL(μϕa),Ea(L)Lϕaμπaμ.\begin{aligned} \pi_a^\mu &\equiv \frac{\partial\mathcal L} {\partial(\partial_\mu\phi^a)},\\ \mathcal E_a(\mathcal L) &\equiv \frac{\partial\mathcal L}{\partial\phi^a} -\partial_\mu\pi_a^\mu. \end{aligned}

The chain rule and product rule give the complete derivation:

δSU=Uddx[Lϕaηa+πaμμηa]=Uddx[Lϕaμπaμ]ηa+Uddxμ(πaμηa).\begin{aligned} \delta S_U &=\int_U\mathrm d^d x\, \left[ \frac{\partial\mathcal L}{\partial\phi^a}\eta^a +\pi_a^\mu\partial_\mu\eta^a \right]\\ &=\int_U\mathrm d^d x\, \left[ \frac{\partial\mathcal L}{\partial\phi^a} -\partial_\mu\pi_a^\mu \right]\eta^a +\int_U\mathrm d^d x\, \partial_\mu(\pi_a^\mu\eta^a). \end{aligned}

Applying Stokes’ formula produces the first-variation identity

δSU=UddxEa(L)ηa+UdΣμπaμηaθμ(ϕ;η).\boxed{ \delta S_U =\int_U\mathrm d^d x\, \mathcal E_a(\mathcal L)\eta^a +\int_{\partial U}\mathrm d\Sigma_\mu\, \underbrace{\pi_a^\mu\eta^a}_{\theta^\mu(\phi;\eta)} }.

Thus θμ\theta^\mu is the local boundary-potential current for this first-order representative of the action. Tong 2006–2007, § 1.1 gives the same coordinate calculation and then specializes it to scalar and Maxwell fields.

In differential-form language the structural statement is often written δL=Eδϕ+dΘ\delta\boldsymbol L=\boldsymbol E\,\delta\phi+\mathrm d\boldsymbol\Theta. Iyer and Wald 1994, § 3, equation (20) establish that form in a much more general covariant setting and explain that Θ\boldsymbol\Theta has ambiguities. Here we need only the elementary coordinate identity; the presymplectic construction built from Θ\boldsymbol\Theta is not being developed.

When stationarity gives the Euler–Lagrange equations

Section titled “When stationarity gives the Euler–Lagrange equations”

An action is stationary at ϕ\phi only relative to a specified class of admissible variations. Suppose first that ηaCc(U)\eta^a\in C_c^\infty(U), so every variation vanishes in a neighborhood of the boundary. The surface integral is then zero. If

δSU[ϕ;η]=0for every independent ηaCc(U),\delta S_U[\phi;\eta]=0 \quad\text{for every independent }\eta^a\in C_c^\infty(U),

the fundamental lemma of the calculus of variations implies

Ea(L)=0\mathcal E_a(\mathcal L)=0

as a distribution on UU, and pointwise when the displayed expression is continuous. This is a local conclusion: one may choose η\eta supported in an arbitrarily small interior neighborhood.

Compact support is sufficient for the bulk equations, but it cannot yield a boundary condition. Conversely, an Euler–Lagrange solution is not yet a stationary point for boundary variations unless the surface term also vanishes. Nor does stationarity alone establish a minimum, existence, uniqueness, causal well-posedness, or stability.

The 0+10+1 dimensional limit checks every sign. For S[q]=titfdtL(t,q,q˙)S[q]=\int_{t_i}^{t_f}\mathrm dt\,L(t,q,\dot q), the identity becomes

δS=titfdt(LqddtLq˙)η+[Lq˙η]titf.\delta S =\int_{t_i}^{t_f}\mathrm dt\, \left( \frac{\partial L}{\partial q} -\frac{\mathrm d}{\mathrm dt} \frac{\partial L}{\partial\dot q} \right)\eta +\left[ \frac{\partial L}{\partial\dot q}\eta \right]_{t_i}^{t_f}.

Fixing the endpoint values means η(ti)=η(tf)=0\eta(t_i)=\eta(t_f)=0; it does not mean q(ti)=q(tf)=0q(t_i)=q(t_f)=0.

On a smooth boundary face write dΣμ=sμdσ\mathrm d\Sigma_\mu=s_\mu\,\mathrm d\sigma, where sμdσs_\mu\mathrm d\sigma is the directed conormal density. What stationarity requires depends on which boundary traces of η\eta are admissible.

Fixed or Dirichlet data. If ϕa\phi^a is prescribed on a face ΓD\Gamma_D, then ηaΓD=0\eta^a|_{\Gamma_D}=0. The field value may be nonzero; only its variation is fixed. No extra boundary equation follows there.

Free or natural data. If the boundary values of every ηa\eta^a are independent on a face ΓN\Gamma_N, stationarity requires

sμπaμ=0on ΓN.s_\mu\pi_a^\mu=0 \qquad\text{on }\Gamma_N.

One may impose fixed data on some components or faces and natural data on the rest. If allowed boundary values obey a constraint, then the variations are tangent to that constraint and the momentum flux need only annihilate those allowed directions. Saito 2025, Lecture 5, PDF derives the corresponding natural-boundary logic first in one variable and then on a two-dimensional domain.

A boundary action. A derivative-free boundary density changes the condition. If

Stot=SU+Γdσb(x,ϕ),S_{\mathrm{tot}} =S_U+\int_\Gamma\mathrm d\sigma\,b(x,\phi),

then unrestricted variations on Γ\Gamma give

sμπaμ+bϕa=0.s_\mu\pi_a^\mu +\frac{\partial b}{\partial\phi^a}=0.

Robin or prescribed-flux data can therefore arise from the action and its allowed variations. They should not be appended after discarding the very term that distinguishes them. Harlow and Wu 2020, § 2.2 give the corresponding field-theoretic statement for a bulk Lagrangian form plus a boundary action; their more general sufficient condition is not needed for the elementary formula here.

A total divergence. For Kμ=Kμ(x,ϕ)K^\mu=K^\mu(x,\phi), replace

LL=L+μKμ.\mathcal L \longmapsto \mathcal L'=\mathcal L+\partial_\mu K^\mu.

The bulk expression is unchanged, but the boundary current shifts:

Ea(L)=Ea(L),θμ=θμ+δKμ.\mathcal E_a(\mathcal L')=\mathcal E_a(\mathcal L), \qquad \theta^{\prime\mu}=\theta^\mu+\delta K^\mu.

Therefore two Lagrangian densities related by a total divergence have the same bulk Euler–Lagrange equations but need not define the same free-boundary problem. This shift is the local-coordinate version of the ambiguity recorded in Iyer and Wald 1994, equations (41)–(43). If KμK^\mu depends on field derivatives, L\mathcal L' is generally higher order and the elementary boundary formula above must be enlarged.

Euler–Lagrange equations for scalar and gauge fields

Section titled “Euler–Lagrange equations for scalar and gauge fields”

The examples now use the inherited Lorentzian signature (+,,,)(+,-,\ldots,-) and natural units. They demonstrate the declared QFT-facing application while leaving its developed physical treatment to Foundations.

For a differentiable potential VV, take

L=12μϕμϕV(ϕ).\mathcal L =\frac12\partial_\mu\phi\,\partial^\mu\phi -V(\phi).

The momentum and Euler–Lagrange expression are

πμ=μϕ,E(L)=ϕV(ϕ).\pi^\mu=\partial^\mu\phi, \qquad \mathcal E(\mathcal L) =-\Box\phi-V'(\phi).

Consequently,

δSU=Uddx(ϕ+V(ϕ))η+UdΣμμϕη,\begin{aligned} \delta S_U ={}&-\int_U\mathrm d^d x\, \bigl(\Box\phi+V'(\phi)\bigr)\eta\\ &+\int_{\partial U}\mathrm d\Sigma_\mu\, \partial^\mu\phi\,\eta, \end{aligned}

and compactly supported variations give

ϕ+V(ϕ)=0.\Box\phi+V'(\phi)=0.

The surface term independently checks the mostly-minus signs. On U=[ti,tf]×ΩU=[t_i,t_f]\times\Omega, with ordinary outward spatial normal n^\widehat{\mathbf n} and n=n^\partial_n=\widehat{\mathbf n}\mathbin{\cdot}\boldsymbol\nabla,

UdΣμμϕη=Ωdd1x[ϕ˙η]titftitfdtΩdA(nϕ)η.\begin{aligned} \int_{\partial U}\mathrm d\Sigma_\mu\, \partial^\mu\phi\,\eta ={}&\int_\Omega\mathrm d^{d-1}x\, \left[\dot\phi\,\eta\right]_{t_i}^{t_f}\\ &-\int_{t_i}^{t_f}\mathrm dt \int_{\partial\Omega}\mathrm dA\, (\partial_n\phi)\eta. \end{aligned}

The wall minus sign follows from i=i\partial^i=-\partial_i. Fixed temporal endpoints and freely varying wall values therefore give the natural condition nϕ=0\partial_n\phi=0. Adding

SΩ=κ2titfdtΩdAϕ2S_{\partial\Omega} =-\frac\kappa2 \int_{t_i}^{t_f}\mathrm dt \int_{\partial\Omega}\mathrm dA\,\phi^2

changes it to nϕ+κϕ=0\partial_n\phi+\kappa\phi=0.

There is also a dimensional check. For a canonically normalized scalar,

[ϕ]=[η]=d22,[μϕη]=d1.[\phi]=[\eta]=\frac{d-2}{2}, \qquad [\partial^\mu\phi\,\eta]=d-1.

Since a boundary measure has mass dimension (d1)-(d-1), its contribution to δS\delta S is dimensionless, like the bulk term. The Robin parameter has [κ]=1[\kappa]=1.

Let AνA_\nu be a one-form potential on the coordinate domain and define

Fμν=μAννAμ,L=14FμνFμν.F_{\mu\nu} =\partial_\mu A_\nu-\partial_\nu A_\mu, \qquad \mathcal L=-\frac14F_{\mu\nu}F^{\mu\nu}.

An arbitrary C1C^1 variation δAν\delta A_\nu gives

δL=12FμνδFμν=FμνμδAν,\delta\mathcal L =-\frac12F^{\mu\nu}\delta F_{\mu\nu} =-F^{\mu\nu}\partial_\mu\delta A_\nu,

where antisymmetry combines the two terms. Integration by parts yields

δSU=Uddx(μFμν)δAνUdΣμFμνδAν.\begin{aligned} \delta S_U ={}&\int_U\mathrm d^d x\, (\partial_\mu F^{\mu\nu})\delta A_\nu\\ &-\int_{\partial U}\mathrm d\Sigma_\mu\, F^{\mu\nu}\delta A_\nu. \end{aligned}

Thus the vacuum equations are

μFμν=0,\partial_\mu F^{\mu\nu}=0,

while freely varied boundary components require the corresponding flux sμFμνs_\mu F^{\mu\nu} to vanish. Fixing the pullback of AA to the boundary is a sufficient alternative: by antisymmetry, sμFμνs_\mu F^{\mu\nu} is tangent to the face and pairs only with that pullback. Such fixed data also restrict which gauge transformations preserve the admissible boundary values. Harlow and Wu 2020, § 3.3 spell out both points in differential-form notation.

In four dimensions set Aμ=(Φ,A)A^\mu=(\Phi,\mathbf A), E=A˙Φ\mathbf E=-\dot{\mathbf A}-\boldsymbol\nabla\Phi, and B=×A\mathbf B=\boldsymbol\nabla\times\mathbf A. Then

14FμνFμν=12(E2B2),-\frac14F_{\mu\nu}F^{\mu\nu} =\frac12(\mathbf E^2-\mathbf B^2),

and the derived equation contains E=0\boldsymbol\nabla\mathbin{\cdot}\mathbf E=0 and ×BE˙=0\boldsymbol\nabla\times\mathbf B-\dot{\mathbf E}=0. This is an independent component check of the metric and integration-by-parts signs.

A gauge transformation is not the same thing as an arbitrary field variation. If one varies only along δAν=νλ\delta A_\nu=\partial_\nu\lambda, antisymmetry gives, distributionally, the identity

νμFμν0.\partial_\nu\partial_\mu F^{\mu\nu}\equiv0.

Those restricted variations therefore cannot derive all Maxwell equations. The calculation above first uses arbitrary local variations; gauge redundancy and its boundary restrictions are separate questions.

Dropping the boundary term too early. A divergence becomes a boundary integral, not zero. It vanishes only because of compact support, decay, fixed boundary data, cancellation by a boundary action, or a justified natural condition.

Confusing fixed data with a zero field. Dirichlet variation means δϕU=0\delta\phi|_{\partial U}=0. It does not require ϕU=0\phi|_{\partial U}=0.

Treating every stationary point as a minimum. The first variation gives a necessary stationarity condition. The second variation, function spaces, boundary data, and PDE analysis decide stability and well-posedness.

Using symmetry variations as all variations. A gauge transformation tests a differential identity. The Euler–Lagrange equations require the full admissible configuration-space variation before quotienting gauge directions.

The derivation also has a clear validity boundary. Higher-derivative or nonlocal actions, moving domains, distributional fields, constrained target spaces, fermionic left/right derivatives, gravitational boundary terms, global gauge bundles, corners generated by differentiated boundary actions, and boundary charge algebras need additional machinery. None is implied by the first-order local formula.

Why do compactly supported variations imply a bulk equation but no boundary condition?

Solution

For ηCc(U)\eta\in C_c^\infty(U), the boundary trace of η\eta vanishes, so the surface integral in δS\delta S is zero. Stationarity for every such local η\eta and the fundamental lemma give Ea(L)=0\mathcal E_a(\mathcal L)=0 in the interior. Because none of these variations probe U\partial U, they cannot constrain boundary data.

In mechanics, compare L=0L=0 with L=dF(q)/dtL'=\mathrm dF(q)/\mathrm dt. Do they define the same bulk and free-endpoint problems?

Solution

Both have identically vanishing Euler–Lagrange expression. However,

δtitfdtdFdt=[F(q)η]titf.\delta\int_{t_i}^{t_f}\mathrm dt\, \frac{\mathrm dF}{\mathrm dt} =\left[F'(q)\eta\right]_{t_i}^{t_f}.

With fixed endpoints this term vanishes, so the two variational problems agree in the bulk. With freely varied endpoints, LL' additionally requires F(q)=0F'(q)=0 there, while L=0L=0 imposes no endpoint condition. Equal bulk equations do not imply equal boundary problems.

On a spatial wall, combine the scalar bulk action with SΩ=(κ/2)dtdAϕ2S_{\partial\Omega}=-(\kappa/2)\int\mathrm dt\,\mathrm dA\,\phi^2. What does stationarity under arbitrary wall variations require?

Solution

The bulk action contributes dtdA(nϕ)η-\int\mathrm dt\,\mathrm dA\,(\partial_n\phi)\eta, while the boundary action contributes dtdAκϕη-\int\mathrm dt\,\mathrm dA\,\kappa\phi\eta. Their sum must vanish for every boundary trace of η\eta, hence

nϕ+κϕ=0.\partial_n\phi+\kappa\phi=0.

Why is varying only by δAν=νλ\delta A_\nu=\partial_\nu\lambda insufficient, and what boundary term accompanies the Maxwell equation?

Solution

Gauge variations lie only along gauge orbits. For compactly supported λ\lambda, integration by parts reduces their bulk variation to λνμFμν-\int\lambda\,\partial_\nu\partial_\mu F^{\mu\nu}, which vanishes identically by antisymmetry. Arbitrary δAν\delta A_\nu instead gives μFμν=0\partial_\mu F^{\mu\nu}=0 and the boundary contribution

UdΣμFμνδAν.-\int_{\partial U}\mathrm d\Sigma_\mu\, F^{\mu\nu}\delta A_\nu.

Local field variation answers the principal question through one identity: the coefficient of arbitrary interior variations is the Euler–Lagrange expression, while the total divergence becomes a surface term that records the boundary data and boundary action. Compact support proves the local bulk equations without global geometry. It never licenses erasing the boundary term from a problem whose boundary values can vary.

For the developed physical use of this result in the Klein–Gordon and free Maxwell actions, continue to The Action Principle and Field Equations.