Does this function exist? (restriction to polynomial curve) Does there exist a function $u: \mathbb{R}^2\rightarrow\mathbb{R}$ that is not continuous at $0\in\mathbb{R}^2$, but whose restriction to every polynomial curve going through $0\in\mathbb{R}^2$ is continuous? By a polynomial curve we mean the parametrized curve $(t, p(t))$ where $p$ is some polynomial.
 A: On $\mathbb R,$ define the continuous function $g(t) = 1-|t|, |t| \le 1,$ $g=0$ elsewhere. On $\mathbb R^2,$ define $f = 0$ in the second, third, and fourth closed quadrants, and for $(x,y)$ in the open first quadrant, set
$$f(x,y) = g((y-e^{-1/x})/e^{-2/x}).$$
Then $f = 0$ except between the curves
$$\tag 1C_1: y=e^{-1/x} + e^{-2/x},\,\, C_2: y = e^{-1/x} - e^{-2/x}$$
in the open first quadrant. Note that $f = 1$ along the curve $y=e^{-1/x}, x >0,$ showing that $f$ is discontinuous at $(0,0).$ You can check that $f$ is continuous everywhere else.
Now let $p(t)$ be any polynomial. If $p\equiv 0,$ there is nothing to show. If $p(0) \ne 0,$ then $(t,p(t))$ stays away from $(0,0),$ hence $f(t,p(t))$ is continuous on $\mathbb R.$ If $p(0)=0, p \not \equiv 0,$ let $n$ be the order of the zero of $p$ at $0.$ Then there exists $c>0$ and a $\delta > 0$ such that one of the following cases holds for all $t\in [0,\delta]$:
$$ \text {i)} \,p(t) \ge ct^n\,\,\, \text {ii)} \,p(t) \le -ct^n.$$ In case i), $(t,p(t))$ is above the zone bounded by the curves $C_1,C_2$ in $(1)$ for small $t>0.$ This is because these curves approach $0$ exponentially fast, much faster than $ct^n.$ It follows that $f(t,p(t))$ is continuous on $\mathbb R.$ In case ii), there is nothing to show.
