Show a function is not regular on a variety Let $V$ be the variety defined by the polynomial $x_1^2 + x_1^3 -x_2^2$ over an arbitrary field $F$, and consider the function $\phi = \frac{x_2}{x_1}$.
I want to show that this function is not regular on $V$, where the definition of regularity we use is that a regular function is the restriction of polynomial functions to the variety.
However, I think it is almost immediately obvious, since $\phi$ is singular at the point $(0,0)$, so there can't be some polynomial function which restricts to $\phi$ (although there might be a rational function?). I am not sure if I am understanding fully what it means for $\phi$ to be regular, since in this case it seems almost trivial.
I had also thought that maybe $\phi: V \to \mathbb{A}^1$ would be a morphism of varieties (assuming it were regular), and then attempting to draw a contradiction since there wouldn't be a corresponding morphism $K[\phi(V)] \to K[V]$. On the other hand this feels pretty abstract to me, so something solid and grounding would be appreciated as an answer to this question.
 A: Your idea to think about a regular function as a map to $\Bbb A^1$ is good - we just need one more piece to finish the argument. If we have a morphism of varieties $f:X\to Y$, then every regular function $\phi$ on $Y$ pulls back to a regular function $f^*\phi$ on $X$ by precomposing with $f$: that is, $(f^*\phi)(x) = \phi(f(x))$. In particular, if $\phi$ is a regular function on $Y$, then $(f^*\phi)(p_1)=(f^*\phi)(p_2)$ if $p_1,p_2$ are points in $X$ with $f(p_1)=f(p_2)$.
In the case that $\operatorname{char} F\neq 2$, this is enough to finish the problem: the pullback of $\frac{x_2}{x_1}$ along the map $\Bbb A^1\to V$ by $t\mapsto (t^2-1,t^3-t)$ gives the regular function $t$, which takes value $1$ at $t=1$ and value $-1$ at $t=-1$, but both $t=1$ and $t=-1$ map to $(0,0)\in V$, which contradicts the fact that the pullback is supposed to be constant on the fibers.
If you want a fully algebraic proof which does not depend on the field characteristic, we can still use the same morphism, but we finish differently. Consider the morphism $\Bbb A^1\to V$ by $t\mapsto (t^2-1,t^3-t)$. If $\frac{x_2}{x_1}$ were regular, we would get a composite morphism $\Bbb A^1\to V\to \Bbb A^1$ sending $t\mapsto t$, or equivalently, a morphism of coordinate algebras $F[t]\to F[x_1,x_2]/(x_1^2+x_1^3-x_2^2)\to F[t]$ sending $t$ to $t$. But $t$ is not in the image of $\pi:F[x_1,x_2]/(x_1^2+x_1^3-x_2^2)\to F[t]$ by $x_1\mapsto t^2-1, x_2\mapsto t^3-t$.
To show that $t$ is not in the image, we can write an arbitrary element of $F[x_1,x_2]/(x_1^2+x_1^3-x_2^2)$ as $p(x_2)+q(x_2)x_1+r(x_2)x_1^2$, where $p,q,r$ are single-variable polynomials of degrees $a,b,c$ respectively, by repeatedly rewriting $x_1^3$ as $x_2^2-x_1^2$. If they're nonzero, then by applying $\pi$ to each of these, we see that $\pi(p(x_2))=p(t^3-t)=t^{3a}+\cdots$, $\pi(q(x_2)x_1)=t^{3b+2}+\cdots$, and $\pi(r(x_2)x_1^2)=t^{3c+4}+\cdots$  and so there cannot be any cancellation between the highest-degree terms of $\pi(p(x_2))$, $\pi(q(x_2)x_1)$, or $\pi(r(x_2)x_1^2)$. Thus the highest-degree term of $\pi(p(x_2)+q(x_2)x_1+r(x_2)x_1^2)$ must come from the highest degree term of $\pi(p(x_2))$, $\pi(q(x_2)x_1)$, or $\pi(r(x_2)x_1^2)$, but none of these can ever have their highest-degree term be of degree one.

Geometrically, what's going on here is that the curve $V$ is singular at the origin, and adjoining $\phi$ to your coordinate ring desingularizes the curve by blowing up. (There are some decent pictures here if you're looking to really "see" this.) If $\phi$ were already regular (aka in your coordinate algebra), then your curve would be regular, but it's not.
