Why can the divergence be defined equivalently as ${\rm div}(X)(x)=\sum_j \langle\nabla_j X,e_j\rangle_x$ and $d(i_X dV)=({\rm div}X)dV$? Let $M$ be an oriented Riemannian manifold with volume form $dV$, and let $X$ be a smooth vector field on $M$. Recall that the divergence of $X$ is characterized by the formula $d(i_X dV)=(\text{div}X) dV $ (where $i_X$ is the interior multiplication by $X$.)
In p.115 of the book Spin Geometry (Lawson, Michelson), it is written that, at $x\in M$, $\text{div}(X)(x)=\sum_j \langle \nabla_{e_j} X,e_j\rangle_x$, where $e_1,\dots,e_n$ is an orthonormal frame of $TM$. Are these two definitions equivalent? I can't see why..
 A: The definition on L&M is ${\rm div}(X)={\rm tr}(\nabla X)$. So it suffices to prove that ${\rm d}(\iota_X{\rm d}V) = {\rm tr}(\nabla X){\rm d}V$. Set $n = \dim M$. Here's a clean way (which doesn't really rely on coordinates):

*

*For any $\alpha \in \Omega^k(M)$, verify that $$\mathcal{L}_X\alpha = \nabla_X\alpha + \sum_{i=1}^k \alpha(\cdot,\cdots, [\nabla X]\cdot, \cdots, \cdot),$$where $\nabla X$ enters in the $i$-th slot. Here, $\mathcal{L}$ stands for the Lie derivative, and this is true for any torsionfree connection. Sanity-check: $\mathcal{L}_X$ and $\nabla_X$ are derivations, so their difference is a tensor.


*For $k=n$, $\alpha$ is closed by dimensional reasons, so $$\mathcal{L}_X\alpha = \iota_X({\rm d}\alpha) +{\rm d}(\iota_X\alpha) = {\rm d}(\iota_X\alpha).$$This is Cartan's homotopy formula.


*The Riemannian volume form $\alpha = {\rm d}V$ is parallel (because the Ricci tensor of the Levi-Civita connection of the metric is symmetric).


*The sum on the right side of (1) when $k=n$ equals ${\rm tr}(\nabla X)\alpha$. This is linear algebra, and you can prove it when $\alpha$ is any linear $n$-form on a $n$-dimensional vector space $V$ and $\nabla X$ is any linear operator $T:V \to V$.


*Put everything together to obtain ${\rm d}(\iota_X{\rm d}V) = {\rm tr}(\nabla X){\rm d}V$.
The bottom line is that ${\rm div}(X)$ makes sense if you have either a connection, or a volume form. For the Levi-Civita connection of a metric and the corresponding Riemannian volume form, both divergences coincide. More generally, if you choose any torsionfree connection and a parallel volume form (whose existence forces the Ricci tensor of the connection to be symmetric), the results will coincide.
