Find the largest value of $x$ for which $x^2 + y^2 + z^2 = x + y + z$.
What I did was subtract the RHS, to get $$x^2 - x + y^2 - y + z^2 - z = 0$$
$$x^2 - x + \frac{1}{4} + y^2 - y + \frac{1}{4} + z^2 - z + \frac{1}{4} = \frac{3}{4}$$
$$(x-\frac{1}{2})^2 + (y-\frac{1}{2})^2 + (z-\frac{1}{2})^2 = \frac{3}{4}$$
Hence the given equation can be rewritten as the formula for a sphere centered at $(x,y,z) = (\frac{1}{2},\frac{1}{2},\frac{1}{2})$ with a radius of $\frac{\sqrt3}{2}$.
Now for $x$ to be at its largest value, that would mean $y = z = \frac{1}{2}$ (right?).
And if that is true, then $\boxed{x = \frac{\sqrt{3}+1}{2}}$.
Please let me know if I am correct, and if not, please help me understand how to achieve the correct answer. Thanks!
Edit: Thanks everyone for your responses!