Inconsistency in variation of the metric tensor in an action

While doing some exercises on the variation of the metric tensor $$g_{\mu\nu}$$ and of its inverse $$g^{\mu\nu}$$, I came across the following identity:

\begin{align} & \delta(g_{\mu\nu}g^{\mu\nu})=\delta g_{\mu\nu} g^{\mu\nu} + g_{\mu\nu}\delta g^{\mu\nu} \overset{!}{=} 0 \\ \iff & \delta g_{\mu\nu} g^{\mu\nu} = - g_{\mu\nu}\delta g^{\mu\nu} \tag{1} \end{align}

This has the following consequence for the variation of the square root of the determinant of the metric:

\begin{align}\delta\sqrt{-g} &= \frac{1}{2} \sqrt{-g} g^{\mu\nu} \delta g_{\mu\nu} \tag{2} \\ & \overset{!}{=} - \frac{1}{2} \sqrt{-g} g_{\mu\nu} \delta g^{\mu\nu}. \tag{3}\end{align}

Then say I have a non-linear action, which I want to expand around $$\eta_{\mu\nu}$$ (with $$g_{\mu\nu} = \eta_{\mu\nu} + h_{\mu\nu}(x)$$). I observe a contradiction which I couldn't resolve so far, and I would be very thankful if somebody could indicate me where I am (probably) making a mistake.

Let's take the following term:

$$S = \partial_\mu g^{\mu\nu} \partial_\nu \sqrt{-g}. \tag{4}$$

I can expand using $$(2)$$, and I get:

\begin{align} \partial_\mu g^{\mu\nu} \partial_\nu \sqrt{-g} &= \partial_\mu g^{\mu\nu} \frac{1}{2} \sqrt{-g} g^{\alpha\beta} \partial_\nu g_{\alpha\beta} \\ &= \frac{1}{2} \partial_\mu h^{\mu\nu} \eta^{\alpha\beta} \partial_\nu h_{\alpha\beta} + \mathcal{O}(h^3) \\ & = \frac{1}{2} \partial_\mu h^{\mu\nu} \partial_\nu h + \mathcal{O}(h^3) \end{align}

where I defined $$h=\eta^{\alpha\beta} h_{\alpha\beta}$$. Now doing the same using $$(3)$$, I get:

\begin{align} \partial_\mu g^{\mu\nu} \partial_\nu \sqrt{-g} & = \partial_\mu g^{\mu\nu} \left( -\frac{1}{2} \right) \sqrt{-g} g_{\alpha\beta} \partial_\nu g^{\alpha\beta} \\ &= -\frac{1}{2} \partial_\mu h^{\mu\nu} \eta_{\alpha\beta} \partial_\nu h^{\alpha\beta} + \mathcal{O}(h^3) \\ &= -\frac{1}{2} \partial_\mu h^{\mu\nu} \partial_\nu h + \mathcal{O}(h^3) \end{align}

So I get the same result with an extra minus sign. Which one is right, and why?

Thank you very much in advance!

• Related: physics.stackexchange.com/q/483498/2451 and links therein. – Qmechanic Jun 9 at 4:31
• @Qmechanic Do you mean that, when I write $\partial_\nu g^{\alpha\beta}$, what it really means is $\frac{(\delta g)^{\alpha\beta}}{\delta x^\nu}$, while what I wrote in my last equation was $\frac{(\delta g^{\alpha\beta})}{\delta x^\nu}$? If yes, then the relation $(\delta g)^{\alpha\beta} = - (\delta g^{\alpha\beta})$ would solve my problem, and thus the expression with a $+$ sign would be the right one. Does that make sense? – Jxx Jun 9 at 11:48
• The resolution certainly lies in that general direction... – Qmechanic Jun 9 at 11:59
• @Qmechanic Actually it is the expression with the $-$ sign that is correct. I have posted a detailed answer to my own question below, I would be very thankful if you (or somebody else) would quickly review it before I mark it as the right solution. – Jxx Jun 9 at 13:23

So here is what I gathered from other posts such as the one that @Qmechanic posted in the comments. In my expansion, one must not only consider $$\delta \sqrt{-g}$$ but also $$\delta g^{\mu\nu}$$ for the derivatives. The variation $$\delta g^{\mu\nu}$$ can be determined as follows (using (1) in OP):

\begin{align} \delta g^{\mu\nu} g_{\mu\nu} & = - g^{\mu\nu} \delta g_{\mu\nu} \\ & = - g^{\mu\nu} \delta h_{\mu\nu} \\ & = -g^{\mu\nu} \delta h^{\alpha\beta} g_{\alpha\mu} g_{\beta\nu} \\ &= - g^{\beta\nu} \delta h^{\alpha\mu}g_{\alpha\beta} g_{\mu\nu} \\ & = -\delta h^{\mu\nu} g_{\mu\nu} \end{align}

$$\iff \delta g^{\mu\nu} = - \delta h^{\mu\nu} \tag{*}$$

In the step going from the 3rd to the 4th line, I have renamed the contracted indices so that I could have a $$g_{\mu\nu}$$ like in the LHS. (*) means that the derivatives behave this way:

$$\partial_\mu g_{\alpha\beta} = \frac{\delta g_{\alpha\beta}}{\delta x^\mu} = \frac{\delta h_{\alpha\beta}}{\delta x^\mu} = \partial_\mu h_{\alpha\beta} \tag{**}$$

$$\partial_\mu g^{\alpha\beta} = \frac{\delta g^{\alpha\beta}}{\delta x^\mu} = - \frac{\delta h^{\alpha\beta}}{\delta x^\mu} = - \partial_\mu h^{\alpha\beta} \tag{***}$$

Now I can go on and perform my expansion of $$\partial_\mu g^{\mu\nu} \partial_\nu \sqrt{-g}$$ of the OP. First using $$(2)$$, $$(**)$$ and $$(***)$$:

\begin{align} \partial_\mu g^{\mu\nu} \partial_\nu \sqrt{-g} &= - \partial_\mu h^{\mu\nu} \frac{1}{2} \sqrt{-g} g^{\alpha\beta} \partial_\nu g_{\alpha\beta} \\ &= -\frac{1}{2} \partial_\mu h^{\mu\nu} \partial_\nu h + \mathcal{O}(h^3) \end{align}

Now using $$(3)$$, $$(**)$$ and $$(***)$$:

\begin{align} \partial_\mu g^{\mu\nu} \partial_\nu \sqrt{-g} &= - \partial_\mu h^{\mu\nu} \left(- \frac{1}{2} \right) \sqrt{-g} g_{\alpha\beta} \partial_\nu g^{\alpha\beta} \\ &= - \partial_\mu h^{\mu\nu} \left(- \frac{1}{2} \right) \sqrt{-g} g_{\alpha\beta} \left( - \partial_\nu h^{\alpha\beta} \right) \\ &= - \frac{1}{2} \partial_\mu h^{\mu\nu} \partial_\nu h + \mathcal{O}(h^3) \end{align}

And now the results are consistent, no matter if one uses $$(2)$$ or $$(3)$$.