Global maximum and minimum on a sphere I have a sphere $x^2+y^2+z^2=R^2$ and i have $T=C(x^2+2y^2+3z^2+2xy+2xz)$ temperature function. I need to find maximum and minimum of this temperature function.
First i tried to calculate $\partial_x f=2x$,
$ \partial_y f=2x$,
$ \partial_z f=2z $
$\partial_x T=2x+2y+2z $, $\partial_y T=4y+2x $, $\partial_z T=6z+2x $
Then I equate them $2x=\lambda(2x+2y+2z)$, $2y=\lambda(4y+2x)$, $2x=\lambda(6z+2x)$
But I cannot find lambda from here. What am I doing wrong?

$T=C(x^2+2y^2+3z^2+2xy+2xz)$
As $C$ is a constant, we take $f(x,y,z) = x^2+2y^2+3z^2+2xy+2xz$
where $g(x,y,z) = x^2+y^2+z^2 - R^2 = 0$
$f(x,y,z) = \lambda g(x,y,z)$
Taking derivatives wrt $x,y,z$,
$(1-\lambda)x+y+z = 0$ ...(i)
$x + (2-\lambda)y = 0$ ...(ii)
$x + (3-\lambda)z = 0$ ...(iii)
From $(ii)$ and $(iii)$,
$y = -\frac{x}{2-\lambda}, z = -\frac{x}{3-\lambda}$ (for $\lambda \ne 2,3$)
Plugging into $(i)$,
$((1-\lambda)(2-\lambda)(3-\lambda) + 2\lambda - 5)x=0$
So either $x=0$ or
$-\lambda^3+6\lambda^2-9\lambda+1=0$ ($x\ne 0$)
$\lambda \approx 0.12061, 2.3473, 3.5321$.
We already know $y, z$ in terms of $x$ and $\lambda$. Plugging these values and using the constraint $x^2+y^2+z^2=R^2$ will give us possible values of $x$ and from there onx, values of $y, z$. We then need to check these critical points for maxima and minima.
