Solution (source code)

= Solution

At a smooth point of an irreducible curve, the local ring $\mathcal O_{X,p}$ is a <discrete valuation ring>. A <local parameter> is an element $t$ generating its maximal ideal; its order at $p$ is one. Embed the projective target as a closed subvariety of $\mathbb P^N$. Write the <rational map> generically as $[f_0:\cdots:f_N]$ with $f_i\in K(X)$, and let $m$ be the smallest finite <valuation> of the nonzero coordinates at $p$. Multiplying by $t^{-m}$ makes every coordinate regular at $p$ and at least one a unit. These functions are regular on some common neighborhood of $p$ and have no common zero after shrinking, so define a <morphism> to $\mathbb P^N$. The defining homogeneous equations of the target vanish generically and hence identically on this neighborhood. Thus \b[the <rational map> extends to the projective target at $p$].

For a nonprojective target, $x\mapsto1/x$ from $\mathbb A^1$ rationally to $\mathbb A^1$ cannot extend at zero: a regular extension would give $x f(x)=1$ there, impossible. In dimension two the <morphism> $(x,y)\mapsto[x:y]$ on $\mathbb C^2\setminus\{0\}$ cannot extend to zero, because its constant values along the two punctured coordinate axes are different. This shows why both projectivity of the target and smooth one-dimensional source were used.