if $f(x,y,z)=x+y-z$ and constraint is sphere $g(x,y,z)=x^2+y^2+z^2=81$. I have to find the absolute maximum and minimum. And I have to explain how both an absolute maximum and minimum must be attained.
my solution: I obtained critical points $(-3\sqrt{3} ,-3\sqrt{3},3\sqrt{3}) and (3\sqrt{3} ,3\sqrt{3},-3\sqrt{3})$ by solving the system $\nabla f= \lambda \nabla g$ and constraint equation.
Then I used the equation $L(l;x,y,z) =x+y-z-l(x^2+y^2+z^2-81)$ and found the matrix $\begin{bmatrix} 0 & -2x & -2y & -2z\\ -2x & -2l & 0 & 0\\ -2y & 0 & -2l & 0\\ -2z & 0 & 0 & -2l \end{bmatrix}$.
I plugged in the critical points, found the sequence of determinants and found that $(-3\sqrt{3} ,-3\sqrt{3},3\sqrt{3})$ is local minimum and $(3\sqrt{3} ,3\sqrt{3},-3\sqrt{3})$ is local maximum.
How do I say that they are absolute maximum and minimum, as well as that they both must be attained?
Hint (for the 1st part): using the RMS-AM inequality, and also that $|a| \ge a$ and $|a| \ge -a$:
$$ 3 \sqrt{3} = \sqrt{\frac{81}{3}} = \sqrt{\frac{x^2+y^2+z^2}{3}} \ge \frac{|x|+|y|+|z|}{3} \ge \frac{x+y-z}{3} \\ \iff\quad x+y -z \le 9 \sqrt{3} $$
Equality is attained iff $|x|=|y|=|z|=3 \sqrt{3}$ and $x,y \ge 0, z \le 0$, which gives $x=y=3 \sqrt{3}$ and $z = -3 \sqrt{3}$, so the upper bound of $9 \sqrt{3}$ is indeed a global maximum.