This is a problem from Guillemin's Differential Topology:
Suppose that $f_0, f_1: X \to Y$ are homotopic maps and that the compact boundaryless manifold $X$ has dimension $k$. Prove that for all closed $k$-forms $\omega$ on $Y$, $$ \int_X f_0^*\omega = \int_X f_1^*\omega.$$
There is a hint to use a result from a previous exercise, which says that if $f:\partial W \to Y$ is a smooth map that extends to all of $W$ and $\omega$ is a closed $k$-form on $Y$, with $k = \dim \partial W$, then
$$\int_{\partial W} f^*\omega = 0.$$
It seems to me this should be a straightforward exercise, but I can't get it done. Any hints?
Now let $F: X \times I \to Y$ be an homotopy between $f_0$ and $f$. Since $X\times I$ is a boundary manifold, with boundary given by $X\times \{ 0 \} \cup X \times \{ 1 \}$, where $\{ 0\}$ has orientation $-1$ and the orientation of $\{ 1 \}$ is $+1$, then $$ \int_{\partial(X \times I)} F^* \omega = \int_{ X \times \{ 1 \}} F^*\omega - \int_{ X \times \{ 0 \}} F^*\omega = \int_{X} f_1^* \omega -\int_{X} f_0^* \omega $$ However by (1), it follows that $\int_{\partial(X \times I)} F^* \omega=0$, hence the claim follows.