How to construct an algebraic curve passing through a point with a given tangent vector? Let $X$ be a variety over $k$, $x$ be a closed point on $X$ with residue field $k$, and $v: Spec(k[\epsilon]) \to X$ be a tangent vector of $X$ at $x$, where $k[\epsilon]$ is the dual number algebra. 
Then how to find an affine smooth curve $C$ with a point $p$ on it, and a morphism $ \gamma :C\to X$, a tangent vector $u: Spec(k[\epsilon])\to C$, such that


*

*$u(0)=p$, $\gamma(p)=x$

*$v$ factors through u.


Thank you very much!
 A: This is not always possible. For example let $X = Spec (k[x,y]/xy)$ and consider the morphism $Spec k[\epsilon] \to X$ corresponding to the morphism $k[x,y]/xy \to k[\epsilon]$ which takes both $x$ and $y$ to $\epsilon$. 
A: If $X$ is smooth, then this is possible. If $m$ is the maximal ideal of the local ring at $x$, then we know that $m/m^2 = k^n$, where $n$ is the dimension. Choose $n-1$ linearly independent vectors in the kernel of the natural map to $k$. Let $f_1,...,f_{n-1}$ be lifts of those vectors to the cooardinate ring of some affine neighborhood of $x$.
Then the vanishing set of $(f_1,...,f_{n-1})$ in that neighborhood is a curve smooth at $x$. This is clear because the completion of its local ring at $x$ is $k[[t]]$, which is the local ring of a smooth point on a curve. This curve may have singular points elsewhere, but if we remove those it will still be an affine curve. Alternately one could resolve those singularities, which will make $\gamma$ not an inclusion.
It is obvious that this curve satisfies the requirements of the question.
