[proofplan]
We first show that integration descends from closed $n$-forms to degree-$n$ de Rham cohomology by [Stokes' theorem](/theorems/1530), because exact top-degree forms have integral zero on a closed manifold. Surjectivity is obtained by placing a compactly supported $n$-form of total integral $1$ inside an oriented coordinate ball. The main point is injectivity: we use the standard compactly supported exactness statement for top forms on coordinate balls, together with a [partition of unity](/page/Partition%20of%20Unity) and connectedness of $M$, to show that every top form with total integral zero differs by exact local corrections from a finite sum whose local masses cancel along overlapping coordinate balls. Each cancellation is exact, so the original form is exact.
[/proofplan]
[step:Show that integration descends to de Rham cohomology]
Let
\begin{align*}
I_0: \Omega^n(M) &\longrightarrow \mathbb{R} \\
\omega &\longmapsto \operatorname{Int}_M(\omega)
\end{align*}
denote oriented integration of smooth top-degree forms over $M$. More explicitly, $\operatorname{Int}_M(\omega)$ is computed in positively oriented coordinate charts using Lebesgue measure $\mathcal{L}^n$ on $\mathbb{R}^n$. Since $\dim M = n$, every $\omega \in \Omega^n(M)$ is closed, because $d\omega \in \Omega^{n+1}(M) = 0$.
We verify that $I_0$ vanishes on exact $n$-forms. Let $\eta \in \Omega^{n-1}(M)$. Since $M$ is closed, $\partial M = \varnothing$. By Stokes' theorem (citing a result not yet in the wiki: Stokes' Theorem),
\begin{align*}
\operatorname{Int}_M(d\eta) = \operatorname{Int}_{\partial M}(\eta) = \operatorname{Int}_{\varnothing}(\eta) = 0.
\end{align*}
Therefore $I_0(\omega + d\eta) = I_0(\omega)$ for all $\omega \in \Omega^n(M)$ and all $\eta \in \Omega^{n-1}(M)$. Hence $I_0$ induces a well-defined [linear map](/page/Linear%20Map)
\begin{align*}
I: H^n_{\mathrm{dR}}(M) &\longrightarrow \mathbb{R} \\
[\omega] &\longmapsto \operatorname{Int}_M(\omega).
\end{align*}
[guided]
The first issue is not injectivity or surjectivity, but whether the displayed formula depends on the representative of the cohomology class. Define
\begin{align*}
I_0: \Omega^n(M) &\longrightarrow \mathbb{R} \\
\omega &\longmapsto \operatorname{Int}_M(\omega).
\end{align*}
Here $\operatorname{Int}_M(\omega)$ means the oriented integral of the top-degree form $\omega$ over $M$, computed in positively oriented coordinate charts using Lebesgue measure $\mathcal{L}^n$ on $\mathbb{R}^n$. This is a linear functional on smooth top-degree forms. Because $M$ has dimension $n$, there are no nonzero smooth $(n+1)$-forms, so every $n$-form is closed.
Two representatives of the same de Rham class differ by an exact form. Thus we must prove that
\begin{align*}
\operatorname{Int}_M(d\eta) = 0
\end{align*}
for every $\eta \in \Omega^{n-1}(M)$. Since $M$ is closed, it has no boundary: $\partial M = \varnothing$. Applying Stokes' theorem (citing a result not yet in the wiki: Stokes' Theorem) gives
\begin{align*}
\operatorname{Int}_M(d\eta) = \operatorname{Int}_{\partial M}(\eta) = \operatorname{Int}_{\varnothing}(\eta) = 0.
\end{align*}
Therefore adding an exact form does not change the integral, and integration descends to the quotient by exact forms:
\begin{align*}
I: H^n_{\mathrm{dR}}(M) &\longrightarrow \mathbb{R} \\
[\omega] &\longmapsto \operatorname{Int}_M(\omega).
\end{align*}
[/guided]
[/step]
[step:Construct a cohomology class with integral one]
Choose an oriented coordinate chart $(U,\varphi)$ on $M$ such that $\varphi(U) \subset \mathbb{R}^n$ is open, and choose a relatively compact open ball $B \subset \varphi(U)$. Here $\mathcal{L}^n$ denotes Lebesgue measure on $\mathbb{R}^n$. Let $\rho \in C_c^\infty(B)$ be a nonnegative smooth function satisfying
\begin{align*}
\int_B \rho(y)\,d\mathcal{L}^n(y) = 1.
\end{align*}
Define the compactly supported $n$-form $\omega_0 \in \Omega^n(M)$ by
\begin{align*}
\omega_0|_U = (\rho \circ \varphi)\, d\varphi_1 \wedge \cdots \wedge d\varphi_n,
\qquad
\omega_0|_{M \setminus \varphi^{-1}(\operatorname{supp}\rho)} = 0.
\end{align*}
Because the chart is oriented, the change-of-variables formula gives
\begin{align*}
\operatorname{Int}_M(\omega_0)
=
\int_B \rho(y)\,d\mathcal{L}^n(y)
=
1.
\end{align*}
Thus $I([\omega_0]) = 1$, and by linearity $I$ is surjective.
[guided]
To prove surjectivity, it is enough to build one cohomology class whose integral is $1$, because scalar multiples will then realize every real number. Choose an oriented coordinate chart $(U,\varphi)$, where
\begin{align*}
\varphi: U \longrightarrow \varphi(U) \subset \mathbb{R}^n
\end{align*}
is an orientation-preserving diffeomorphism onto its image. Choose an open Euclidean ball $B \subset \varphi(U)$ whose closure is compact and contained in $\varphi(U)$.
Now choose a nonnegative bump function $\rho \in C_c^\infty(B)$ normalized by
\begin{align*}
\int_B \rho(y)\,d\mathcal{L}^n(y) = 1,
\end{align*}
where $\mathcal{L}^n$ denotes Lebesgue measure on $\mathbb{R}^n$.
Such a function exists by the standard bump-function construction on Euclidean space, followed by division by its positive integral.
Define $\omega_0 \in \Omega^n(M)$ by placing this Euclidean density inside the chart:
\begin{align*}
\omega_0|_U = (\rho \circ \varphi)\, d\varphi_1 \wedge \cdots \wedge d\varphi_n,
\qquad
\omega_0|_{M \setminus \varphi^{-1}(\operatorname{supp}\rho)} = 0.
\end{align*}
The support condition $\operatorname{supp}\rho \subset B \Subset \varphi(U)$ ensures that this extension by zero is smooth on all of $M$.
Because $(U,\varphi)$ is oriented, integration of the top form in this chart becomes ordinary Lebesgue integration over $\mathbb{R}^n$. Hence
\begin{align*}
\operatorname{Int}_M(\omega_0)
=
\int_B \rho(y)\,d\mathcal{L}^n(y)
=
1.
\end{align*}
Therefore $I([\omega_0])=1$. Since $I$ is linear, for each $a \in \mathbb{R}$ we have $I([a\omega_0])=a$, proving surjectivity.
[/guided]
[/step]
[step:Reduce injectivity to a zero-integral exactness lemma]
We use the following standard lemma.
[claim:Zero-integral top forms on connected closed oriented manifolds are exact]
Let $M$ be a connected closed oriented smooth $n$-manifold with $n \geq 1$. If $\omega \in \Omega^n(M)$ satisfies
\begin{align*}
\operatorname{Int}_M(\omega) = 0,
\end{align*}
then there exists $\eta \in \Omega^{n-1}(M)$ such that $\omega = d\eta$.
[/claim]
[proof]
Choose a finite oriented coordinate-ball cover $(U_i)_{i=1}^N$ of $M$ and a smooth partition of unity $(\psi_i)_{i=1}^N$ subordinate to this cover. For each index $i$, define
\begin{align*}
\omega_i := \psi_i \omega \in \Omega^n(M).
\end{align*}
Then $\operatorname{supp}\omega_i \subset U_i$, and
\begin{align*}
\omega = \sum_{i=1}^N \omega_i.
\end{align*}
Define the [real numbers](/page/Real%20Numbers)
\begin{align*}
a_i := \operatorname{Int}_M(\omega_i).
\end{align*}
Since $\sum_i \psi_i = 1$, linearity of oriented integration gives
\begin{align*}
\sum_{i=1}^N a_i
=
\operatorname{Int}_M\left(\sum_{i=1}^N \omega_i\right)
=
\operatorname{Int}_M(\omega)
=
0.
\end{align*}
For each $i$, choose a compactly supported smooth $n$-form $\theta_i \in \Omega^n(M)$ with $\operatorname{supp}\theta_i \subset U_i$ and
\begin{align*}
\operatorname{Int}_M(\theta_i) = 1.
\end{align*}
By the compactly supported top-degree Poincare lemma on a coordinate ball (citing a result not yet in the wiki: Compactly Supported Top-Degree Poincare Lemma), the form
\begin{align*}
\omega_i - a_i\theta_i
\end{align*}
is exact on $M$, because it is supported in $U_i$ and has integral zero. Thus there exists $\eta_i \in \Omega^{n-1}(M)$ such that
\begin{align*}
\omega_i - a_i\theta_i = d\eta_i.
\end{align*}
Summing over $i$ gives
\begin{align*}
\omega
=
d\left(\sum_{i=1}^N \eta_i\right)
+
\sum_{i=1}^N a_i\theta_i.
\end{align*}
It remains to prove that the finite weighted sum $\sum_i a_i\theta_i$ is exact.
Because $M$ is connected and the sets $U_i$ may be chosen from a finite good cover with connected nerve, after reindexing there exists, for each $i \geq 2$, a chain of coordinate balls connecting $U_1$ to $U_i$ with consecutive overlaps nonempty. Along each overlap choose a smaller coordinate ball $V \subset U_j \cap U_k$ and a compactly supported $n$-form $\beta \in \Omega^n(M)$ with $\operatorname{supp}\beta \subset V$ and $\operatorname{Int}_M(\beta) = 1$. Applying the compactly supported top-degree Poincare lemma inside $U_j$ shows that $\theta_j-\beta$ is exact, and applying it inside $U_k$ shows that $\beta-\theta_k$ is exact. Hence $\theta_j-\theta_k$ is exact whenever $U_j$ and $U_k$ are adjacent in the chosen chain. By summing along the chain, $\theta_i-\theta_1$ is exact for every $i$.
Therefore, for each $i$, there exists $\zeta_i \in \Omega^{n-1}(M)$ such that
\begin{align*}
\theta_i-\theta_1 = d\zeta_i.
\end{align*}
Using $\sum_i a_i=0$, we compute
\begin{align*}
\sum_{i=1}^N a_i\theta_i
=
\sum_{i=1}^N a_i(\theta_1+d\zeta_i)
=
\left(\sum_{i=1}^N a_i\right)\theta_1
+
d\left(\sum_{i=1}^N a_i\zeta_i\right)
=
d\left(\sum_{i=1}^N a_i\zeta_i\right).
\end{align*}
Combining this with the previous decomposition yields
\begin{align*}
\omega
=
d\left(\sum_{i=1}^N \eta_i + \sum_{i=1}^N a_i\zeta_i\right).
\end{align*}
Thus $\omega$ is exact.
[/proof]
Now let $[\omega] \in H^n_{\mathrm{dR}}(M)$ satisfy $I([\omega])=0$. Then
\begin{align*}
\operatorname{Int}_M(\omega) = 0.
\end{align*}
By the claim, there exists $\eta \in \Omega^{n-1}(M)$ such that $\omega=d\eta$. Hence $[\omega]=0$ in $H^n_{\mathrm{dR}}(M)$, so $I$ is injective.
[/step]
[step:Conclude the integration map is an isomorphism]
The map
\begin{align*}
I: H^n_{\mathrm{dR}}(M) \longrightarrow \mathbb{R}
\end{align*}
is well-defined by Stokes' theorem, surjective by the compactly supported normalized form constructed in an oriented coordinate ball, and injective by the zero-integral exactness lemma. Therefore $I$ is an isomorphism of real vector spaces. Consequently,
\begin{align*}
H^n_{\mathrm{dR}}(M) \cong \mathbb{R}.
\end{align*}
This proves the theorem.
[/step]