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.



Does minimum of an analytic map restricted to analytic curves implies minimum?
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$. 


