TITLE: Two different analytic curves cannot intersect in infinitely many points
QUESTION [6 upvotes]: A curve in Euclidean space $\mathbb{R}^n$, $n \geq 2$ is $analytic$ if the coordinates of its points $x= x_{1},...,x_{n}$ can be expressed as analytic functions of a real parameter $x_{i}=x_{i}(t)$, $i=1,...,n$ and $\alpha \leq t \leq \beta$ and the derivatives $x'(t_{0})$ do not simultaneously vanish for any $t_{0} \in [\alpha, \beta]$.
I search for a proof of the following fact:
If the set of intersection points of two analytic curves is infinite, then these curves coincide.
Can we prove the same as above if we relax the condition that the coordinates are analytic to the condition that the coordinates belong to the class $C^{\infty}$?
Edit: Thanks to below remark by Ramiro, to obtain the above implication, we have to assume that any two curves $K_{1}, K_{2}$ as in the question are such that $K_{1} \cap K_{2}$ is not another analytic curve.
2nd edit: As suggested Peter, we can reformulate our question as follows:
   Consider two immersed curves which are parameterized real analytically on compact intervals. If they have an infinite number of different intersection points, then their union is again a real analytic immersed curve.

REPLY [5 votes]: Let $f\colon [0,1]\to \mathbf R^n$ and $g\colon[0,1]\to\mathbf R^n$ parametrize your curves. The set $C$ of $t\in[0,1]$ such that there exists $s\in[0,1]$ with $f(t)=g(s)$ is a closed subset of $[0,1]$. More importantly, it is definable in the sense of model theory in the language — called $\mathbf R_{\text{an}}$ — consisting of polynomial functions and so called restricted analytic functions, namely analytic functions defined over compact subsets of $\mathbf R^m$.
It is an important theorem (Gabrielov; Denef and van den Dries) that $\mathbf R_{\text{an}}$ is $o$-minimal. This means that definable subsets of the real line are finite unions of intervals. 
From there, one should be able to analyse the situation further when the coincidence set is infinite. I would conjecture that it can only be the union of one or two intervals. Ramiro gave an example with one interval, though more complicated examples are possible, e.g., of the form $s\mapsto F(u(s))$, $s\mapsto F(v(s))$, where $u,v\colon[0,1]\to\mathbf R$ are analytic and $F\colon\mathbf R\to\mathbf R^n$ is a fixed curve.  In particular, the set is a union of two intervals if $F$ is a parameterization of a circle and $u$ and $v$ are suitably chosen so as to draw two arcs which overlap twice.