If $\int_M \omega=0\Rightarrow \omega=d\varphi$, then $H^n_c(M)\simeq\mathbb{R}$? ($M$ is a connected orientable manifold) I'm reading a book in wich the author uses this argumet the whole time. For example, he assumes that $\int_\mathbb{R}\omega=0$ then $\omega =df$ and then he concludes that that $H^n_c(\mathbb{R})\simeq \mathbb{R}$. Why?
 A: Consider the map $ u : H^n_c(M) \to \mathbb{R}$ defined setting
$$u: \  [ \omega ] \mapsto  \int_{M} \omega  \ .$$
This is well defined because of Stokes theorem, and is injective because of your assumption. So (under your assumption) either $H^n_c(M)=0$ or $\mathbb{R}$. On the other hand $H^n_c(M)\not=0$ since $u$ is non-zero (working in local coordinates, you can always find a form with compact support and non-zero integral).  
A: (1) If $\omega =fdx$, then define $g(t):=\int_{-\infty}^t\omega$
Then $ g'(t)=f(t)$ so that $dg=\omega$
(2) $H^1_c({\bf R})={\bf R}$ : If $\omega$ is $1$-form on compact
support on ${\bf R}$, then $d\omega =0$ And let $\int_{\bf R}\omega
=C$ 
If $\omega'$ is another form of compact support with $\int_{\bf R} \omega'=C$, then $$  \int_{\bf R} \omega -\omega'= 0$$ Hence by $(1)$ we have $$ \omega -\omega'=df $$
Since $\omega,\ \omega'$ have compact supports, so do $df$ That is $[\omega]=[\omega']$
To complete the proof, we define $$ \int : H^1_c({\bf R})\rightarrow {\bf R},\  [\omega]\mapsto \int_{\bf R} \omega $$
This is welldefined since $\int_{\bf R} \omega +df=\int_{\bf R} \omega$ And if $\alpha $ is bump $1$-form, i.e., $\int \alpha =1$, compact support is a connected component and $\alpha =gdx \Rightarrow g$ has positive in interior of support, then $\int_{\bf R} C\alpha =C$ Hence it is onto. 
