Coordinate expression for the divergent Let $(M, g)$ be a Riemannian manifold. As in Lee's Riemannian Manifolds book, we define the divergent of a vector field $X \in \mathfrak{X}(M)$ by the identity $d(\iota_X dV) = (div X) dV$, where $\iota_X dV(V_1, \ldots, V_{n-1}) = dV(X, V_1, \ldots, V_{n-1})$, where $dV$ is the volume element.
If I have coordinates $y^1, \ldots, y^n$ (positively oriented), I know I can write $dV = \sqrt{\det g_{ij}} dy^1 \wedge \ldots \wedge dy^n$, but how can I write $div X$ in these coordinates? I'm not sure how to express $\iota_X dV$ in terms of the $dy^i$ so that I can differentiate it.
 A: Let $\partial_i$ denote the partial derivative wrt $y^i$ and set $X=\sum_i X_i\partial_i$. Then the $(n-1)$-form that we must differentiate is $i_XdV=\sum_j a_jdy^1\wedge\cdots\wedge\widehat{dy^j}\wedge\cdots\wedge dy^n$ with
$$
a_j=i_XdV(\partial_1,\dots,\widehat{\partial_j},\dots,\partial_n)=dV(X,\partial_1,\dots,\widehat{\partial_j},\dots,\partial_n)\hspace{3,8cm}
$$
$$=(-1)^{j-1}dV(\partial_1,\dots,X,\dots,\partial_n)=(-1)^{j-1}{\sum}_idV(\partial_1,\dots,{\sum}_i X_i\partial_i,\dots,\partial_n),
$$
where ${\sum}_i X_i\partial_i$ is in the $j$-th place. Thus only $X_j$ remains and
$$
a_j=(-1)^{j-1}X_jdV(\partial_1,\dots,\partial_j,\dots,\partial_n)=(-1)^{j-1}X_j\sqrt{\det(g_{k\ell})}.
$$
Consequently
$$
d(i_xdV)={\sum}_jda_j\wedge dy^1\wedge\cdots\wedge\widehat{dy^j}\wedge\cdots\wedge dy^n\hspace{8cm}
$$
$$
={\sum}_j\big({\sum}_i\partial_ia_jdy^i\big)\wedge dy^1\wedge\cdots\wedge\widehat{dy^j}\wedge\cdots\wedge dy^n
={\sum}_j(-1)^{j-1}\partial_ja_j dy^1\wedge\cdots\wedge dy^n
$$
$$
={\sum}_j\frac{1}{\sqrt{\det(g_{k\ell})}}\partial_j\big(X_j\sqrt{\det(g_{k\ell})}\big)dV
$$
(using the local expresion of $dV$). Hence in local coordinates
$$
div(X)=\frac{1}{\sqrt{\det(g_{k\ell})}}{\sum}_j\partial_j\big(X_j\sqrt{\det(g_{k\ell})}\big).
$$
