Variations

Variations of the Christoffel symbols, Riemann tensor, Ricci tensor, curvature scalar, and inverse metric:

$\begin{array}{rcl} \delta \Gamma^a_{bc} & = & \frac{1}{2}g^{ad} \Bigl( \nabla_b \delta g_{dc} + \nabla_c \delta g_{bd} - \nabla_d \delta g_{bc} \Bigr) \\ \delta R^a{}_{bcd} & = & \nabla_c \delta\Gamma^a_{bd} - \nabla_d \delta\Gamma^a_{bc} \\ \delta R_{bd} & = & \nabla_a \delta\Gamma^a_{bd} - \nabla_d \delta\Gamma^a_{ba} \\ \delta R & = & \nabla^a \nabla^b \delta g_{ab} - \nabla^a \nabla_a \delta (\ln |g|) - R^{ab}\delta g_{ab} \\ \delta g^{ab} & = & -g^{ac} \delta g_{cd}\, g^{db} \end{array}$

where $\nabla_a$ is the covariant derivative compatible with the metric $g_{ab}$. The variations $\delta$ are general. They can be replaced by, say, coordinate derivatives or time derivatives. Bryce DeWitt's favorite identity is

$\delta(\ln(\det M)) = Tr(M^{-1} \delta M)$

where $M$ is a matrix and $Tr$ denotes the trace. Other useful relations, where $S$ denotes a scalar, include

$\begin{array}{rcl} \delta \nabla_a \nabla_b S & = & \nabla_a \nabla_b \delta S - \frac{1}{2} \nabla^c S \Bigl( \nabla_a\delta g_{bc} + \nabla_b\delta g_{ac} - \nabla_c\delta g_{ab} \Bigr) \\ \delta \nabla^2 S & = & \nabla^2 \delta S - (\nabla^a \nabla^b S) \delta g_{ab} - (\nabla^a S) \nabla^b\delta g_{ab} + (\nabla^a S) \nabla_a \delta (\ln\sqrt{|g|}) \end{array}$

A term that appears in modified gravity theories is

$g^{\mu\nu} \delta \Gamma^\sigma_{\mu\nu} - g^{\mu\sigma} \delta \Gamma^\rho_{\rho\mu} = g^{\mu\nu} \nabla^\sigma(\delta g^{\mu \nu}) - \nabla_\rho (\delta g^{\sigma\rho}).$