# pheobee's question at Yahoo! Answers regarding extrema for a function of two variables

#### MarkFL

Staff member
Here is the question:

Find the local maximum and minimum values and saddle point(s) of the function. If you have three-dimensional g?

Find the local maximum and minimum values and saddle point(s) of the function. If you have three-dimensional graphing software, graph the function with a domain and viewpoint that reveal all the important aspects of the function. (Enter your answers as a comma-separated list. If an answer does not exist, enter DNE.)

f(x, y) = 3 sin x sin y, −π < x < π, −π < y < π
I have posted a link there to this thread so the OP can view my work.

#### MarkFL

Staff member
Hello pheobee,

We are given the function:

$$\displaystyle f(x,y)=3\sin(x)\sin(y)$$ where $-\pi<x,y<\pi$.

First, to find the critical points, we must solve the simultaneous system:

$$\displaystyle f_x(x,y)=3\cos(x)\sin(y)=0$$

$$\displaystyle f_y(x,y)=3\sin(x)\cos(y)=0$$

$$\displaystyle \sin(x)\cos(y)+\cos(x)\sin(y)=\sin(x+y)=0$$

And by subtraction:

$$\displaystyle \sin(x)\cos(y)-\cos(x)\sin(y)=\sin(x-y)=0$$

Hence, we may state:

$$\displaystyle x\pm y=k\pi$$

Now, given the first partials, and the stated domains, we obtain from this the following critical points:

$$\displaystyle (x,y)=\left(-\frac{\pi}{2},-\frac{\pi}{2} \right),\,\left(-\frac{\pi}{2},\frac{\pi}{2} \right),\,(0,0),\,\left(\frac{\pi}{2},-\frac{\pi}{2} \right),\,\left(\frac{\pi}{2},\frac{\pi}{2} \right)$$

Next, we may use the second partials test to determine the nature of the potential extrema associated with these 5 critical points.

First, we compute:

$$\displaystyle f_{xx}(x,y)=-3\sin(x)\sin(y)$$

$$\displaystyle f_{yy}(x,y)=-3\sin(x)\sin(y)$$

$$\displaystyle f_{xy}(x,y)=3\cos(x)\cos(y)$$

And we define:

$$\displaystyle D(x,y)\equiv f_{xx}(x,y)f_{yy}(x,y)-\left(f_{xy}(x,y) \right)^2$$

Using our second partials, we then find:

$$\displaystyle D(x,y)=9\left(\sin^2(x)\sin^2(y)-\cos^2(x)\cos^2(y) \right)$$

So now, we analyze the critical points:

1.) $$\displaystyle (x,y)=\left(-\frac{\pi}{2},-\frac{\pi}{2} \right)$$

$$\displaystyle D(x,y)=9>0$$

$$\displaystyle f_{xx}(x,y)=-3<0$$

We conclude this point is at a relative maximum.

The value of the function at this point is:

$$\displaystyle f(x,y)=3$$

2.) $$\displaystyle (x,y)=\left(-\frac{\pi}{2},\frac{\pi}{2} \right)$$

$$\displaystyle D(x,y)=9>0$$

$$\displaystyle f_{xx}(x,y)=3>0$$

We conclude this point is at a relative minimum.

The value of the function at this point is:

$$\displaystyle f(x,y)=-3$$

3.) $$\displaystyle (x,y)=(0,0)$$

$$\displaystyle D(x,y)=-9<0$$

We conclude this point is not at an extremum (saddle point).

The value of the function at this point is:

$$\displaystyle f(x,y)=0$$

4.) $$\displaystyle (x,y)=\left(\frac{\pi}{2},-\frac{\pi}{2} \right)$$

$$\displaystyle D(x,y)=9>0$$

$$\displaystyle f_{xx}(x,y)=3>0$$

We conclude this point is at a relative minimum.

The value of the function at this point is:

$$\displaystyle f(x,y)=-3$$

5.) $$\displaystyle (x,y)=\left(\frac{\pi}{2},\frac{\pi}{2} \right)$$

$$\displaystyle D(x,y)=9>0$$

$$\displaystyle f_{xx}(x,y)=-3<0$$

We conclude this point is at a relative maximum.

The value of the function at this point is:

$$\displaystyle f(x,y)=3$$

And so we may conclude:

$$\displaystyle f_{\min}=-3$$

$$\displaystyle f_{\max}=3$$

Here is a plot of the given function on the stated domain, showing all 5 points:

Here is a link to the program I used to plot the function:

z=3sin(x)sin(y) where x=-pi to pi,y=-pi to pi - Wolfram|Alpha