I just realized that I never really understood why $H_{dR}^n(M, \mathbb{R}) = \mathbb{R}$ if $M$ is compact and $H_{dR}^n(M, \mathbb{R}) = \{0\}$ if $M$ is not compact (provided that's true?).
I'm assuming here (in both cases) that $M$ is a connected orientable smooth $n$-manifold (without boundary).
Is there an elementary way to explain this?
By "elementary", I mean for instance that I'm okay with accepting "technical lemmas" such as : A compactly supported $n$-form $\alpha \in \Omega(\mathbb{R}^n)$ is exact iff $\int_{\mathbb{R}^n} \alpha = 0$ but I don't want to hear of singular homology, say.