[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]