Example 5 Let $x, y, z, w$ be four real numbers, not all zero. Find:
$S=\frac{x y+2 y z+z w}{x^{2}+y^{2}+z^{2}+w^{2}}$'s maximum value.
Notice that, in the given function expression, swapping $x$ with $w$ and $y$ with $z$ leaves the expression unchanged. Thus, by the mean value inequality with parameter $\lambda$, we have
$$
2 x y \leqslant \lambda x^{2}+\frac{1}{\lambda} y^{2}, \quad 2 z w \leqslant \lambda w^{2}+\frac{1}{\lambda} z^{2}, \quad 2 y z \leqslant y^{2}+z^{2},
$$

where equality holds if and only if $y=\lambda x, z=\lambda w, y=z$.
Therefore, $x y+2 y z+z w \leqslant \frac{\lambda}{2} x^{2}+\left(\frac{1}{2 \lambda}+1\right) y^{2}+\left(\frac{1}{2 \lambda}+1\right) z^{2}+\frac{\lambda}{2} w^{2}$.
To make the right-hand side symmetric so that it can cancel out with the denominator of $S$, choose $\lambda$ such that $\frac{\lambda}{2}=\frac{1}{2 \lambda}+1$, solving this gives $\lambda=1+\sqrt{2}$. Substituting $\lambda=1+\sqrt{2}$, we get $S \leqslant \frac{1+\sqrt{2}}{2}$, where equality holds if and only if $x=w=1, y=z=1+\sqrt{2}$. Thus, the maximum value sought is $\frac{1}{2}(1+\sqrt{2})$.