Variational Derivatives and Field Equations
Scrollable formula. Use Left and Right arrow keys to reveal hidden content.
Scrollable table. Use Left and Right arrow keys to reveal additional columns.
Scrollable figure. Use Left and Right arrow keys to inspect hidden content.
Symbolic variation is valuable not because it hides integrations by parts, but because it can expose every one of them in a checkable form. For a gravitational action the desired output is a pair: a bulk Euler–Lagrange tensor and a boundary current. Returning only the familiar field equation loses information needed to decide whether the stated boundary-value problem is differentiable.
Required background. Connections and Covariant Derivatives supplies the derivative identities and integrations by parts, while Curvature supplies the metric variation of curvature.
Helpful background. Formulations of General Relativity develops the continuum field equations and their formulations; Ordinary Differential Equations supports reductions of those equations; and Spacetime Symmetries and Killing Fields provides the symmetry transformations behind Noether identities.
Variation as a bulk–boundary decomposition
Section titled “Variation as a bulk–boundary decomposition”Take the independent variable to be and consider
With the site curvature convention, a direct variation has the structure
where one convenient representative is
Adding the divergence of an antisymmetric tensor changes the representative without changing the integrated boundary term. This ambiguity must not be confused with losing the term altogether. The covariant decomposition of a Lagrangian variation into equations of motion and a symplectic-potential current is stated precisely in Iyer and Wald 1994, § III, Eqs. 20–24.
To reconstruct the result, write and use
The Palatini identity is , so metric compatibility gives
Combining this with the determinant variation produces in the bulk; varying adds . This derivation makes both the inverse-metric sign and the boundary current independently visible.
An algorithm that keeps discarded terms visible
Section titled “An algorithm that keeps discarded terms visible”A safe symbolic implementation introduces a fresh symmetric tensor and a formal variation operator obeying the product rule. It varies the determinant, inverse metric, connection, and curvature before canonicalization. Covariant derivatives are moved off one at a time, with each integration by parts adding an explicit divergence node. Only after the bulk coefficient of and the boundary current have been separated should tensor symmetries and Bianchi identities simplify them.
The software environment must pin the computer-algebra system, tensor and variational packages, dimension, signature, curvature sign, choice of rather than as the independent field, and the rule used for total derivatives. An automated variational derivative may intentionally discard divergences; the xTras implementation and its field-theory operators are described in Nutma 2014, §§ 2–3 and Appendix A. Such an operator is suitable for the bulk coefficient only if a separate pass retains the discarded current.
Einstein–Hilbert benchmark checks
Section titled “Einstein–Hilbert benchmark checks”The benchmark uses three checks that probe different failure modes. First, the coefficient of must be symmetric and equal to . Second, diffeomorphism invariance requires the off-shell identity
after the differential Bianchi identity and constant are declared. Third, let be the physical Schwarzschild mass, so is its geometrized length in the inherited units, and substitute the solution with on . Every bulk component must vanish, while an independently constructed curvature pipeline still gives . This prevents a rule that simply sets all curvature to zero from passing.
For a finite region, test variations that obey the proposed boundary data but whose normal derivatives remain nonzero. Fixing the induced metric sets tangential metric variations to zero on a non-null boundary; it does not set their normal derivatives to zero. The bare Einstein–Hilbert action can therefore retain the integral of even for an allowed variation, and needs the appropriate boundary term for the usual Dirichlet problem. Merely choosing a variation that violates the fixed boundary data would not establish that failure. This negative test catches an engine that always drops total derivatives. Iyer and Wald’s later construction of the Noether current makes the dependence on the potential current explicit; see Iyer and Wald 1994, Eqs. 40, 43, and 62.
Reproducible record and convergence
Section titled “Reproducible record and convergence”A fully specified rerun sequence starts a clean kernel, declares the manifold and metric, loads pinned package versions, constructs the Lagrangian density, varies with respect to , exports every pre-integration-by-parts term, separates bulk and divergence pieces, canonicalizes them, and evaluates the three checks above. The machine-readable output should include the action, field choice, assumptions, simplification rules, bulk residual, divergence current, Bianchi residual, Schwarzschild substitution, package versions, and command sequence. This is a specification for a rerun, not a claim that repository code has executed it.
Exact algebra has no mesh convergence, but the validation sequence has a meaningful refinement hierarchy. Run first with only one-term tensor symmetries, then add derivative commutators, then the Bianchi identity; record which residual becomes zero at each stage. For numerical spot checks of the Schwarzschild components, raise working precision and demand decreasing discrepancy below a declared tolerance. Failure occurs if the result depends on a dummy-index name, if a boundary term vanishes only after an unstated boundary condition, or if varying is mixed with formulas for varying .
Check your understanding
Section titled “Check your understanding”A program returns exactly from the action, and its Bianchi residual vanishes. It discarded every total derivative at the start. Has it verified the action principle on a region with boundary?
Solution
No. Those checks validate the bulk Euler–Lagrange tensor, but not differentiability of the action. Recompute while retaining the divergence current, specify the allowed boundary variations, and include or derive the required boundary term. The missing information cannot be reconstructed from the bulk equation alone.
References
Section titled “References”- Iyer, V., and Wald, R. M. (1994), “Some Properties of Noether Charge and a Proposal for Dynamical Black Hole Entropy,” Physical Review D 50, 846–864. arXiv.
- Nutma, T. (2014), “xTras: A Field-Theory Inspired xAct Package for Mathematica,” Computer Physics Communications 185, 1719–1738. arXiv.
Further reading
Section titled “Further reading”- MacCallum, M. A. H. (2018), “Computer Algebra in Gravity Research,” Living Reviews in Relativity 21, 6. DOI.