[proofplan]
The strategy reduces the integral identity to Stokes' theorem. Using the previously established lemma $(\operatorname{div} X)\,\omega_g = d(i(X)\omega_g)$ — which expresses the divergence-volume product as an exact $n$-form — the integral $\int_M (\operatorname{div} X)\,\omega_g$ is rewritten as the integral of $d(i(X)\omega_g)$ over $M$. Since $M$ is closed (compact and without boundary) and oriented, Stokes' theorem applied to the $(n-1)$-form $i(X)\omega_g$ gives an integral over the empty boundary, which is zero.
[/proofplan]
[step:Set up the integrand and identify it as an exact form]
Let $(M, g)$ be an oriented closed Riemannian manifold of dimension $n$, $\nabla$ the Levi-Civita connection, $\omega_g \in \Omega^n(M)$ the Riemannian volume form determined by $g$ and the orientation, and $X \in \mathfrak{X}(M)$. The divergence $\operatorname{div} X \in C^\infty(M)$ is defined by $\operatorname{div} X = \operatorname{tr}(\nabla X)$, viewing $\nabla X$ as a section of $\operatorname{End}(TM)$ via the canonical isomorphism $T^*M \otimes TM \cong \operatorname{End}(TM)$ given by the trace-contraction pairing.
The product $(\operatorname{div} X)\,\omega_g \in \Omega^n(M)$ is a top-degree form. By the [Divergence and Volume Form](/theorems/2753) identity, this top-degree form equals the exterior derivative of the contraction of $\omega_g$ by $X$:
\begin{align*}
(\operatorname{div} X)\,\omega_g = d\big( i(X)\,\omega_g \big) \in \Omega^n(M).
\tag{$\star$}
\end{align*}
Here $i(X) : \Omega^k(M) \to \Omega^{k-1}(M)$ is the interior product (contraction with $X$ in the first slot), so $i(X)\omega_g \in \Omega^{n-1}(M)$ is a smooth $(n-1)$-form on $M$. Both sides of ($\star$) are smooth global $n$-forms on $M$.
Integrating ($\star$) over $M$ — which is permitted because $M$ is oriented and $(\operatorname{div} X)\,\omega_g$ is a smooth top-degree form on the compact manifold $M$, hence absolutely integrable — yields
\begin{align*}
\int_M (\operatorname{div} X)\,\omega_g = \int_M d\big( i(X)\,\omega_g \big).
\end{align*}
The problem is reduced to showing that the right-hand side vanishes.
[/step]
[step:Apply Stokes' theorem on the closed manifold $M$]
Stokes' theorem on an oriented manifold with boundary states that for any compactly supported smooth $(n-1)$-form $\eta$ on an oriented $n$-dimensional manifold $N$ with boundary $\partial N$ (carrying the induced orientation),
\begin{align*}
\int_N d\eta = \int_{\partial N} \eta.
\end{align*}
We verify the hypotheses for $N := M$ and $\eta := i(X)\,\omega_g$. The manifold $M$ is oriented by hypothesis. It is compact by hypothesis ("closed Riemannian manifold"), so the form $\eta = i(X)\,\omega_g$ — being smooth on the compact $M$ — has compact support automatically. The boundary $\partial M$ is empty by hypothesis ("closed" means compact without boundary). Therefore Stokes' theorem applies and gives
\begin{align*}
\int_M d\big( i(X)\,\omega_g \big) = \int_{\partial M} i(X)\,\omega_g = \int_\varnothing i(X)\,\omega_g = 0,
\end{align*}
since the integral over the empty set is zero by convention.
Combining with the previous step,
\begin{align*}
\int_M (\operatorname{div} X)\,\omega_g = \int_M d\big( i(X)\,\omega_g \big) = 0.
\end{align*}
This is the asserted identity.
[guided]
We have, from the previous step, the integral identity
\begin{align*}
\int_M (\operatorname{div} X)\,\omega_g = \int_M d\big( i(X)\,\omega_g \big),
\end{align*}
and our task is to show the right-hand side vanishes. The natural tool is **Stokes' theorem**, which converts the integral of an exact form over a manifold into a boundary integral. The key observation is that $M$ is *closed* — compact without boundary — so the boundary integral is over the empty set and vanishes outright. The whole proof, then, hinges on verifying that Stokes' theorem applies.
Recall the statement of Stokes' theorem on an oriented manifold $N$ of dimension $n$ with boundary $\partial N$ (carrying the induced orientation): for any compactly supported smooth $(n-1)$-form $\eta \in \Omega^{n-1}(N)$,
\begin{align*}
\int_N d\eta = \int_{\partial N} \eta.
\end{align*}
Why is this the right tool? Because $i(X)\,\omega_g \in \Omega^{n-1}(M)$ is precisely the type of object Stokes accepts — a smooth $(n-1)$-form on an $n$-manifold — and we have already written our integrand as $d$ of such a form. The whole point of the lemma $(\star)$ from the previous step was to set up this application.
Let us verify each of the three hypotheses for the choice $N := M$ and $\eta := i(X)\,\omega_g$.
*Orientation.* $M$ is oriented by hypothesis. This is what makes the volume form $\omega_g$ globally well-defined in the first place; without orientability, the integrand $(\operatorname{div} X)\,\omega_g$ would not even be defined globally.
*Compact support of $\eta$.* The form $\eta = i(X)\,\omega_g$ is smooth (since $X$ is smooth and $\omega_g$ is smooth). On a compact manifold every smooth form has compact support automatically — its support is a closed subset of the compact manifold $M$ and is therefore compact. So this hypothesis is free.
*Boundary.* This is where "closed" does the work. In Riemannian geometry, "closed manifold" means *compact and without boundary* — not "closed" in the topological sense of being the complement of an open set. So $\partial M = \varnothing$ by hypothesis.
With all three hypotheses verified, Stokes' theorem applies and yields
\begin{align*}
\int_M d\big( i(X)\,\omega_g \big) = \int_{\partial M} i(X)\,\omega_g = \int_\varnothing i(X)\,\omega_g = 0,
\end{align*}
where the final equality uses the convention that the integral of any form over the empty set is zero.
Combining this with the identity carried over from the previous step,
\begin{align*}
\int_M (\operatorname{div} X)\,\omega_g = \int_M d\big( i(X)\,\omega_g \big) = 0,
\end{align*}
which is the asserted identity.
A few remarks on what makes this proof so short, and what would happen if any hypothesis were dropped. The proof needs no partition of unity and no local-to-global gluing: the lemma $(\star)$ is already a global identity, and Stokes' theorem is invoked once globally. *Without orientability*, the volume form $\omega_g$ would not be globally defined and the integral $\int_M (\operatorname{div} X)\,\omega_g$ would have no meaning. *Without compactness*, the integral might not converge, and Stokes' theorem itself requires compact support — the classical Euclidean divergence theorem on $\mathbb{R}^n$ accordingly imposes a decay condition on $X$ at infinity. *With non-empty boundary*, the right-hand side would not vanish; instead one obtains the classical divergence theorem with boundary term, $\int_M (\operatorname{div} X)\,\omega_g = \int_{\partial M} g(X, \nu)\,\omega_{\partial M}$, where $\nu$ is the outward unit normal. The clean statement on a closed manifold is exactly the limit of this formula when the boundary term disappears.
[/guided]
[/step]