Q:

Extreme values of a continuous function on a closed connected domain

Suppose a one-variable continuous function has only one extreme value on a closed interval and it is a local minimum, we can prove it is the global minimum on the interval.
Suppose a one-variable continuous function has only two extreme values on a closed interval, we can prove one of them is a local maximum and another is a local minimum and the local minimum is strictly less than the local maximum.
In two-variable case there are counterexamples.
$f(x,y) = {x^2} + {y^3} - 3y$ is a continuous function which has only one extreme value on the plane and it is a local minimum, but it is not the global minimum on the plane.
$f(x,y) = {x^4} + {y^4} - {(x + y)^2}$ is a continuous function which has only two extreme values on the plane, but both of them are local minima.
I wonder if there exists a continuous function on a connected closed domain which has only two extreme values, one of them is local maximum and another is local minimum but the local minimum is strictly greater than the local maximum.
In one-variable case I take this proof. Suppose $a < b$ and $f(a)$ is local maximum, $f(b)$ is local minimum, $f(a) \leqslant f(b)$. Consider global minimum $f(c)$ on $[a,b]$. If $c = a$, f is constant near $a$, this is a contradiction. If $c = b$, $f(b) = f(a)$, this is a contradiction again. So $a < c < b$, then $f(c)$ is a third extreme value. So the local minimum is less than the local maximum.
But in two-variable case this doesn't work. I think there may exist a counterexample but I don't know how to find it. Thank John for giving a nice example!
$f(x, y) = x + 2 \sin x + x y^2$ (on a properly chosen domain)

A:

$$
f(x,y)=1/x+x+1/y+y
$$
According to wolfram alpha, the local min/max are:

You can see that the local minimum is greater than the local maximum. :)

