Differential form is closed if the integral over a curve is rational number.

The following problem comes from do Carmo's book Differential Forms and Applications, Chapter 2, Exercise 4:

Let $\omega$ be a differentiable 1-from defined on an open subset $U\subset \mathbb{R}^n$. Assume that for each closed differential curve $C$ in $C$, $\int_C \omega$ is a rational number. Prove that $\omega$ is closed.

Can anyone give some hints? My idea was that we could try to show the integral vanishes if the curve lies in $N_\epsilon (p)$ (i.e. a small neighborhood around $p$) for any $p$ in $U$ and use the Poincare Lemma, but failed.


When a closed curve is deformed continuously with a parameter, the integral varies continuously with the parameter as well.


Can not make comment( Not allowed) so writing an answer.. I am not sure.. but please have it and tell me if you found mistake or confusion:

When take a continuous deformation of $C\subset U$, we will have continuous change in the integration: Hence integral will be constant rational number in each connected component of $U$.

Now without loss of generality assume that $U$ is connected and integral is $0$. Hence we have $\int_C\omega = 0$ which gives that $\omega $ is exact, Hence closed. This shows that $\omega $ is locally exact. Hence closed...