# Computation involving codifferential and Hodge star

Let $$(M,g)$$ be an oriented Riemannian manifold. Then, the codifferential $$\delta$$ is given by $$\delta \omega=-\star d \star \omega$$, where $$\star$$ stands for the Hodge star, $$d$$ for the exterior derivative and $$\omega \in \Omega^1_c(M)$$, where $$\Omega^1_c(M)$$ denotes the differential 1-forms with compact support. I am reading the prove of the following equality $$\int_M \delta(\omega) \mathrm{dvol}_g=0,$$ where $$\mathrm{dvol}_g$$ denotes the Riemannian volume form.

At some point it is used that: $$\int_{M} \star d \star \omega= \int_{M} d(\star \omega).$$ Why is this true?

The left-hand side of the equality is missing $$\operatorname{dvol}_g$$.
For forms $$\alpha, \beta$$ of the same degree, we have $$(\star \alpha) \wedge \beta = (\star \beta) \wedge \alpha$$ (and both are equal to $$\pm \langle \alpha, \beta \rangle \operatorname{dvol}_g$$, but the sign doesn't matter here).
Recall also that $$\star \operatorname{dvol}_g = 1$$.
Thus $$(\star d \star \omega) \wedge \operatorname{dvol}_g = (\star \operatorname{dvol}_g ) \wedge d \star \omega = 1 \wedge d \star \omega = d \star \omega$$. So the equality is actually pointwise.
By the way, if we now integrate over $$M$$, since by Stokes' theorem, $$\int_M d\star \omega = 0$$ (since $$\omega$$ is compactly supported, there is no boundary term), we have $$\int_M (\star d \star \omega) \wedge \operatorname{dvol}_g = 0$$. I've seen this called the divergence theorem, and I think of it as a reformulation of Stokes' theorem in terms of $$\delta$$.