Triviality of the cohomology group of compact connected manifolds Let $M$ be a compact connected $n$-manifold with non-empty boundary $\partial M$. Is its $n$-th cohomology group $H^n(M)$ always  trivial?
I can prove it if the manifold is orientable as follows: by Lefschetz duality, $H^n(M)=H_0(M,\partial M)=0.$
What about non-orientable manifolds?
Thank you in advance.
 A: $M$ and $M \setminus \partial M$ have the same homology since by existence of a collar neighborhood of the boundary, $M \setminus \partial M$ deformation retracts to a properly embedded copy of $M$ inside $M$. Therefore, let us reassign $M$ to be the noncompact manifold $M \setminus \partial M$ from here on.
By compactly supported Poincare duality with twisted coefficients, $H_n(M; \Bbb Z) \cong H^0_c(M; \Bbb Z_w)$ where $\Bbb Z_w$ is the orientation sheaf on $M$. I do not know a reference for an elementary derivation, but this follows from, for example, Verdier duality. Since $M$ is noncompact, $H^0_c(M; \Bbb Z_w) = 0$.
EDIT: It is also true that $H^n(M; \Bbb Z) = 0$ for a noncompact $n$-manifold $M$. There is a dual version of Poincare duality with twisted coefficients, which says $H^n(M; \Bbb Z_w) \cong H_0^{lf}(M; \Bbb Z)$ where $H_*^{lf}$ is locally-finite homology; this also follows from Verdier duality. Since $M$ is noncompact, any $0$-chain (finitely many points) is a boundary of the locally finite $1$-chains given by a collection of disjoint proper PL-rays to infinity in $M$ starting at these points.
Unfortunately, the twisting of the coefficients is in the cohomology side this time, so it's not immediately clear why $H^n(M; \Bbb Z) = 0$ for $M$ nonorientable. Nevertheless, this proves $H^n(M; \Bbb Z) = 0$ for orientable noncompact $n$-manifold $M$. For nonorientable $M$, consider the cohomology transfer sequence
$$\cdots \to H^n(M; \Bbb Z_w) \to H^n(\widetilde{M}; \Bbb Z) \to H^n(M; \Bbb Z) \to H^{n+1}(M; \Bbb Z_w) \to \cdots$$
Where $\widetilde{M}$ is the orientation cover of $M$. We know $H^n(\widetilde{M}; \Bbb Z) = 0$ by orientability and $H^{n+1}(M; \Bbb Z_w) = 0$ as $M$ is $n$-dimensional. This forces $H^n(M; \Bbb Z) = 0$.
A: Here's the answer I alluded to in the comments (which assumes you know how compute $H^{\dim M}(M)$ for a closed manifold $M$).  We define $N = M\coprod M/\sim$ where $\sim$ identifies the boundary of each copy of $M$ via the identity map. Since $\partial M$ has a collar, $N$ is a closed manifold, called the double of $M$.  Note that $N$ is non-orientable because it contains the non-orientable manifold $M\setminus \partial M$ as an open subset.
Set $n =\dim M = \dim N$ and consider the Mayer-Vietoris cohomology sequence for $N$ from the decomposition into copies of $M$.  A portion of it looks like:
$$...\rightarrow H^n(N)\rightarrow H^n(M)\oplus H^n(M)\rightarrow H^n(\partial M)\rightarrow ...$$
Now, $H^n(\partial M) = 0$ since $\partial M$ has dimension $n-1 < n$, so we see that $H^n(N)$ must surject onto $H^n(M)\oplus H^n(M)$.  Since $N$ is non-orientable,  $H^n(N)\cong \mathbb{Z}/2\mathbb{Z}$.
Thus, we have a surjection $\mathbb{Z}/2\mathbb{Z}\rightarrow H^n(M)\oplus H^n(M)$.  This obviously implies $H^n(M) = 0$, as claimed.
