# Which derivative to use in the change of metric tensor due to a gauge transformation?

I'm used to calculating the change in the metric due to a gauge transformation in the following way:

The gauge transformation up to linear order is

$$$$x^\mu \rightarrow x' ^\mu =x^\mu + \xi^\mu$$$$

If I think of the metric as a tensor, then the following identity holds

$$$$g'_{\mu\nu}(x')=\frac{\partial x^\alpha}{\partial x'^\mu}\frac{\partial x^\beta}{\partial x'^\nu}g_{\alpha\beta}(x)$$$$

To linear order the coordinate change is just $$\frac{\partial x^\alpha}{\partial x'^\mu}=\delta^\alpha_\mu-\xi^\alpha_{\ \ \ ,\mu}$$ so we get the usual

$$$$g'_{\mu\nu}(x')=g_{\mu\nu}(x)-\xi_{\mu,\nu}-\xi_{\nu,\mu}$$$$

Eq. 7.13 on Carroll's Spacetime and Geometry claims that the metric is corrected by $$-\xi_{\mu;\nu}-\xi_{\nu;\mu}$$ where the $$;$$ indicates a covariant derivative instead of a flat one. Since he is calculating this in the context of linearized gravity he throws the covariant derivative and ends up with the same result as I have. However, I was wondering if there's a way to get the covariant derivative with the tensorial method I'm using here. He uses a more complicated derivation involving pullbacks and Lie derivatives.

You have almost the right formula, you just didn't follow through a bit more. We start with $$g'_{\mu\nu}(x') = g_{\mu\nu}(x) - g_{\alpha\mu}(x) \partial_\nu \xi^\alpha(x)- g_{\alpha\nu}(x) \partial_\mu \xi^\alpha(x)$$ Note that $$g_{\mu\nu}(x)$$ depends on $$x$$ so you cannot move it into the derivative, i.e. $$g_{\alpha\mu}(x) \partial_\nu \xi^\alpha(x) \neq \partial_\nu \xi_\mu(x)$$.
Next, we write $$g'_{\mu\nu}(x') = g'_{\mu\nu}(x+\xi) = g'_{\mu\nu}(x) + \xi^\alpha \partial_\alpha g'_{\mu\nu}(x) + O(\xi^2).$$ However, we also have $$g' = g + O(\xi)$$. Thus, $$g'_{\mu\nu}(x') = g'_{\mu\nu}(x+\xi) = g'_{\mu\nu}(x) + \xi^\alpha \partial_\alpha g_{\mu\nu}(x) + O(\xi^2).$$ Plugging all this in, we find $$g'_{\mu\nu}(x) - g_{\mu\nu}(x) = - g_{\alpha\mu}(x) \partial_\nu \xi^\alpha(x)- g_{\alpha\nu}(x) \partial_\mu \xi^\alpha(x) - \xi^\alpha \partial_\alpha g_{\mu\nu}(x).$$ The final step for you is to prove is that $$g_{\alpha\mu}(x) \partial_\nu \xi^\alpha(x) + g_{\alpha\nu}(x) \partial_\mu \xi^\alpha(x) + \xi^\alpha \partial_\alpha g_{\mu\nu}(x) = \nabla_\mu \xi_\nu(x) + \nabla_\nu \xi_\mu(x) .$$ I'm going to leave this final step to you.
One possible way is the following. Start with your version and replace the partial derivatives by the covariant derivatives, i.e., $$g'_{\mu\nu}(x')=g_{\mu\nu}(x)-\xi_{\mu;\nu}-\xi_{\nu; \mu} - 2 \Gamma^\kappa_{\mu \nu} \xi_\kappa,$$ where the last term is due to the symmetry of the Christoffel symbols. Now, we have a tensorial equation. If this equation is true in one frame it should be valid in all the other frames. So just choose the Riemannian normal coordinates (NC) (see this for example) with respect to the metric $$g_{\mu \nu}$$, in which the connection coefficients vanish, i.e., $$\Gamma^\kappa_{\mu \nu} \overset{\rm{NC}}{=} 0.$$ Then, one finds the the expression you wanted to have. However, I prefer to work with the Lie derivative for this purpose.