Example 4 Given that $x, y, z$ are all real numbers, $a>0$ and satisfy the relations
$$
\begin{array}{l}
x+y+z=a, \\
x^{2}+y^{2}+z^{2}=\frac{1}{2} a^{2} .
\end{array}
$$

Find the range of values for $x, y, z$.
(1957, Beijing High School Mathematics Competition)
Solution: From (1) we get $x+y=a-z$.
$(3)^{2}-(2)$ and simplifying yields
$$
x y=\frac{1}{4} a^{2}-a z+z^{2} \text {. }
$$

From (3) and (4), we know that $x$ and $y$ are the two roots of the equation in $t$
$$
t^{2}-(a-z) t+\left(\frac{1}{4} a^{2}-a z+z^{2}\right)=0
$$

Therefore, 
$$
\Delta=(a-z)^{2}-4\left(\frac{1}{4} a^{2}-a z+z^{2}\right) \geqslant 0 \text {. }
$$

Solving this, we get $0 \leqslant z \leqslant \frac{2}{3} a .(a>0)$
Similarly, $0 \leqslant x \leqslant \frac{2}{3} a, 0 \leqslant y \leqslant \frac{2}{3} a$.