Integral in manifolds problem Let $M$ be a orientable $n$ dimensional manifold. I'm trying to solve the following assertions:


*

*Given a connected system of coordinates $(U,x_1,\cdots, x_n)$, prove that there exists a $n$-form $\omega$ supported in $U$ such that $\int_M \omega > 0$.


*Prove that if $M$ is compact $\omega$ is exact.  Why do we need the compactness of $M$?

My attempt:
For the first one, we can find a bump function $\lambda: M \to \mathbb R$ that is smooth and is supported in $U$ with $0 \leq \lambda \leq 1$. Define, then, $\omega = \lambda \,dx_1 \wedge \dots dx_n$. Then,
$$\int_M \omega = \int_U \lambda \, dx_1\dots dx_n > 0,$$
since $\lambda > 0$ in some open subset of $U$.
In this argument, I'm not sure where I used that $U$ is connected. And I don't know how to approach the next question; I was thinking of using Stokes theorem, but how?
 A: *

*Since $M$ is oriented, every chart gives origin to the same orientation on the basis of $T_pM$. Since $U$ is connected, the orientation is the same for every point $p$. We may assume, without loss of generality, that the basis are positively oriented. We may now define the $n$-form $\nu= dx_1\wedge\dots\wedge dx_n$. For every chart in the atlas defined on $U$, thanks to the previous reasoning, we have $\omega(e_1,\dots,e_n)>0$. Multiplying $\omega$ by a suitable bump function $\lambda$, we have $\int_M \lambda\nu>0$

*The statement is false in general : given an $n$-form defined on a compact manifold without boundary (i.e. closed), if $\omega=d\zeta$ we would have 
$$\int_M \omega=\int_{\partial M}\zeta=0$$ From our requirement $\int_M \omega>0$ it follows that our $\omega$ is not exact. 
We can, however, take the negation of the question, and ask ourselves if this is true. It actually is if we restrict ourselves to manifolds without boundary. 
For this result, the compactness requirement is fundamental: $\mathbb{R}^2$ is not compact, and we have $\xi:=dx\wedge dy$ and $\int_{\mathbb{R}^2}\xi=+\infty>0$.
Similarly, the requirement that the boundary is empty is fundamental: $dx$ on $[0,1]$ is exact, and $\int_{[0,1]}dx=1>0$
Note: we may ask ourselves even if the requirement $\int_M\omega=0$ is a necessary and sufficient condition for $\omega$ to be exact. An answer to this question is given here
