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:
If the action is stationary under every compactly supported variation, the fundamental lemma forces the Euler–Lagrange expressions 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.
Local variations on a coordinate domain
Section titled “Local variations on a coordinate domain”Let be a fixed bounded oriented domain with piecewise boundary. Consider finitely many real fields and a first-order Lagrangian density,
Here labels field components and labels coordinates. The density may depend explicitly on . “First order” means that 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
with . The domain and coordinates do not move. Consequently,
The smoothness assumptions license differentiation under the integral and the integration by parts used below. We define the directed surface element by Stokes’ formula itself:
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 first-variation identity
Section titled “The first-variation identity”The directional derivative of the action along is
Introduce the first-order momentum density and Euler–Lagrange expression
The chain rule and product rule give the complete derivation:
Applying Stokes’ formula produces the first-variation identity
Thus 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 . Iyer and Wald 1994, § 3, equation (20) establish that form in a much more general covariant setting and explain that has ambiguities. Here we need only the elementary coordinate identity; the presymplectic construction built from 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 only relative to a specified class of admissible variations. Suppose first that , so every variation vanishes in a neighborhood of the boundary. The surface integral is then zero. If
the fundamental lemma of the calculus of variations implies
as a distribution on , and pointwise when the displayed expression is continuous. This is a local conclusion: one may choose 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 dimensional limit checks every sign. For , the identity becomes
Fixing the endpoint values means ; it does not mean .
What the boundary term requires
Section titled “What the boundary term requires”On a smooth boundary face write , where is the directed conormal density. What stationarity requires depends on which boundary traces of are admissible.
Fixed or Dirichlet data. If is prescribed on a face , then . 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 are independent on a face , stationarity requires
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
then unrestricted variations on give
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 , replace
The bulk expression is unchanged, but the boundary current shifts:
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 depends on field derivatives, 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 and natural units. They demonstrate the declared QFT-facing application while leaving its developed physical treatment to Foundations.
A real scalar field
Section titled “A real scalar field”For a differentiable potential , take
The momentum and Euler–Lagrange expression are
Consequently,
and compactly supported variations give
The surface term independently checks the mostly-minus signs. On , with ordinary outward spatial normal and ,
The wall minus sign follows from . Fixed temporal endpoints and freely varying wall values therefore give the natural condition . Adding
changes it to .
There is also a dimensional check. For a canonically normalized scalar,
Since a boundary measure has mass dimension , its contribution to is dimensionless, like the bulk term. The Robin parameter has .
A local Abelian gauge potential
Section titled “A local Abelian gauge potential”Let be a one-form potential on the coordinate domain and define
An arbitrary variation gives
where antisymmetry combines the two terms. Integration by parts yields
Thus the vacuum equations are
while freely varied boundary components require the corresponding flux to vanish. Fixing the pullback of to the boundary is a sufficient alternative: by antisymmetry, 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 , , and . Then
and the derived equation contains and . 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 , antisymmetry gives, distributionally, the identity
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.
Checks, limits, and common pitfalls
Section titled “Checks, limits, and common pitfalls”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 . It does not require .
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.
Exercises
Section titled “Exercises”1. Retrieve the two conclusions
Section titled “1. Retrieve the two conclusions”Why do compactly supported variations imply a bulk equation but no boundary condition?
Solution
For , the boundary trace of vanishes, so the surface integral in is zero. Stationarity for every such local and the fundamental lemma give in the interior. Because none of these variations probe , they cannot constrain boundary data.
2. Test the total-divergence claim
Section titled “2. Test the total-divergence claim”In mechanics, compare with . Do they define the same bulk and free-endpoint problems?
Solution
Both have identically vanishing Euler–Lagrange expression. However,
With fixed endpoints this term vanishes, so the two variational problems agree in the bulk. With freely varied endpoints, additionally requires there, while imposes no endpoint condition. Equal bulk equations do not imply equal boundary problems.
3. Derive the scalar Robin condition
Section titled “3. Derive the scalar Robin condition”On a spatial wall, combine the scalar bulk action with . What does stationarity under arbitrary wall variations require?
Solution
The bulk action contributes , while the boundary action contributes . Their sum must vanish for every boundary trace of , hence
4. Transfer the method to Maxwell theory
Section titled “4. Transfer the method to Maxwell theory”Why is varying only by insufficient, and what boundary term accompanies the Maxwell equation?
Solution
Gauge variations lie only along gauge orbits. For compactly supported , integration by parts reduces their bulk variation to , which vanishes identically by antisymmetry. Arbitrary instead gives and the boundary contribution
Synthesis and continuation
Section titled “Synthesis and continuation”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.
References
Section titled “References”- Daniel Harlow and Jie-qiang Wu, “Covariant Phase Space with Boundaries”, JHEP 10 (2020) 146, §§ 2.2, 3.2, and 3.3. This boundary-focused structural source treats bulk and boundary actions together and checks scalar and Maxwell boundary data. Its differential-form notation and opposite metric signature are translated rather than imported into the component formulas above.
- Vivek Iyer and Robert M. Wald, “Some Properties of Noether Charge and a Proposal for Dynamical Black Hole Entropy”, Physical Review D 50 (1994), 846–864, § 3. Equation (20) gives the covariant bulk-plus-exact-form decomposition and the surrounding discussion records the boundary-potential ambiguity. Its gravitational setting is a structural cross-check, not an assumption of this local derivation.
- Naoki Saito, MAT 207B Methods of Applied Mathematics, Lecture 5: Natural Boundary Conditions — Open PDF, University of California, Davis, Winter 2025, pp. 3–6. The notes show how unrestricted endpoint or boundary variations supplement the Euler–Lagrange equation with natural conditions.
- David Tong, Quantum Field Theory, § 1.1: The Dynamics of Fields, Cambridge Part III lecture notes, 2006–2007, equations (1.7)–(1.23). These notes provide the teaching sequence and scalar and Maxwell checks in the mostly-minus convention.