3 of 3 added a tag to reach a wider audience.

Is a $C^1$ immersion that is injective on a closed set $K$ injective on a neighborhood of $K$?

I'm doing problem 7 of section 2.1 on "Differential topology" written by Hirsch which goes as \begin{array}{l}{\text { 7. A } C^{1} \text { immersion } f : M \rightarrow N \text { which is injective on a closed subset } K \subset M \text { is injective }} \\ {\text { on a neighborhood of } K . \text { In fact } f \text { has a neighborhood } \mathscr{N} \subset C_{S}^{1}(M, N) \text { and } K \text { has a }} \\ {\text { neighborhood } U \subset M \text { such that every } g \in \mathscr{N} \text { is injective on } U . \text { If } K \text { is compact } \mathcal{N}} \\ {\text { can be taken in } C_{W}^{1}(M, N) .}\end{array} I have no problem about the compact case, but I think the conclusion does not hold when $K$ is not compact for the following counterexample that I cook up.

Consider the figure "8" $\beta :(-\pi, \pi) \rightarrow \mathbb{R}^{2}, \text { with } \beta(t)=(\sin t, \sin 2t)$ and $n(t)$ be its normal $n(t)=(-2\cos2t,\cos t)$. We define $f:(-\pi, \pi)\times(-1,1)\to\mathbb{R}^{2}$ $f(t,s)=\beta(t)+sn(t)$. Then $f$ is $C^1$ immersion which is injective on a closed subset $K=(-\pi,\pi)\times\{0\}$ but $f$ cannot be injective on a neighborhood of $K$ since $f$ is not injective on $K\cup B_\delta(0)$ for any $\delta>0$.

Does this disprove the problem on the book?