# EoM via varying action - covariant derivative when integrate

• I
##\int d^4 x \sqrt {g} ... ##

if I am given an action like this , were the ##\sqrt{\pm g} ## , sign depending on the signature , is to keep the integral factor invariant, when finding an eom via variation of calculus, often one needs to integrate by parts. When you integrate by parts, with this integration factor, is it now, always, the covariant derivative, replacing the partial derivative as in normal calculus when integrating by parts ? ..

haushofer
I'm not sure I get the question .but by definition the covariant divergence of a scalar density equals the partial divergence. So one can trade partial for covariant derivatives and vice versa in that case.

Orodruin
Staff Emeritus
Homework Helper
Gold Member
2021 Award
If I am understanding the question correctly, you are looking for something of the form
$$\int d^4x \sqrt{g} A^\mu \partial_\mu f,$$
where you want to do partial integration. Partial integration will always give you
$$- \int d^4x f \partial_\mu(\sqrt{g} A^\mu),$$
which you can rewrite
$$- \int d^4x \sqrt{g} f \left[ A^\mu \frac{1}{\sqrt{g}}\partial_\mu\sqrt{g} + \partial_\mu A^\mu\right].$$
Noting that ##\Gamma^\nu_{\mu\nu} = \partial_\mu \ln(\sqrt{g})##, it follows that
$$\int d^4x \sqrt{g} A^\mu \partial_\mu f = - \int d^4x \sqrt{g} f [A^\mu \Gamma^\nu_{\mu\nu} + \partial_\mu A^\mu] = - \int d^4x \sqrt{g} f \nabla_\mu A^\mu.$$
If this is what you mean by having to use the covariant derivative (keeping the ##\sqrt{g}## factor out of it), then yes.

Note that if you have other indices contracted inside ##f## or ##A^\mu## they will not matter. If you have additional indices that are contracted between ##f## and ##A##, then you should have the covariant derivative from the beginning or your expression would not be coordinate invariant. The integration by parts for those indices does not change the sign of the corresponding Christoffel symbol - which gives the relative sign between the terms that you need to go from the covariant derivative of one part to the covariant derivative of the other. For example (just writing out the integrand apart from ##\sqrt g##)
$$A^\mu_\nu \nabla_\mu f^\nu = A^\mu_\nu (\partial_\mu f^\nu + \Gamma_{\mu\lambda}^\nu f^\lambda) \to (-\partial_\mu A^\mu_\nu - \Gamma^\mu_{\mu\lambda} A^\lambda_\nu + \Gamma_{\mu\nu}^\lambda A^\mu_\lambda) f^\nu = -(\nabla_\mu A^\mu_\nu) f^\nu.$$
As before, the ##\Gamma_{\mu\lambda}^\lambda## came from the differentiation of ##\sqrt{g}## after the partial integration. The second term was not partially integrated (it contains no derivative) and therefore did not switch sign.

binbagsss
PeterDonis
Mentor
were the ##\sqrt{\pm g}## , sign depending on the signature

If you mean the signature convention you adopt for the metric (timelike ##+---## vs. spacelike ##-+++##), it doesn't. For a Lorentzian spacetime, the determinant ##g## of the metric is always negative, so you always have ##\sqrt{-g}##.

Orodruin
Staff Emeritus
Homework Helper
Gold Member
2021 Award
If you mean the signature convention you adopt for the metric (timelike ##+---## vs. spacelike ##-+++##), it doesn't. For a Lorentzian spacetime, the determinant ##g## of the metric is always negative, so you always have ##\sqrt{-g}##.
To be a little more specific, in an even-dimensional Lorentzian manifold, it does not depend on the signature convention.

Note that if you have other indices contracted inside ##f## or ##A^\mu## they will not matter. If you have additional indices that are contracted between ##f## and ##A##, then you should have the covariant derivative from the beginning or your expression would not be coordinate invariant. .
Thank you I think your post helped alot
But why is this ?

Orodruin
Staff Emeritus
Homework Helper
Gold Member
2021 Award
Thank you I think your post helped alot
But why is this ?
Why is what? The case of indices contracted between ##f## and ##A^\mu##? I thought my example with a single index contracted between them would address that. More indices contracted between them are just writing more terms with Christoffel symbols.

Why is what? The case of indices contracted between ##f## and ##A^\mu##? I thought my example with a single index contracted between them would address that. More indices contracted between them are just writing more terms with Christoffel symbols.
no , sorry, the coordinate invariant part

If you mean the signature convention you adopt for the metric (timelike ##+---## vs. spacelike ##-+++##), it doesn't. For a Lorentzian spacetime, the determinant ##g## of the metric is always negative, so you always have ##\sqrt{-g}##.
haha ofc, apologies !

Orodruin
Staff Emeritus
Homework Helper
Gold Member
2021 Award
That is no more difficult than the partial derivative of a tensor component not having the correct transformation properties. You need the covariant derivative for that.

$$A^\mu_\nu \nabla_\mu f^\nu = A^\mu_\nu (\partial_\mu f^\nu + \Gamma_{\mu\lambda}^\nu f^\lambda) \to (-\partial_\mu A^\mu_\nu - \Gamma^\mu_{\mu\lambda} A^\lambda_\nu + \Gamma_{\mu\nu}^\lambda A^\mu_\lambda) f^\nu = -(\nabla_\mu A^\mu_\nu) f^\nu.$$

I just came across this and it was extremely useful but I'm having an issue when the number of indices on the two tensors is the same. For example, (in the integral)
\begin{align*}
\sqrt{g}A^{\mu}\nabla_{\nu}B^{\rho} &= \sqrt{g}A^{\mu}\partial_{\nu}B^{\rho} + \sqrt{g}A^{\mu}\Gamma_{\nu\sigma}^{\sigma}B^{\rho} \\
&= -\sqrt{g}\left( \frac{1}{\sqrt{g}}\partial_{\nu}\sqrt{g}A^{\mu} + \partial_{\nu}A^{\mu} - A^{\mu}\Gamma^{\sigma}_{\nu\sigma} \right)B^{\rho}\\
&= -\sqrt{g}\left( A^{\mu}\Gamma^{\sigma}_{\nu\sigma} + \partial_{\nu}A^{\mu} - A^{\mu}\Gamma^{\sigma}_{\nu\sigma} \right)B^{\rho}\\
&= -\sqrt{g}(\partial_{\nu}A^{\mu})B^{\rho}
\end{align*}

When, of course, I would expect

$$\sqrt{g}A^{\mu}\nabla_{\nu}B^{\rho} = -\sqrt{g}(\nabla_{\nu}A^{\mu})B^{\rho}$$

Can you please explain what I'm missing or doing wrong?

Orodruin
Staff Emeritus