Chapter 15: Einstein-Hilbert Action
The Einstein-Hilbert action provides the variational foundation of general relativity. Einstein's field equations emerge naturally as the Euler-Lagrange equations for spacetime geometry, unifying gravity with the action principle of classical mechanics.
The Gravitational Action
\( S_{EH} = \frac{c^4}{16\pi G} \int R \sqrt{-g} \, d^4x \)
R = Ricci scalar, g = det(gฮผฮฝ)
This is the simplest diffeomorphism-invariant action built from the metric and its derivatives. The factor โ(-g) dโดx is the invariant volume element.
With Cosmological Constant
\( S = \frac{c^4}{16\pi G} \int (R - 2\Lambda) \sqrt{-g} \, d^4x \)
Deriving Field Equations
Varying the action with respect to the metric gฮผฮฝ:
\( \delta S_{EH} = \frac{c^4}{16\pi G} \int \left( R_{\mu\nu} - \frac{1}{2}g_{\mu\nu}R \right) \delta g^{\mu\nu} \sqrt{-g} \, d^4x \)
Key Variations
\( \delta\sqrt{-g} = -\frac{1}{2}\sqrt{-g} g_{\mu\nu} \delta g^{\mu\nu} \)
\( \delta R = R_{\mu\nu} \delta g^{\mu\nu} + g^{\mu\nu} \delta R_{\mu\nu} \)
Palatini Identity
The term gฮผฮฝฮดRฮผฮฝ becomes a total derivative and vanishes with appropriate boundary conditions.
Total Action with Matter
\( S = S_{EH} + S_{matter} = \frac{c^4}{16\pi G} \int R \sqrt{-g} \, d^4x + \int \mathcal{L}_m \sqrt{-g} \, d^4x \)
The stress-energy tensor is defined by variation with respect to the metric:
\( T_{\mu\nu} = -\frac{2}{\sqrt{-g}} \frac{\delta S_m}{\delta g^{\mu\nu}} \)
Setting ฮดS/ฮดgฮผฮฝ = 0 gives Einstein's equations!
Gibbons-Hawking-York Boundary Term
For a well-defined variational problem with boundaries:
\( S_{GHY} = \frac{c^4}{8\pi G} \int_\partial K \sqrt{|h|} \, d^3x \)
K = trace of extrinsic curvature, h = induced metric
This boundary term ensures the variational problem is well-posed when ฮดgฮผฮฝ = 0 on the boundary (Dirichlet conditions).
Interactive Simulation: Action Principle
Run this Python code to explore the Einstein-Hilbert action, calculate Planck units, and visualize scalar field dynamics. The simulation shows how different equation of state values arise from the potential/kinetic energy ratio.
Einstein-Hilbert Action Analysis
PythonExplore the variational foundation of general relativity
Click Run to execute the Python code
Code will be executed with Python 3 on the server
Fortran: Action Integration
This Fortran code demonstrates that the bulk Einstein-Hilbert action vanishes for vacuum solutions like Schwarzschild spacetime. The mass is encoded in boundary terms!
Schwarzschild Action Integration
FortranNumerical integration of the gravitational action for vacuum spacetimes
Click Run to execute the Fortran code
Code will be compiled with gfortran and executed on the server