TITLE: Does an injective map stay injective under small smooth perturbations?
QUESTION [5 upvotes]: Let $M,N$ be smooth two-dimensional connected, oriented, compact Riemannian manifolds with boundaries, and let $f:M \to N$ be smooth and injective.

Let $f_t:M \to N$ be a smooth variation of $f$. Is $f_t$ injective for sufficiently small $t$?

If that matters, I am fine with assuming that $\det(df)>0$ and $f(\partial M) \subseteq \partial N$. (although I am not sure if it's needed.)
Here is a naive attempt: Suppose that this is not so; then we have $t_n \to 0$, $x_n \neq y_n 
\in M$ such that $f_{t_n}(x_n)=f_{t_n}(y_n)$. Since $M$ is compact we have $x_n \to x,y_n \to y$ (modulue subsequences). Thus $f(x)=f(y)$. Since $f$ is injective, this forces $x=y$.
So, $x_n \neq y_n, x_n,y_n \to x$ and $f_{t_n}(x_n)=f_{t_n}(y_n)$. Now, if $x \in N^o$, then $f(x) \in M^o$ (since $df_x$ is non-singular), so by the inverse function theorem, applied to $f_t|_{M^o}:M^o \to N^o$ at $x$, $f_t$ is injective in a neighbourhood of $x$. This might be contradictory with $x_n,y_n \to x$, if we can quantify the size of the neighbourhood where the IFT gives us injectivity, independently of $t$ for small $t$. (see e.g. here). A similar argument should work when $x \in \partial M$.

Can this approach work? Are there other approaches? Or is there a counter-example?

REPLY [2 votes]: I will say the requirement that $f$ an immersion cant be dropped. Consider the function, $$f(x)=(x^{2},x^{3}).$$ We can consider this as a function from $[-k,k]$ to $\mathbb{R}^{2}$, and it's injective. Now consider the smooth map
$$F(x,t)=(x^{2}-t,(x^{2}-t)x)$$
$F(x,0)=f$, but F(x,t) for t>0 is not injective.