Is there an inverse of the Stokes' Theorem for manifolds with boundary? I would like to consider this question When does a null integral implies that a form is exact? (also related to Top deRham cohomology group of a compact orientable manifold is 1-dimensional), but for manifolds with boundaries.
1. Stokes' theorem for a manifold without boundary
Let $M$ be an oriented n-manifold with no boundary and let $\omega\in\Omega^n_c(M)$.
If $\omega=\mathrm{d}\eta\ $ for some $\eta\in\Omega^{n-1}_c(M)\quad\Longrightarrow\quad\displaystyle\int_M\omega=0$
2. "Inverse" of Stokes' theorem without boundary
Let $M$ be an oriented and connected n-manifold with no boundary and let $\omega\in\Omega^n_c(M)$.
If $\displaystyle \int_M\omega=0 \quad\Longrightarrow\quad\exists\eta\in\Omega^{n-1}_c(M) \ /\ \omega=\mathrm{d}\eta$
This is a direct consequence of the isomorphism $[\omega]\in H^n_c(M)\mapsto\int_M\omega\in\mathbb{R}$, given by the De Rham theorem for top-graded forms.
3. The Stokes' theorem with boundaries
Let $M$ be an oriented n-manifold with boundary $\partial M\overset{\imath}{\hookrightarrow} M$ (with the induced orientation) and let $\omega\in\Omega^n_c(M)$
If $\omega=\mathrm{d}\eta\ $ for some $\eta\in\Omega^{n-1}_c(M)\quad\Longrightarrow\quad\displaystyle\int_M\omega=\int_{\partial M}\imath^*\eta$
4. "Inverse" of Stokes' theorem with boundary?
Let $M$ be an oriented and connected n-manifold with boundary $\partial M\overset{\imath}{\hookrightarrow} M$ and let $\omega\in\Omega^n_c(M)$ and $\alpha\in\Omega^{n-1}_c(\partial M)$.
If $\displaystyle \int_M\omega=\int_{\partial M}\alpha\quad\Longrightarrow\quad\begin{array}{l}\exists\eta\in\Omega^{n-1}_c(M)\\\exists\gamma\in\Omega^{n-2}_c(\partial M)\end{array} \ /\ \begin{array}{l}\omega=\mathrm{d}\eta\\\alpha=\imath^*\eta+\mathrm{d}\gamma\end{array}$
My question is what additional hypotheses are required? Notice that once we prove that $\omega$ is exact, then the existence of $\gamma$ is a consequence of Stokes' theorem over $\partial M$ (which has no boundary).
Notice also that if $\omega$ is non-exact, then we can always find $\alpha$ (by de Rham's theorem) such that
$$\int_{\partial M}\alpha=\int_M\omega\in\mathbb{R}$$
so this question is actually equivalent to prove that $H_c^n(M)=0$ if $M$ has boundary.
 A: No additional assumptions are needed.  In fact, you need fewer assumptions: of $\omega$ is any $n$-form with compact support on a connected oriented smooth $n$-manifold $M$ with nonempty boundary, then $\omega=d\eta$ for some $(n-1)$-form $\eta$ with compact support.  To prove this, consider the "double" $N$ of $M$ obtained by gluing together two copies of $M$ along $\partial M$ (giving the second copy the opposite orientation).  We can extend $\omega$ to an $n$-form on $N$ whose integral is $0$ (just first extend along a collar neighborhood of the boundary, and then add some $n$-form supported inside the second copy of $M$ to cancel out the integral).  Since $\partial M$ is nonempty, $N$ is connected, so by the converse of Stokes' theorem for manifolds without boundary, the extension of $\omega$ can be written as $d\eta$ for some $\eta$ on $N$ with compact support.  Since $M$ is closed in $N$, $\eta$ still has compact support when restricted to $M$.
(The orientability assumption can also be dropped; if $M$ is not orientable, then $N$ is not either, and then $H_c^n(N)$ is automatically trivial by Poincaré duality for nonorientable manifolds.)
