# Is it possible for a function with range $=R$ have a global max/min without specifying a region?

Let $f(x,y,z) = x^2 + y^2 + z^2$

The gradient of $f$ is $\nabla f=(2x, 2y, 2z)$ and if I solve the 3-equations-system, I will find the critical point $P_0=(0,0,0)$

The Hessian matrix of $f$ is $\nabla^2 f= \begin{bmatrix} 2 & 0 & 0 \\ 0 & 2 & 0 \\ 0 & 0 & 2 \\ \end{bmatrix}$

For $P_0$, $\alpha_1 = det \begin{bmatrix} 2\\ \end{bmatrix} = 2 \gt 0$, $\alpha_2 = \det \begin{bmatrix} 2 & 0\\ 0 & 2\\ \end{bmatrix} = 4 \gt 0$, $\alpha_3 = \det \begin{bmatrix} 2 & 0 & 0\\ 0 & 2 & 0\\ 0 & 0 & 2 \end{bmatrix} = 8 \gt 0$

So $P_0$ is a local minimum and since $f$ is bounded below by $0$, $f(0,0,0) = 0$ is also an global minimum of $f$.

Now, let $g(x,y) = 4 + x^2 + y^3 - 3xy$

The gradient of $g$ is $\nabla g=(2x-3y, 3y^2-3x)$ and if I solve the 2-equations-system, I will find the critical points $P_0(0,0) \text{ and } P_1\left(\frac94, \frac32\right)$

The Hessian matrix of $g$ is $\nabla^2 g= \begin{bmatrix} 2 & -3 \\ -3 & 6y \\ \end{bmatrix}$

For $P_0$, $\alpha_1 = det \begin{bmatrix} 2\\ \end{bmatrix} = 2 \gt 0$, $\alpha_2 = \det \begin{bmatrix} 2 & -3\\ -3 & 0\\ \end{bmatrix} = -9 \lt 0 \mathbf{\text{ saddle point }}$

And for $P_1$, $\alpha_1 = det \begin{bmatrix} 2\\ \end{bmatrix} = 2 \gt 0$, $\alpha_2 = \det \begin{bmatrix} 2 & -3\\ -3 & 9\\ \end{bmatrix} = 9 \lt 0 \mathbf{\text{ local minimum }}$

I also found $g(0,0) = \mathbf{4}$ and $g\left(\frac94, \frac32\right) \approx \mathbf{2,313}$.

My question is, can I affirm that $g$ does not have a global max/min?

And also, will be always the case for a function with range $=R$ when I'm looking for a global max/min without specifying a region?

-
Observe that $g(0, y) = y^3 + 4$, hence has no global max/min. Note that FOC and SOC cannot really easily determine if you have global max/min. Take for example $f(x) = x$ on the reals. – Calvin Lin Jun 11 '13 at 0:38
@CalvinLin: Regarding to your nice comment, I am wonder if the OP is looking for an example of such that function? – Babak S. Jun 11 '13 at 0:44
@Calvin Lin: Do you want say that $g$ doesn't have global max/min at all? – user78723 Jun 11 '13 at 1:48
Consider the functions $z=\sqrt{x^2+y^2}$ and $z=-\sqrt{x^2+y^2}$. – Mhenni Benghorbal Jun 11 '13 at 5:38

But $g(x,y)$ has no global min at all. Plot it to see that! – Babak S. Jun 11 '13 at 5:18