# 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)

• It is possible that a local minimum is greater than the local maximum. In 1D, 2D and all D. May 24 '15 at 14:19
• But the function $y=x$ on $[0,1]$ has a global max at $1$ and a global min at $0$ and these are not local extrema. May 24 '15 at 14:21
• Just have to say this, but you cant suppose a continuous function that only has one extremum on a closed interval, that's kind of the whole idea behind the extreme value theorem May 26 '15 at 0:38

$$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. :)

• A nice example ! It also illustrates that if the local minimum is greater than the local maximum, then the function must behave non-analytically somewhere in between the two. May 24 '15 at 16:00
• No, this is not possible. For example, in 1 dimension. A function $f(x)$ has a local minimum at $x1$. The function behaves there as $A + B*(x - x1)^2$ with $B > 0$. It also has a maximum at $x2$. The function behaves here as $C - D(x-x2)^2$ with $D > 0$. Now it is given that $A > C$. If you connect these two segments of $f$, then either you create new maxima and minima, or the function must be discontinuous somewhere in between. The same is true in $2$ or more dimensions. May 24 '15 at 17:43
• Your example is not defined on a connected domain.
– user99914
May 26 '15 at 10:46