Global extrema of $f(x,y,z) = x^2-y^2+z$ on $x^2+y^2+z^2\leq 1$ and $f(x,y)=\frac{x^2}{2}+\frac{y^2}{2}$ on $\frac{x^2}{2}+y^2\leq 1$

analysiscalculusmultivariable-calculusoptimizationreal-analysis

(See edits below about what I did wrong)

I'm asked to find the global extrema of two functions each in a different region. I think my results are correct, but I have no solutions, so I don't know if I forgot something or made a mistake somewhere and I would like your confirmation, thank you.


a)
$f(x,y,z) = x^2-y^2+z$ on the sphere $x^2+y^2+z^2\leq 1$.

So inside of the domain, we have $(2x,-2y,1)=(0,0,0)$ which is never true. On the border, we use Lagrange and get $(2x,-2y,1)=\lambda(2x,2y,2z)$. So $\lambda=\frac{1}{2z}, y=0, 2x=\frac{x}{z}$ so $z=\frac{1}{2}$ if $x\neq 0$. To get $x$, we plug that into our constraint and get $x=\pm \frac{3}{4}$. If $x=0$, then $z=\pm 1$ using again our constraint.

So there is a global minimum of $-1$ at $(0,0,-1)$ and a global maximum of $\frac{9}{16}+\frac{1}{2}=\frac{17}{16}$ at $(\pm \frac{3}{4},0,\frac{1}{2})$


b)

$f(x,y)=\frac{x^2}{2}+\frac{y^2}{2}$ on the ellipse $\frac{x^2}{2}+y^2\leq 1$

On the inside, we have $(x,y)=(0,0)$ So $x=0=y$. On the border, we plug $\frac{x^2}{2}=1-y^2$ into our function. So we get $1-\frac{y^2}{2}$, $-1\leq y\leq 1$. So $f'=-y=0$. So $y=0$ and $x=\pm \sqrt{2}$. For the endpoints, we have $y=\pm 1, x=0$. So the candidates are $(0,0), (\pm \sqrt{2},0), (0,\pm 1)$. So we have a global maximum of $1$ at $(\pm \sqrt{2},0)$ and a global minimum of $0$ at $(0,0)$.


Thanks for your feedback !


Edit : part b) seems correct. In part a), for $x\neq 0, z=\frac{1}{2},y=0$, when I plug into the constraint to find $x$, I should get $x^2=\frac{3}{4}$ so $x=\pm \frac{\sqrt{3}}{2}$. I forgot to take the square root for $x$ (in fact, I put the $\pm$ in front of $\frac{3}{4}$ without taking the square root of $\frac{3}{4}$, which is obviously not correct).

Also, I have somewhat overseen the equation $-2y=\frac{y}{z}$ and only focused on $2x=\frac{x}{z}$.

$y$ is not necessarily $0$. If $z=-\frac{1}{2}$, then $x=0$ but $y\neq 0$. Here, we have the same case as above, i.e. we plug $y$ into our constraint with $x=0, z=-\frac{1}{2}$ and get $y=\pm \frac{\sqrt{3}}{2}$.

So finally, we have a global maximum of $\frac{5}{4}$ at $(\pm \frac{\sqrt{3}}{2},0,\frac{1}{2})$ and a global minimum of $- \frac{5}{4}$ at $(0,\pm \frac{\sqrt{3}}{2},-\frac{1}{2})$

Best Answer

Regarding the first exercise with $f = x^2-y^2+z$ after forming the lagrangian as

$$ L(x,y,z,\lambda,\epsilon) = f + \lambda (x^2 + y^2 + z^2 - 1 - \epsilon^2) $$ Here $\epsilon$ is a slack variable introduced in order to transform the inequality into an equality, the stationary conditions are $$ \left\{ \begin{array}{rcl} 2 \lambda x+2 x& = & 0 \\ 2 \lambda y-2 y& = & 0 \\ 2 \lambda z+1& = & 0 \\ x^2+y^2+z^2-1-\epsilon^2& =& 0 \\ -2 \epsilon \lambda& =& 0 \\ \end{array} \right. $$

or

$$ \left\{ \begin{array}{rcl} (\lambda+1)x& = & 0 \\ (\lambda-1)y& = & 0 \\ 2 \lambda z+1& = & 0 \\ x^2+y^2+z^2-1-\epsilon^2& =& 0 \\ -2 \epsilon \lambda& =& 0 \\ \end{array} \right. $$

and after solving $$ \left[ \begin{array}{cccccc} x & y & z & \lambda & \epsilon & f \\ 0 & -\frac{\sqrt{3}}{2} & -\frac{1}{2} & 1 & 0 & -\frac{5}{4} \\ 0 & \frac{\sqrt{3}}{2} & -\frac{1}{2} & 1 & 0 & -\frac{5}{4} \\ 0 & 0 & -1 & \frac{1}{2} & 0 & -1 \\ -\frac{\sqrt{3}}{2} & 0 & \frac{1}{2} & -1 & 0 & \frac{5}{4} \\ \frac{\sqrt{3}}{2} & 0 & \frac{1}{2} & -1 & 0 & \frac{5}{4} \\ \end{array} \right] $$

Note that in all solutions $\epsilon = 0$ revealing that all such solutions are located at the boundary.