Example 8 Find the largest real number $\lambda$ such that for a polynomial with real coefficients $f(x)=x^{3}+a x^{2}+b x+c$ whose all roots are non-negative real numbers, if $x \geqslant 0$, then
$$
f(x) \geqslant \lambda(x-a)^{3},
$$

and ask when the equality holds in this inequality?
(1999, China Mathematical Olympiad)
Explanation: First, sort the three roots of $f(x)$, then classify and solve for $x$ by intervals.

Let the three roots of $f(x)$ be $\alpha, \beta, \gamma (0 \leqslant \alpha \leqslant \beta \leqslant \gamma)$. By the relationship between roots and coefficients, we have
$$
\begin{array}{l}
\alpha+\beta+\gamma=-a, \\
\alpha \beta+\beta \gamma+\gamma \alpha=b, \\
\alpha \beta \gamma=-c .
\end{array}
$$

Then $x-a=x+\alpha+\beta+\gamma$,
$$
f(x)=(x-\alpha)(x-\beta)(x-\gamma) \text {. }
$$
(1) When $0 \leqslant x \leqslant \alpha$, since
$$
-f(x)=(\alpha-x)(\beta-x)(\gamma-x) \text {, }
$$

By the arithmetic mean inequality, we get
$$
-f(x) \leqslant\left(\frac{\alpha+\beta+\gamma-3 x}{3}\right)^{3} \leqslant\left(\frac{\alpha+\beta+\gamma+x}{3}\right)^{3} \text {. }
$$

Thus, $f(x) \geqslant-\frac{1}{27}(x+\alpha+\beta+\gamma)^{3}$
$$
=-\frac{1}{27}(x-a)^{3} \text {. }
$$

Clearly, the equality holds if and only if
$$
\begin{array}{l}
\left\{\begin{array}{l}
\alpha-x=\beta-x=\gamma-x, \\
\alpha+\beta+\gamma-3 x=\alpha+\beta+\gamma+x
\end{array}\right. \\
\Leftrightarrow\left\{\begin{array}{l}
x=0, \\
\alpha=\beta=\gamma .
\end{array}\right.
\end{array}
$$
(2) When $\beta \leqslant x \leqslant \gamma$, we have
$$
\begin{array}{l}
-f(x)=(x-\alpha)(x-\beta)(\gamma-x) \\
\leqslant\left(\frac{x-\alpha-\beta+\gamma}{3}\right)^{3} \leqslant\left(\frac{x+\alpha+\beta+\gamma}{3}\right)^{3} . \\
\text { Hence } f(x) \geqslant-\frac{1}{27}(x+\alpha+\beta+\gamma)^{3} \\
=-\frac{1}{27}(x-a)^{3} .
\end{array}
$$

Thus, $f(x) \geqslant-\frac{1}{27}(x+\alpha+\beta+\gamma)^{3}$

It is easy to see that the equality holds if and only if
$$
\begin{array}{l}
\left\{\begin{array}{l}
x-\alpha=x-\beta=\gamma-x, \\
x-\alpha-\beta+\gamma=x+\alpha+\beta+\gamma
\end{array}\right. \\
\Leftrightarrow\left\{\begin{array}{l}
\gamma=2 x, \\
\alpha=\beta=0 .
\end{array}\right.
\end{array}
$$
(3) When $\alpha < x < \beta$, we have
$$
f(x)>0 \geqslant-\frac{1}{27}(x-a)^{3} \text {. }
$$

In summary, the required $\lambda_{\text {max }}=-\frac{1}{27}$, and the equality holds if and only if $x=0, \alpha=\beta=\gamma$ or $\gamma=2 x, \alpha=\beta=0$.

Note: To find the maximum value using the arithmetic mean inequality, the conditions "one positive, two fixed, and three equal" must be satisfied. To meet these conditions, the intervals for $x$ are discussed here.