Maximize $z$ over $x + y + z = 3$ and $x^2 + y^2 + z^2 = 6$ Suppose that $x$, $y$, and $z$ are real numbers such that $x + y + z = 3$ and $x^2 + y^2 + z^2 = 6$. What is the largest possible value of $z$?

I tried applying Cauchy-Schwarz to get $(x^2+y^2+z^2)(1+1+1)\geq (x+y+z)^2$, but this doesn't say anything. I also tried some different ways to apply Cauchy, but they all didn't do much.
Thanks in advance!!

Hint: Since you tried using CS inequality, here is a way:
$$(1+1)\cdot(x^2+y^2)\geqslant (x+y)^2 \implies 2\cdot(6-z^2)\geqslant (3-z)^2 \\ \implies 1+\sqrt2 \geqslant z \geqslant 1-\sqrt2$$
