Prove that the $n$-th de Rham Cohomology group $H^n(\mathbb R^n)$ is trivial I am trying to prove the following statement:

Every $n$-form in $\mathbb R^n$ is exact.

For do so, consider first a smooth $(n-1)$-form:
$$\eta=\sum_{\mu=1}^ng_\mu\, dx^1\wedge \ldots\wedge dx^{\mu-1}\wedge dx^{\mu+1}\wedge \ldots\wedge dx^n.$$
It is easy to show that:
$$d\eta = \sum_{\mu=1}^n(-1)^{\mu+1}\frac{\partial g_\mu}{\partial x^\mu}\, dx^1\wedge \ldots \wedge dx^n.$$
Now, given an $n$-form $\omega=f\, dx^1\wedge \ldots \wedge dx^n$ I only need to find $g_1,\ldots, g_n$ such that:
$$f=\sum_{\mu=1}^n(-1)^{\mu+1}\frac{\partial g_\mu}{\partial x^\mu}$$
I suspect that It can be done just using the Hadamard's Lemma but I am not able to find a way to do it.
Any help?
 A: It's a corollary of the following result:

Let $M$ be a differentiable manifold and let $\pi:M\times\mathbb R\to M$ be the projection $(p,t)\mapsto p$.
If $\sigma:M\to M\times\mathbb R$ is the section $p\mapsto (p,0)$, then $\forall q\in\mathbb N$, $\pi^*:H^q(M)\to H^q(M\times\mathbb R)$ is an isomorphism of vector spaces and its inverse is $\sigma^*:H^q(M\times\mathbb R)\to H^q(M)$.

At this point, since $H^q(\mathbb R)\cong\begin{cases}\mathbb R&q=0\\\{0\}&q\ge 1 \end{cases}$, it follows that $H^q(\mathbb R^n)\cong\begin{cases}\mathbb R&q=0\\\{0\}&q\ge 1 \end{cases}$.
The de Rham complex of $\mathbb R$ is $0\overset{d}{\to}\Omega^0(\mathbb R)\overset{d}{\to}\Omega^1(\mathbb R)\overset{d}{\to}0$, so we only have to compute $H^0(\mathbb R)$ and $H^1(\mathbb R).$ The $0$-closed forms in $\mathbb R$ are functions $f\in\mathcal C^{\infty}(\mathbb R)$ locally constant, but $\mathbb R$ is connected so the zero closed forms are constant smooth maps. This implies that $Z^0(\mathbb R)\cong\mathbb R$ and the cohomology space is $H^0(\mathbb R)=\frac{Z^0(\mathbb R)}{B^0(\mathbb R)}=\frac{Z^0(\mathbb R)}{\{0\}}\cong \mathbb R$.
Every $1$-form is closed because $Z^1(\mathbb R)=\ker 0=\Omega^1(\mathbb R)$. If $\Omega^1(\mathbb R)\ni\omega:=f(x)dx$ is exact, it means that $\exists F\in\Omega^0(\mathbb R)$ such that $dF=\omega$, so it is sufficient to define $F(x):=\int_0^xf(t)dt$ in order to have $dF=\omega$. We have proved that every closed $1$-form is exact, then $H^1(\mathbb R)\cong\{0\}$.
