How to find minimum and maximum value of x, if x+y+z=4 and $x^2 + y^2 + z^2 = 6$? I just know that putting y=z, we will get 2 values of x. One will be the minimum and one will be the maximum. What is the logic behind it?

$z=4-x-y$
$x^2+y^2+(4-x-y)^2-6=0$
Differentiate wrt $x$ and $y$
$2x-2(4-x-y)=0$
$2y-2(4-x-y)=0$
Gives $x=y=4/3$
