The temperature in $\mathbb R^3$ is given by the function $T: \mathbb R^3 \to \mathbb R, T(x,y,z) = 3xy + z^3 −3z$. Prove that there are the hottest and coldest points on the sphere $x^2 + y^2 + z^2 −2z = 0$, and find them.
I found the gradients of T(x,y,z) and the sphere.
$$\nabla T=\pmb{3yi+3xj+(3z^2-3)k}$$ and $$\nabla S=\pmb{2xi+2yj+(2z-2)k}$$
Then we get a system of equations:
3y=$\lambda$2x ; 3x=$\lambda$2y ; 3z^2-3=$\lambda$(2z-2) and the constraint $x^2 + y^2 + z^2 −2z = 0$.
$\lambda$= $\frac{3y}{2x}$ = $\frac{3x}{2y}$ =$\frac{3(z^2-1)}{2(z-1)}$
From the first two I got x=y and $\lambda$ =1, then $\frac{(z^2-1)}{(z-1)}$=1, where z $\neq$1. Solving for z, I got z(z-1)=0, so z=0.
Then I substituted z=0 and x=yto the constraint:
2x^2=0 and got x=y=0.
But I think x and y cannot be 0.
Let $g=x^2+y^2+z^2-2z=0$
Then $L=f-\lambda g = 3xy+z^3-3z-\lambda(x^2+y^2+z^2-2z)$
Solve $$\frac{\partial L}{\partial x}=3y-2\lambda x, \frac{\partial L}{\partial y}=3x-2\lambda y,\frac{\partial L}{\partial z}=3z^2-3-\lambda (2z-2)$$
Which gives us
$$\frac{y}{x}=\frac{x}{y}=\frac{z^2-1}{z-1}$$
Finally, plug into the constraint:
$$2x^2+1-2=0 \Rightarrow x=\pm 0.707....=-y$$
Now we have 3 candidates for $x$ and $y$ and 1 for $z$. Plug them back into the equation and you will find the max and min.
EDIT: the third candidate is $x=y=0$ in case you missed it, i skiped a few steps, let me know if something's not clear