Top de Rham cohomology group for noncompact manifolds with boundary Suppose that $M$ is a smooth, connected, oriented $m$-manifold with (empty or nonempty) boundary. I am aware that top de Rham cohomology group $H^m_{\mathrm{dR}}(M;\mathbb{R})$ is trivial for noncompact manifolds with empty boundary (cf. Lee: "Introduction to Smooth Manifolds", theorem 17.32) and compact manifolds with nonempty boundary (cf. Weintraub: "Differential Forms", theorem 8.3.10 (b)). Also, $H^m_{\mathrm{dR}}(M;\mathbb{R}) \cong \mathbb{R}$ for compact manifolds with with empty boundary (cf. Lee: "Introduction to Smooth Manifolds", theorem 17.31, and Weintraub: "Differential Forms", theorem 8.3.10 (a)).
*Side note: top compactly supported de Rham cohomology group is trivial for noncompact manifolds with nonempty boundary (cf. Weintraub: "Differential Forms", theorem 8.4.8 (b)) and $H^m_{c-\mathrm{dR}}(M;\mathbb{R}) \cong \mathbb{R}$ for noncompact manifolds with empty boundary (cf. Weintraub: "Differential Forms", theorem 8.4.8 (a)).
This leaves us with one remaining case: what is the top de Rham cohomology group for noncompact manifolds with nonempty boundary?
 A: If $M$ is any smooth manifold with boundary $\partial M$, then $M$ and $M\setminus\partial M$ are homotopy-equivalent and $M\setminus\partial M$ is a smooth manifold of the same dimension without boundary. This fact follows from the existence of what is known as collar neighborhoods, and is discussed in chapter 9 of Lee's book. Now, if $\partial M\neq\emptyset$, then $M\setminus\partial M$ is always non-compact (no additional assumption on $M$). Indeed, it is an open subset of $M$, but if it were compact, it would also be closed. Looking at a coordinate patch around any boundary point (here, non-emptiness is used), this yields an immediate contradiction. Since de Rham cohomology is a homotopy invariant and the top de Rham cohomology of a non-compact manifold without boundary vanishes, these observations imply that the top de Rham cohomology of any manifold with boundary vanishes. I stress that this argument works simultaneously for compact and non-compact manifolds with non-empty boundary.
