Let $f \in C^{\infty}(\mathbb{R}^n)$ be such that $\underline{0}$ is a local minimum point for every algebraic curve, is it $0$ a local minimum point? Let $f \in C^{\infty}(\mathbb{R}^n)$ be a real function such that $\underline{0}$ is a local minimum point for $f$ on every algebraic curve, i.e. for every algebraic curve $C$ there exists an $\epsilon > 0$ such that if $x \in B_{\epsilon}(\underline{0}) \cap C$ then $f(0) \leq f(x)$
Where  $B_{\epsilon}(0) := \{ x \in \mathbb{R}^n \; : \; ||x|| < \epsilon \}$ and $C$ is the set of points that belongs to the algebraic curve
(Observe that $\epsilon$ depends on $C$).
Is it true that $\underline{0}$ is necessarily local minimum point for $f$?
 A: Probably we can give an explicit example, but being lazy we can use Whitney extension theorem to only have to talk about some of the values at some points or sets of points, and the rest gets filled up by Whitney.
Consider the sequence of points $p_n=(1/n, e^{-n!})$ and circles $c_n=\{\|x-p_n\|=e^{-n!}\}$. The $e^{-n!}$ is there to decrease faster than any power. By Lojasiewicz's inequality, an algebraic curve is not going to intersect infinitely many of the $p_n$ or of the $c_n$.
Let's define a function $f$ such that $f(p_n)=-1/n$, the Taylor series of $f$ is zero at every point of $c_n$, and $f(0)=0$. Whitney gives us some smooth function on all of $\mathbb{R}^n$ that takes these values. In the exterior of the union of all $c_n$ and the origin, we can replace $f$ by $f^2$, just to make it non-negative there.
You can see now that on an algebraic curve passing through the origin, there will be a neighborhood of the origin not intersecting the $c_n$. Therefore, $f\geq0$ on that neighborhood. So, $f(0)$ is a local minimum. However, in every neighborhood of the origin we will have points $p_n$ at which $f$ is taking negative values.
A: To get you started: Let $g$ be smooth and nonnegative with $g^{(k)}(0)=0$ for all $k=0,1,2,\dots$. For example, take
$$g(t) = \begin{cases} e^{-1/t^2}, & t\ne 0 \\ 0, & t=0\end{cases}.$$
Write points in $\Bbb R^n$ as $(x,y)\in\Bbb R^{n-1}\times\Bbb R$, and set $$f(x,y) = \big(y-g(\|x\|)\big)(\big((y-2g(\|x\|)\big).$$
Then $f$ is negative on $R=\{g(\|x\|)<y<2g(\|x\|)\}$ but nonnegative elsewhere. Any algebraic curve passing through the origin will be in contained in the complement of $R$ and you can check that $f$ has a local minimum at $0$ when restricted to such a curve. But $f$ itself has a saddle point at $0$, since $f<0$ on $R$.
