I can't find any reference regarding homotopy invariance for compactly supported cohomology and I wonder under which conditions the homotopy invariance still holds for compactly supported cohomology.
In particular, if I have a deformation retraction $A \subset M$ with $M$ non compact, does the homotopy invariance hold?
Thank you for any help.
Max's answer shows that there is no homotopy invariance for compactly supported cohomology. As Mindlack's comment suggest, however, ordinary homotopy is not the correct notion to be considering in the present context. Rather one should use proper homotopy.
For the following statement and its proof see Iverson's book Cohomology of Sheaves Proposition 6.6 on page 180.
Iverson supplies definitions of proper homotopy if you have not encountered it before. A map $f:X\rightarrow Y$ between locally compact Hausdorff spaces is proper if and only if it is compact. That is, if for each compact $K\subseteq Y$, the inverse image $f^{-1}(K)$ is compact in $X$. A proper homotopy is a proper map $F:X\times I\rightarrow Y$, and all the standed terminology applies in this context.
As an example, if $m\neq n$, then $\mathbb{R}^m$ is not properly homotopy equivalent to $\mathbb{R}^n$. If you understand the above proposition, then you can show this by computing the compactly supported homologies $H^*_c(\mathbb{R}^m)$ and $H^*_c(\mathbb{R}^n)$.