# Minimum on all the lines is local minimum for $C^1$ functions?

Let $f(x,y)\in C^1(\mathbb R^2)$ and let $z=(x_0,y_0)$ be a stationary point where the Hessian is null; suppose that the $z$ is a local minimum (or maximum) for $(x,mx) \ \ \forall m\in \mathbb R$; in other words, the point $z$ is a local minimum (maximum) on every line. Is it true that then $z$ is a local minimum (max) for $f$? I think it's not, but I can't find a counterexample... Actually, the differentiability is a very strong condition and it could be even true. Any suggestion?

• It's a bit unclear, i think you meant $|x|$ in the series; then, the series (call it $G(x)$) has a maximum for $|x|=1$ I think, maybe I haven't understood what you're trying to say...can you explain? – Giuseppe Bargagnati Jul 7 '17 at 15:35
• Sorry, didn't write it properly. There is no $|x|$, multiplications are as complex numbers. Let $g$ be a $C^1(\mathbb{R}^2)$ functions such that $g(x)\geq0$ for all $x\in\mathbb{R}^2$, $g(0)=1$, and $g(x)=0$ for $|x|\geq1$. Consider the function $f(x)=-\sum_{n\geq1}\frac{1}{n^8}g(n^4e^{\frac{i\pi}{2n}}x-1)$ This function is zero everywhere except for little circles of radius $\frac{1}{n^4}$ around the points $x=\frac{e^{\frac{i\pi}{2n}}}{n^4}$, where is it negative and takes a local minimum at their centers. The value it takes is $-\frac{1}{n^8}$. – Bettybel Jul 7 '17 at 16:00
• Is $z$ a local min on each line or the global min on each line? It reads the latter way, but that would make the problem trivial. – zhw. Jul 7 '17 at 16:02
• @zhw. it's a local min on each line – Giuseppe Bargagnati Jul 7 '17 at 16:15
• @Bettybel and what are the points where the function has a local minimum on the lines but not a local minimum? – Giuseppe Bargagnati Jul 7 '17 at 16:17

On $\mathbb R,$ define $g(t) = e^{1/(t^2-1)}, |t|<1,$ $g=0$ elsewhere. Then $g\in C^\infty(\mathbb R),$ and the support of $g$ is $[-1,1].$ On $\mathbb R^2,$ define
$$f(x,y) = \begin{cases}e^{-1/x}g(2(y-x^2)/x^2)& x>0\\ = 0&x\le 0 \end{cases}$$
Then $f(x,y) > 0$ iff $x>0$ and $x^2/2 < y < 3x^2/2.$ Note that each line through the origin misses this region in an open line segment containing the origin. Thus $f(0,0)=0$ is a local maximum value on each such line. But $f(0,0)$ is not a local maximum value relative to $\mathbb R^2,$ since $f(x,x^2) = e^{-1/x}g(0) = e^{-1/x}\cdot e^{-1} >0$ for all $x>0.$
It remains to verify that $f\in C^1(\mathbb R^2).$ In fact $f\in C^\infty(\mathbb R^2).$ I'll leave that to the reader for now.