TITLE: Does minimum of an analytic map restricted to analytic curves implies minimum?
QUESTION [5 upvotes]: Let $f:\mathbb{R}^n \rightarrow \mathbb{R}$ be an analytic function such that its restriction to any arbitrary analytic curve $\gamma$ passing through the origin $0\in \mathbb{R}^n$ attains a local minimum in $0$ and let say that $f(0)=0$.
Is $0$ a point of local minimum for $f$? If the answer is positive, does the same statement generalize to the case in which $f:\mathbb{H} \rightarrow \mathbb{R}$, where $\mathbb{H}$ is an arbitrary Hilbert space?
To me the problem seems that, a priori, there could be a sequence of points $x_n$ approaching to $0$, laying on a continuous but non analytic curve $\overline{\gamma}$ and such that $f(x_n)>f(0)$. The answer to the first question should be yes and one can see it using some quite strong results on the local structure of the zero set of an analytic map, like Lojasiewicz's theorem. But the problem is that this argument does not generalize to infinite dimensional Hilbert spaces.

REPLY [5 votes]: As to the generalization to infinite dimensional Hilbert spaces, the lack of compactness makes the property fail for not even too delicate reasons. Consider the cubic functional $$f(x):=\sum_{n\ge1} {1\over n}x_n^2 - \sum_{n\ge1} {x_n^3}\ ,$$ on the Hilbert space $\ell_2$. For any $C^2$ curve $\gamma:(-1,1)\to \ell_2$ with $\gamma(0)=0$ and $\dot\gamma(0)\neq0$ we have
$${d\over dt}f(\gamma(t))=\sum_{n\ge1} \Big({2\over n} \gamma_n\dot\gamma_n  -3 \gamma_n^2\dot\gamma_n\Big) ,$$
$${d^2\over dt^2}f(\gamma(t))=\sum_{n\ge1} \Big({2\over n} \dot\gamma_n^2+{2\over n} \gamma_n\ddot\gamma_n- 3\gamma_n^2\ddot\gamma_n-6\gamma_n \dot\gamma_n^2\Big) \ .$$
Therefore  ${d\over dt}f(\gamma(t)){\big|_{t=0}}=0$ and ${d^2\over dt^2}f(\gamma(t)){\big|_{t=0}}>0$, so $f$ has a strict local minimum in $0$ along $\gamma$. On the other hand, for any $n\in\mathbb{N}$ we have $f\big({2\over n} e_n\big)=-{4\over n^3},$ so that $0$ is not a local minimum on $\ell_2$.