[proofplan]
We prove the pointwise identity $\delta\theta = -\operatorname{div} X_\theta$ by testing it against an arbitrary smooth function $f \in C^\infty(M)$ via integration. The codifferential $\delta : \Omega^1(M) \to \Omega^0(M)$ is defined as the formal $L^2$-adjoint of $d$, so $\int_M f\,\delta\theta\,\omega_g = \int_M g(df, \theta)\,\omega_g$. We rewrite $g(df, \theta)$ as $\langle df, X_\theta \rangle$ via the metric duality $\theta \leftrightarrow X_\theta$, then apply the [Divergence Leibniz Rule](/theorems/2752) $\operatorname{div}(fX_\theta) = f\,\operatorname{div}(X_\theta) + \langle df, X_\theta\rangle$ to express $\langle df, X_\theta\rangle$ as a divergence minus $f\,\operatorname{div}(X_\theta)$. Integrating and using the [Divergence Theorem](/theorems/2754) to kill the $\operatorname{div}(fX_\theta)$ term yields $\int_M f(\delta\theta + \operatorname{div} X_\theta)\,\omega_g = 0$ for all $f$. By the fundamental lemma of the calculus of variations, $\delta\theta = -\operatorname{div} X_\theta$ pointwise.
[/proofplan]
[step:Translate the formal adjoint property of $\delta$ into an integral identity tested against $f$]
Let $(M, g)$ be an oriented closed Riemannian manifold of dimension $n$, $\nabla$ the Levi-Civita connection, $\omega_g$ the Riemannian volume form, $\theta \in \Omega^1(M)$ a smooth $1$-form, and $X_\theta \in \mathfrak{X}(M)$ the metric dual of $\theta$, defined pointwise by the unique $X_\theta(p) \in T_p M$ such that $\theta_p(V) = g_p(X_\theta(p), V)$ for all $V \in T_p M$. The metric duality $\flat : \mathfrak{X}(M) \to \Omega^1(M)$, $X \mapsto g(X, \cdot)$, with inverse $\sharp$, is a $C^\infty(M)$-linear bijection; $X_\theta = \theta^\sharp$.
The codifferential $\delta : \Omega^1(M) \to \Omega^0(M) = C^\infty(M)$ is defined as the formal $L^2$-adjoint of $d : \Omega^0(M) \to \Omega^1(M)$ with respect to the global $L^2$ inner products on $\Omega^0$ and $\Omega^1$ induced by $g$. By the [Co-differential is Formal Adjoint of $d$](/theorems/2742) identity, applied to $\alpha := f \in \Omega^0(M)$ and $\beta := \theta \in \Omega^1(M)$ — both smooth and globally defined on the closed manifold $M$, hence both lying in $L^2$ —
\begin{align*}
\int_M g(df, \theta)\,\omega_g = \int_M f \cdot \delta\theta \,\omega_g \qquad \text{for every } f \in C^\infty(M).
\tag{A}
\end{align*}
[/step]
[step:Rewrite $g(df, \theta)$ as the natural pairing $\langle df, X_\theta\rangle$ via the musical isometry]
The pointwise identity $\theta_p(V) = g_p(X_\theta(p), V)$ defines $X_\theta$ as the metric dual of $\theta$. The metric gradient $\nabla f \in \mathfrak{X}(M)$ is characterised by
\begin{align*}
g_p((\nabla f)_p, W) = df_p(W) \qquad \text{for all } W \in T_p M.
\end{align*}
Two distinct inner products appear in (A): the inner product $g(df, \theta)$ of two $1$-forms (using the metric induced by $g$ on $T^*M$) and the inner product $g(\nabla f, X_\theta)$ of two vector fields (using $g$ itself on $TM$). We claim these are equal:
\begin{align*}
g(df, \theta) = g(\nabla f, X_\theta) = df(X_\theta).
\tag{$\sharp$}
\end{align*}
[claim:The musical isomorphism $\flat : TM \to T^*M$, $V \mapsto g(V, \cdot)$, is a fibrewise isometry between $(TM, g)$ and $(T^*M, g^{-1})$, where $g^{-1}$ denotes the cometric — the inner product on $T^*M$ induced by $g$]
In components, the cometric is given by the matrix inverse $g^{ij}$ of $g_{ij}$; we verify that this coincides with the inner product for which $\flat$ is an isometry, and deduce ($\sharp$).
[proof]
Fix $p \in M$ and choose a $g_p$-orthonormal basis $(e_1, \dots, e_n)$ of $T_p M$ with dual coframe $(\omega^1, \dots, \omega^n)$ on $T_p^* M$, so $\omega^i(e_j) = \delta^i_j$. In this basis $g_{ij} := g_p(e_i, e_j) = \delta_{ij}$, hence the matrix inverse satisfies $g^{ij} = \delta^{ij}$.
The vector dual of $\omega^j$ via the relation $\omega^j(V) = g_p(X_{\omega^j}, V)$ is $X_{\omega^j} = e_j$: indeed, $g_p(e_j, e_k) = \delta_{jk} = \omega^j(e_k)$ for every $k$, and the relation determines $X_{\omega^j}$ uniquely by non-degeneracy of $g_p$. Therefore the inner product on $T_p^*M$ induced by declaring $\flat$ an isometry assigns
\begin{align*}
g_p^{-1}(\omega^i, \omega^j) := g_p(X_{\omega^i}, X_{\omega^j}) = g_p(e_i, e_j) = \delta_{ij} = g^{ij},
\end{align*}
which agrees with the matrix-inverse cometric. By bilinearity in the coframe, the two definitions of $g^{-1}$ coincide on every pair of $1$-forms at $p$, hence globally.
It remains to identify $X_{df}$ with $\nabla f$. Apply the defining relation for the dual vector field with $\theta := df$: for every $V \in T_p M$,
\begin{align*}
df_p(V) = g_p(X_{df}(p), V).
\end{align*}
But the gradient is characterised by $df_p(V) = g_p((\nabla f)_p, V)$ for every $V$. Subtracting, $g_p(X_{df}(p) - (\nabla f)_p, V) = 0$ for every $V$, and non-degeneracy of $g_p$ forces $X_{df} = \nabla f$.
Combining:
\begin{align*}
g(df, \theta) = g^{-1}(df, \theta) = g(X_{df}, X_\theta) = g(\nabla f, X_\theta),
\end{align*}
where the second equality is the isometry property and the third is $X_{df} = \nabla f$. Finally, $g(\nabla f, X_\theta) = df(X_\theta)$ is the gradient definition with $V := X_\theta$. This proves ($\sharp$).
[/proof]
[/claim]
Defining the natural pairing $\langle df, X_\theta\rangle := df(X_\theta) \in C^\infty(M)$, ($\sharp$) reads
\begin{align*}
\langle df, X_\theta \rangle = df(X_\theta) = g(\nabla f, X_\theta) = g(df, \theta).
\end{align*}
Hence (A) reads
\begin{align*}
\int_M \langle df, X_\theta\rangle\,\omega_g = \int_M f \cdot \delta\theta\,\omega_g \qquad \text{for every } f \in C^\infty(M).
\tag{A$'$}
\end{align*}
[/step]
[step:Apply the divergence Leibniz rule and the Divergence Theorem]
By the [Divergence Leibniz Rule](/theorems/2752),
\begin{align*}
\operatorname{div}(f\,X_\theta) = f\,\operatorname{div}(X_\theta) + \langle df, X_\theta \rangle,
\end{align*}
which holds pointwise on $M$ for any $f \in C^\infty(M)$ and $X_\theta \in \mathfrak{X}(M)$. Solving for $\langle df, X_\theta \rangle$,
\begin{align*}
\langle df, X_\theta \rangle = \operatorname{div}(f\,X_\theta) - f\,\operatorname{div}(X_\theta).
\tag{L}
\end{align*}
Integrate (L) against $\omega_g$ on $M$. The integrand on the left is smooth on the compact $M$, hence integrable; and likewise for the right-hand side terms. We obtain
\begin{align*}
\int_M \langle df, X_\theta\rangle\,\omega_g = \int_M \operatorname{div}(f\,X_\theta)\,\omega_g - \int_M f\,\operatorname{div}(X_\theta)\,\omega_g.
\end{align*}
The product $f\,X_\theta \in \mathfrak{X}(M)$ is a smooth vector field on the closed (oriented compact without boundary) manifold $M$. The hypotheses of the [Divergence Theorem](/theorems/2754) — orientability and closedness of $M$ — are satisfied by hypothesis, applied to the vector field $fX_\theta$. The theorem yields
\begin{align*}
\int_M \operatorname{div}(f\,X_\theta)\,\omega_g = 0.
\end{align*}
Therefore
\begin{align*}
\int_M \langle df, X_\theta\rangle\,\omega_g = -\int_M f\,\operatorname{div}(X_\theta)\,\omega_g.
\tag{B}
\end{align*}
[/step]
[step:Combine (A$'$) and (B), then invoke the fundamental lemma]
Combining (A$'$) and (B), for every $f \in C^\infty(M)$,
\begin{align*}
\int_M f\,\delta\theta\,\omega_g = \int_M \langle df, X_\theta\rangle\,\omega_g = -\int_M f\,\operatorname{div}(X_\theta)\,\omega_g.
\end{align*}
Rearranging,
\begin{align*}
\int_M f\,\big(\delta\theta + \operatorname{div}(X_\theta)\big)\,\omega_g = 0 \qquad \text{for every } f \in C^\infty(M).
\tag{C}
\end{align*}
The function $h := \delta\theta + \operatorname{div}(X_\theta) \in C^\infty(M)$ is smooth (both terms are smooth functions of $\theta$ and the metric data), so (C) reads $\int_M f\,h\,\omega_g = 0$ for every $f \in C^\infty(M)$. By the **fundamental lemma of the calculus of variations** on a Riemannian manifold: if $h \in C^0(M)$ satisfies $\int_M f\,h\,\omega_g = 0$ for every $f \in C^\infty(M)$, then $h \equiv 0$. (This follows by choosing $f$ to be a bump function concentrated near any point where $h(p) \neq 0$ and arguing that the integral would have a definite sign.) Applied here,
\begin{align*}
\delta\theta + \operatorname{div}(X_\theta) = 0 \qquad \text{pointwise on } M,
\end{align*}
i.e., $\delta\theta = -\operatorname{div}(X_\theta)$, which is the asserted identity.
[guided]
We have produced two integral identities for the same quantity $\int_M \langle df, X_\theta\rangle\,\omega_g$: the formal-adjoint identity (A$'$) tells us this integral equals $\int_M f\,\delta\theta\,\omega_g$, while the Leibniz–divergence-theorem identity (B) tells us it equals $-\int_M f\,\operatorname{div}(X_\theta)\,\omega_g$. The strategy now is to equate these two expressions, rearrange, and pass from an integral identity (which holds for *all* test functions $f$) to a *pointwise* identity (which is the assertion of the theorem). The bridge between the two is the fundamental lemma of the calculus of variations.
**Equating (A$'$) and (B).** Both identities have $\int_M \langle df, X_\theta\rangle\,\omega_g$ on the same side, so they may be chained together. For every $f \in C^\infty(M)$,
\begin{align*}
\int_M f\,\delta\theta\,\omega_g = \int_M \langle df, X_\theta\rangle\,\omega_g = -\int_M f\,\operatorname{div}(X_\theta)\,\omega_g.
\end{align*}
The first equality is (A$'$) read right-to-left; the second is (B). Why is this chaining legal? Both equalities hold for the *same* $f$ and the *same* $\theta$, and both sides of each are well-defined real numbers (the integrands are smooth on the compact manifold $M$, hence integrable).
**Rearranging.** Move the right-hand integral to the left-hand side. Because both integrals are taken against the same volume form $\omega_g$, we may combine them under a single integral by linearity:
\begin{align*}
\int_M f\,\big(\delta\theta + \operatorname{div}(X_\theta)\big)\,\omega_g = 0 \qquad \text{for every } f \in C^\infty(M).
\tag{C}
\end{align*}
This is the key intermediate identity. Notice what it says: the smooth function $\delta\theta + \operatorname{div}(X_\theta)$, when integrated against an *arbitrary* smooth test function $f$, always gives zero. Heuristically, the only function with this property is the zero function — but we must justify this rigorously.
**Why we can extract a pointwise statement.** Let $h := \delta\theta + \operatorname{div}(X_\theta) \in C^\infty(M)$. Both $\delta\theta$ and $\operatorname{div}(X_\theta)$ are smooth functions on $M$ (the codifferential of a smooth $1$-form is smooth, and the divergence of a smooth vector field is smooth), so $h$ is smooth, hence in particular continuous. Identity (C) reads: for every $f \in C^\infty(M)$,
\begin{align*}
\int_M f\,h\,\omega_g = 0.
\end{align*}
We now invoke the **fundamental lemma of the calculus of variations** on a Riemannian manifold: if $h \in C^0(M)$ satisfies $\int_M f\,h\,\omega_g = 0$ for every $f \in C^\infty(M)$, then $h \equiv 0$ on $M$.
Why does the fundamental lemma hold? Suppose for contradiction that $h(p_0) \neq 0$ at some $p_0 \in M$; without loss of generality $h(p_0) > 0$. By continuity of $h$, there is a chart neighbourhood $U \ni p_0$ on which $h > h(p_0)/2 > 0$. Choose a non-negative bump function $f \in C^\infty(M)$ with $\operatorname{supp}(f) \subset U$, $f \geq 0$ everywhere, and $f > 0$ on a neighbourhood of $p_0$. Then $f h \geq 0$ everywhere on $M$ and $f h > 0$ on a neighbourhood of $p_0$, so
\begin{align*}
\int_M f\,h\,\omega_g > 0,
\end{align*}
contradicting (C). Hence $h \equiv 0$.
**Conclusion.** Applied here, the fundamental lemma gives $h \equiv 0$, i.e.,
\begin{align*}
\delta\theta + \operatorname{div}(X_\theta) = 0 \qquad \text{pointwise on } M,
\end{align*}
which rearranges to $\delta\theta = -\operatorname{div}(X_\theta)$ — the asserted identity. The result is a clean bridge between Hodge theory (where $\delta$ is defined as a formal adjoint, abstractly) and Riemannian geometry (where $\operatorname{div}$ is defined via $\operatorname{tr}(\nabla \cdot)$, concretely), and provides the mechanism for computing $\delta$ in local frames.
[/guided]
[/step]