show that $\omega$ is exact if and only if the integral of $\omega$ over every $p$-cycle is $0$ Let $M$ be an oriented smooth manifold and $\omega$ a closed $p$-form on $M$. Show that $\omega$ is exact if and only if the integral of $\omega$ over every $p$-cycle is $0$. 
In particular, how to prove that if the integral of $\omega$ over every $p$-cycle is $0$, then  $\omega$ is exact?
 A: Here's my attempt at this:
We'll say "$\omega$ kills boundaries" to mean $$\int_{\partial N} \omega = 0\quad\text{for all $N$,}$$ which in turn means this: for all compact $(p+1)$-manifolds-with-boundary $N$ and all $f \in C^\infty(N,M)$, we have $$\int_{\partial N} f^*\omega = 0.$$
Similarly, "$\omega$ kills cycles" means that for all closed ($=$ compact, boundaryless) $p$-manifolds $N$ and all $f \in C^\infty(N,M)$, we have $$\int_N f^*\omega = 0.$$
We want to show that $\omega$ is closed iff $\omega$ kills boundaries, and $\omega$ is exact iff $\omega$ kills cycles.

Claim 1. If $\omega$ is closed, then $\omega$ kills boundaries. If $\omega$ is exact, then $\omega$ kills cycles.
Proof. Stokes' Theorem.

Claim 2. If $\omega$ kills boundaries, then $\omega$ is closed.
Proof. Suppose $d\omega \neq 0$. Then $(d\omega)_q \neq 0$ for some $q \in M$. By continuity, there is a neighborhood $U$ of $x$ in which $d\omega$ is nowhere $0$. It should now be pretty easy to find an embedded $(p+1)$-disk in $U$ such that $$\int_{D^{p+1}} d\omega \neq 0,\quad\text{which implies that}\quad\int_{S^p} \omega \neq 0,$$ so we've found a boundary not killed by $\omega$.
Edit: More explicitly, choose local coordinates centered at $q$ and write $$d\omega = \sum_{i_1 < \cdots < i_{p+1}} f_{i_1\cdots i_{p+1}}\,dx_{i_1} \wedge \cdots \wedge dx_{i_{p+1}}.$$ By rearranging indices, we may assume that $f_{1,2,\ldots,p,p+1}(0) > 0$. Then the integral of $d\omega$ on the $(p+1)$-disk $$\{x_1^2 + \cdots x_{p+1}^2 \leq \varepsilon,\,x_{p+2} = \cdots = x_n = 0 \}$$ will be positive for $\varepsilon$ sufficiently small.

Claim 3. If $\omega$ kills cycles, then $\omega$ is exact.
Proof. (Key ingredient: de Rham's Theorem.) If $\omega$ kills cycles, then certainly $\omega$ kills boundaries, so $\omega$ is closed by Claim 2, hence $[\omega] \in H^p_{dR}(M)$. Now, Stokes' Theorem implies that $$\varphi: H^p_{dR}(M) \to \operatorname{Hom}(H_k(M), \mathbf R): [\omega] \mapsto \left( [\sigma] \mapsto \int_\sigma \omega \right)$$ is well-defined. Saying that $\omega$ kills cycles is the same as saying that $\varphi([\omega]) = 0$. But de Rham's Theorem says that $\varphi$ is an isomorphism. Thus, $[\omega] = 0$, i.e., $\omega$ is exact.
