TITLE: divergence of a vector field on a manifold
QUESTION [17 upvotes]: I've been asked to show the following: For a vector field $V$ on a semi-Riemannian manifold with metric $g$ that $$Div \cdot V = \frac{1}{\sqrt{\det(g)}}\partial_i\left(\sqrt{\det(g)}V^i\right)$$ I know we're supposed to use Christoffel symbols as well as a few matrix formulas, but I'm not sure how to proceed. In particular, we were given that for a (invertible) matrix $M$ with some parameter $s$, that $$\frac{d}{ds}\det M(s)=\det M(s) \cdot tr\left(M(s)^{-1}\frac{d}{ds}M(s)\right)$$ and $$\frac{d}{ds}(M(s)^{-1})=-M(s)^{-1}M'(s)M(s)^{-1}$$ Any help would be greatly appreciated.
The definition of divergence that we were given was $$Div \cdot V = \nabla_{\partial_i}V^i = \partial_iV^i+\Gamma_{ij}^iV^i$$

REPLY [13 votes]: $\def\div[0]{\operatorname{div}}$
My favourite reason this formula is true: let $\phi$ be an arbitrary smooth function with compact support contained in a single chart $(U,x)$. Then integrating by parts we get
$$ \int_U \phi \div V d\mu_g= -\int_U V^i \partial_i \phi\, d\mu_g = -\int_U V^i \partial_i \phi \sqrt {\det g}\, dx.$$
Now integrate by parts again, but this time in the chart geometry (i.e. use the product rule for partial derivatives instead of the one for Riemannian divergence, and the measure $dx$ instead of $d \mu_g$):
$$ -\int_U \partial_i \phi\,  V^i \sqrt {\det g}\, dx= \int_U \phi\, \partial_i (\sqrt{\det g}\, V^i) dx = \int_U \phi\, \frac 1{\sqrt{\det g}} \partial_i(\sqrt{\det g}\, V^i)\ d\mu_g.$$
Since this is true for every $\phi$ we get the desired formula for $\div V$.
In some sense this is just a weak version of Giuseppe's answer, but seeing it was the first time this formula really clicked for me, so I figured I'd write it down.