= Solution
Write $\mathcal L=-\tfrac12g^{\alpha\beta}\partial_\alpha\phi\partial_\beta\phi-V$. Vary the covariant metric while holding the scalar fixed. The supplied determinant and inverse-metric variations give
$$
\delta S=\frac12\int d^4x\sqrt{-g}\left[g^{\mu\nu}\mathcal L+\partial^\mu\phi\partial^\nu\phi\right]\delta g_{\mu\nu}.
$$
By the definition $\delta S=\tfrac12\int\sqrt{-g}\,T^{\mu\nu}\delta g_{\mu\nu}$, lowering its indices yields the <stress-energy tensor of a canonical scalar field>:
$$
\boxed{T_{\mu\nu}=\partial_\mu\phi\partial_\nu\phi-g_{\mu\nu}\left[\frac12(\partial\phi)^2+V(\phi)\right].}
$$
The sign in the determinant variation is positive for varying $g_{\mu\nu}$ and would be negative for varying the inverse metric; matching that convention is essential.
Back to article page