TITLE: Does $f$ have a critical point if $f(x, y) \to +\infty$ on all horizontal lines and $f(x, y) \to -\infty$ on all vertical lines?
QUESTION [12 upvotes]: Given a function $f:\Bbb R^2 \to \Bbb R, f \in C^\infty$ with the property that
$$\lim_{x\to+\infty}f(x,y_0) = \lim_{x\to-\infty}f(x,y_0) = +\infty \qquad \forall y_0\in \Bbb R, \\[2ex]
\lim_{y\to+\infty}f(x_0,y) = \lim_{y\to-\infty}f(x_0,y) = -\infty \qquad \forall x_0\in \Bbb R.$$
Determine whether $f(x,y)$ necessarily has at least one critic point.

My attempt:  
I suppose that such a function could be something just like: $(x^{2n}-y^{2m})$; anyway what I mean is that both $f(x,y_0)$ and $f(x_0,y)$ have to assume eventually the shape of a sort of "parabola".   
Because of $f\in C^{\infty}$ then both $f(x,y_0)$ and $f(x_0,y)$ are continuous, thus:
1.$f(x,y_0)=g(x),$ has a global minimum and it means: $\forall y_0 \in \Bbb R$ there is at least one $x^*$ such that $f_x(x^*,y_0)=0;$
2.$f(x_0,y)=h(y),$ has a global maximum and it means: $\forall x_0 \in \Bbb R$ there is at least one $y^*$ such that $f_y(x_0,y^*)=0.$ 
If my attempt is correct until now, the last thing I need to do is observe that there is at least a couple $(x^*,y^*)$ such that $f_x(x^*,y^*)=0$ and $f_y(x^*,y^*)=0$. This last step is the one I stuck in.  
Is there someone who can handle this? (or can propose another path to follow)

REPLY [7 votes]: No, a function like this need not have a critical point. However, the only example I could find is a bit complicated and unfortunately not explicit. With a bit of work, one could make this explicit, but it would not be pretty. There should be a simpler example, though...
Let $L$ be the ray from the origin at a $45^\circ$ angle, i.e., defined by $x=y \ge 0$, and let $U$ be the open 1-neighborhood of $L$ in the plane, i.e., all points with distance less than $1$ to $L$. Then there exists a $C^\infty$-diffeomorphism $\phi: U \to U\setminus L$, which is the identity in a neighborhood of $\partial U$. (Note that $U$ and $U\setminus L$ are open sets, and $\phi^{-1}$ obviously does not extend to $L$.) Then we can extend $\phi$ to a $C^\infty$-diffeomorphism $\phi: \mathbb{R}^2 \to \mathbb{R}^2 \setminus L$ by defining it to be the identity outside $U$.
Now let $g(x,y) = x^2-y^2$, which already has the correct limits, but obviously has a critical point at $(0,0)$. Define $f(x,y) = g(\phi(x,y))$. Any horizontal or vertical line either does not intersect $U$ at all, or it intersects it in an interval of length $\le 2\sqrt{2}$, and since $f=g$ outside of $U$, we have that the limits of $f$ and $g$ along horizontal and vertical lines are the same, so $f$ has the desired limits. As a composition of smooth functions, it is smooth, and by the chain rule $f$ does not have any critical points, because $\phi$ does not have any, and the only critical point of $g$ is at $(0,0) \in L$, which is not in the image of $\phi$.