# If a function of two variables has a unique critical point, which is a local maximum, is it a global maximum?

$f(x,y)$ has partial derivatives in all $\mathbb R^2$ and a unique critical point at $(x_0,y_0)$ (local maximum). Is it a global maximum?

I know that in compact sets, it isn't enough to say that if a point is the only maximum inside the set, then it's a global maximum, because in the frontier of the set it could happen that the function has a maximum greater than the inside one. But for the entire $\mathbb R^2$ there is no frontier, therefore can I admit that this unique point is a point of global maximum?

• So you mean $(x_0,y_0)$ is the only critical point? – zhw. Oct 25 '15 at 5:57
• @zhw. yes thats it – Guerlando OCs Oct 25 '15 at 5:58
• Then please edit your question to say so, thanks. – zhw. Oct 25 '15 at 5:58
• $R^2$ is also not compact...... – DanielWainfleet Oct 25 '15 at 7:08
• There is a host of counter-examples. – DanielWainfleet Oct 25 '15 at 7:20

In the latter case counterexamples abound: a simple one is the function $f(x,y) = x^4 + y^4 - x^2 - y^2$. A critical point requires $4x^3 - 2x = 0$ and $4y^3 - 2y = 0$, and the only local maximum is at $(0,0)$, but the function is unbounded.
1. Label the local max as $x$. By definition as the local max if you move away from it a little bit the values go down.
2. Suppose for contradiction there is another point $y$ with value above the local max that we know about.
3. Take any curve connecting $x$ and $y$, and look at the value of the function along this curve. It starts high at $f(x)$, decreases a bit, and goes back up to $f(y)$. So it must have a minimum. So for each curve there is a minimum.
4. Take the maximum of the minima among all curves, this can be shown to be a saddle (critical) point. This contradicts the assumption that the local max $x$ is the only critical point.