Find the maximum and minimum of the restriction of $f$ to $K$

multivariable-calculusoptimization

I have the following problem.

A sphere $K,$ has the equation: $x^2+y^2+(z+1)^2≤\frac{1}{4}$

A function $f,$ is given by: $f(x,y,z)=-z \cdot e^{z-x^2-y^2+1}$

It is known, that the point $(0,0,-1)$ is stationary. This point is the center of the sphere.

Determine the global maximum and minimum of the restriction of $f$ to K, and indicate the coordinates of the points.

Okay, so I have come this far:

Rewriting the equation for the sphere to this: $-x^2-y^2=-\frac{1}{4}+(z+1)^2$

Inserting this in $f$ we get the following.

$$f=-z \cdot e^{z-\frac{1}{4}+(z+1)^2+1}$$

If I differentiate $f$ when it looks like this and solve the equation, $f'=0$, I get two solutions.

$$z=-\frac{1}{2}, z=-1$$

And since the point $(0,0,-1)$, these must be all the points where a maximum or minimum could be right?

However, I have talked to some of my peers about this problem, and they say that I also need to check the point where $z=-\frac{3}{2}$, cause that could also be a maximum/minimum.

I don't understand how they arrived at that, and I started to doubt my own answer. Can anyone clarify or help me about this. Do I also need to check for $z=-\frac{3}{2}$ and if so, why?

Best Answer

Rewriting $ f ( x , y , z ) $ in terms of $ z $ alone is a good trick; that method doesn't always work well, but in this case, it works beautifully. But you can't simply extremize $ g ( z ) = - z \, \mathrm e ^ { z − \frac 1 4 + ( z + 1 ) ^ 2 + 1 } $, because $ g $ is defined everywhere. (Also, it's not good practice to use the same name $ f $, originally used for a function of three variables, for this function of one variable; they're not the same function, and they have different derivatives.) Since the sphere only has solutions where $ x ^ 2 + y ^ 2 \geq 0 $, you also need to solve $ \frac 1 4 - ( z + 1 ) ^ 2 \geq 0 $ to get the possible values of $ z $. So you are really extremizing $ g $ on the interval $ \big [ { - \frac 3 2 , - \frac 1 2 } \big ] $. Thus, besides $ z = - 1 $ and $ z = - \frac 1 2 $ from $ g ' ( z ) = 0 $, you also get $ z = - \frac 3 2 $ and $ z = - \frac 1 2 $ from the boundary. (Of course, you only have to check $ z = - \frac 1 2 $ once.)

This is to extremize $ f $ on the sphere; to extremize $ f $ on the closed ball, also check $ ( 0 , 0 , - 1 ) $, as you know.