Metric variation of scalar curvature
= Metric variation of scalar curvature
For $h_{ab}=\delta g_{ab}$, the <Ricci scalar> varies as
$$
\delta R=-R^{ab}h_{ab}+\nabla_a\nabla_bh^{ab}-\nabla^a\nabla_ah,
\qquad h=g^{ab}h_{ab}.
$$
The last two terms form a <covariant divergence> and hence contribute only a boundary term to a compactly supported variation of the <Einstein-Hilbert action>.