# Relative maximum and minimum of function of three variables

I know that how to find relative maximum and minimum of function of two variables.

How can I determine function when $f(x,y,z)=x^2+y^2-z^2$ has relative maximum or relative minimum?

Please give me hint. In general when does $f(x,y,z)$ have relative minimum or relative maximum? Thanks in advance.

-
What do you do in two dimensions? –  Siminore Nov 3 '12 at 9:10
@Siminore In two dimensions:Suppose f (x, y) is a function and (a, b) is a point where and Let 1. If D>0 and , then $f_{xx}>0$ has a relative minimum at (a, b). 2. If D>0 and , then $f_{yy}<0$ has a relative maximum at (a, b). 3. If D<0 , then f has neither a local maximum or local minimum. The function f has a saddle point at (a, b). 4. If D=0 , the test fails. –  Siddhant Trivedi Nov 3 '12 at 9:13
What? What is "If and,"? –  Siminore Nov 3 '12 at 9:16
This function is radially symmetric, for each $x$, $y$ such that $x^2+y^2=r^2$ (i.e., $x=r\cos\varphi$, $y=r\sin\varphi$) it has the same value. So if it helps you to visualize the problem, you could think about the function $g(r,z)=r^2-z^2$ first. –  Martin Sleziak Nov 3 '12 at 9:17
just edited....where $D=f_{xx}f_{yy}-(f_{xy})^2$ –  Siddhant Trivedi Nov 3 '12 at 9:18

I cut and paste from Wikipedia:

For a function of more variables, one can look at the eigenvalues of the Hessian matrix at the critical point. The following test can be applied at a non-degenerate critical point (a, b, ...). If the Hessian is positive definite (equivalently, has all eigenvalues positive) at (a, b, ...), then f attains a local minimum at (a, b, ...). If the Hessian is negative definite (equivalently, has all eigenvalues negative) at (a, b, ...), then f attains a local maximum at (a, b, ...). If the Hessian has both positive and negative eigenvalues then (a, b, ...) is a saddle point for f (this is true even if (a, b, ...) is degenerate). Otherwise the test is inconclusive. Note that for functions of two or more variables, the determinant of the Hessian does not provide enough information to classify the critical point, because the number of jointly sufficient second-order conditions is equal to the number of variables, and the sign condition on the determinant of the Hessian is only one of the conditions. Note also that this statement of the second derivative test for many variables also applies in the two-variable and one-variable case. In the latter case, we recover the usual second derivative test.

See the original page here.

What you learned for the 2D case is a particular trick to test the positivity of the hessian matrix evaluated at a critical point. In higher dimension you must write down the hessian matrix and compute its signature, unless the specific structure of your function allows some easier approach.

-

Have a look at Hessian Matrix and see under "Second derivative test".

-

In dealing with your first question about the specific function, the computational approach is to find the critical point(s) from

$$f_x \ = \ 2x \ = \ 0 \ \ , \ \ f_y \ = \ 2y \ = \ 0 \ \ , \ \ f_z \ = \ -2z \ = \ 0 \ \ ,$$

giving us the origin $\ (0, \ 0, \ 0) \$ as the only critical point. The non-zero second partial derivatives are $f_{xx} \ = \ 2 \ , \ \ f_{yy} \ = \ 2 \ , \ \ f_{zz} \ = \ -2 \$ , produce a diagonal Hessian matrix

$$\left[ \begin{array}{ccc}2&0& \ 0\\0&2& \ 0\\0&0&-2\end{array} \right] \ \ ,$$

from which we can simply "read off" the eigenvalues as $\ 2, \ 2, \$ and $\ -2 \$ . Since these are not all positive or all negative, the critical point is a saddle point.

As is often the case with functions that have a high degree of symmetry, we can find a geometrical interpretation that make this reasonably easy to see. In his comment above, Martin Sleziak suggests something along this line.

The function $\ f(x, \ y, \ z) \ = \ x^2 \ + \ y^2 \ - \ z^2 \$ is defined everywhere in $\ \mathbb{R}^3 \$ , so we will consider its "level surfaces". The "zero surface" $\ x^2 \ + \ y^2 \ - \ z^2 \ = \ 0 \$ is the two nappes of the cone $\ x^2 \ + \ y^2 \ = \ z^2 \$ . Anywhere "inside" either of these nappes, $\ |z| \ > \ \sqrt{x^2 + y^2} \$ , which is the perpendicular distance of a point from the $\ z-$ axis ; so $\ f(x, \ y, \ z) \ < \ 0 \$ within the nappes, and tends to negative infinity as we "move" farther from the origin in that region. Outside of the nappes, $\ |z| \ < \ \sqrt{x^2 + y^2} \$ , thus $\ f(x, \ y, \ z) \ > \ 0 \$ and increases without limit as we "go farther away" from the origin in that region.

We can imagine then any sort of "path" from a distant point outside the nappes to the origin, and thence to a distant point inside them; we could even "travel" along the surface of the cone for some part of that part. So there is nothing special whatever about the "critical point" at the origin; our function thus has neither global nor relative extrema.

-