About double points of an immersion If we have an immersion $f:M^n\to\mathbb{R}^{2n}$, where $M^n$ denotes a smooth $n$-manifold, then the double points of $f$ (that is, points $a\in\mathbb{R}^{2n}$ such that there exists $x\neq y$ in $M^n$ with $f(x)=f(y)=a$) form a discrete set or only of zero measure?
 A: I think the topologists sin curve lends itself to make an example where the set of double points is not discrete.
Let $f\colon (0,\infty)\to \mathbb R^2$ be defined by
$$
f(t) = \left\{\begin{array}{cc} (t,sin(1/t)) & t\in (0,1] \\
g(t) & t \in (1,2)\\
(t-2,0) & t\geqslant 2. 
\end{array}\right. 
$$
Here $g(t)$ is any curve such that $f$ becomes smooth, and such that $(0,0)$ becomes a double point. Then $(0,0)$ is not discrete among the double points.
This wouldn't work if we asked $f$ to be proper.
Edit:
I have given this some more thought and would like to address the concerns of Ted Shifrin in the comments. There is a way to get a more concrete $g$, as well as a fix to make the example work for $f$ proper. 
We start out by proving a lemma:

Let $f\colon \mathbb R\to \mathbb R^2$ be a continuous map which is
smooth on $\mathbb R\backslash \sqcup_{j=1}^k[a_j,b_j]$. Then for any $\epsilon,\
\epsilon'>0$ we can find a smooth map $f_\epsilon\colon \mathbb R\to \mathbb R^2$ such that for $x\in\mathbb R\backslash \sqcup_{j=1}^k[a_j-\epsilon',b_j+\epsilon']$, $f(x)=g(x)$, and for any $x\in\mathbb R$
we have $|f(x)-g(x)|\leqslant \epsilon$.

Proof: We will just prove this for $k=1$; clearly applying the same technique $k$ times will then prove the result for any $k$. We use the technique of the proof of [1, Theorem 2.2. p.44]. Since $f$ is continuous, there is for each $t\in \mathbb R$ an open neighborhood $U_t$ of $t$ such that for each $t'\in U_t$ we have $|f(t)-f(t')|\leqslant \epsilon$. On $U_t$ we consider the constant function $c_t(x)=f(t)$. Let $\mathscr U = \{U_i\}_{i\in I}$ be a finite subset of $\{U_t\}_{t\in \mathbb R}$ such that $\bigcup_{i\in I}U_i\supset [a,b]$. Shrinking the open sets containg $a$ and $b$ if necessary, we can assume
$$
[a,b]\subset\bigcup_i U_i\subset (a-\epsilon',b+\epsilon').
$$
Let $\{\lambda_i\}$ be a smooth partition of unity on $[a,b]$ subordinate to $\mathscr U$. By this we mean that $\mathrm{supp}\lambda_i\subset U_i$, that $0\leqslant \lambda_i(t)\leqslant 1$, and that $\sum_i\lambda_i(t)=1$ for $t\in [a,b]$. Consider the map $f_\epsilon:\mathbb R\to\mathbb R^2$ defined by
$$
f_\epsilon(t) = (1-\sum_i \lambda_i(t))\cdot f(t)+ \sum_i\lambda_i(t)\cdot c_i(t).
$$
Then $f_\epsilon$ is smooth, equal to $f$ outside of $\bigcup_i U_i$, and satisfies for all $t\in\mathbb R$:
\begin{align*}
|f(t)-f_\epsilon(t)| &= |f(t)-(1-\sum_i\lambda_i(t))\cdot f(t)+\sum_i\lambda_ic_i(t)|\\ 
&= |f(t)-f(t)-\sum_i\lambda_i(t)(f(t)-c_i(t))| \\
&< \sum_i \lambda_i\cdot \epsilon\leqslant \epsilon 
\end{align*}
This proves the lemma.
Using this, we can redefine $f(t)$ as follows. First we just draw the straight line from $(1,sin(1))$ through the origin, down to $(-1,-sin(1)$. Then we go up to the $x$-axis. Then for $t\geqslant 2$ we use $t\mapsto (t-3,0)$. We then smooth out the three non-smooth points of $f$ using the above lemma.
We can also get a proper $f$. I tried to use $\left(t,\exp\left(-\frac{1}{t^2}\right)\cdot \sin(1/t)\right)$ instead of $sin(1/t)$, but then the selfintersection at the origin is not transverse.
[1] Hirsch, Morris W., Differential topology, Graduate Texts in Mathematics. 33. New York - Heidelberg - Berlin: Springer-Verlag. (1976). ZBL0356.57001.
