Example 6 Real numbers $a, b, c$ and a positive number $\lambda$, such that $f(x)=x^{3}+a x^{2}+b x+c$ has three real roots $x_{1}, x_{2}$, $x_{3}$, and satisfies (1) $x_{2}-x_{1}=\lambda$; (2) $x_{3}>\frac{1}{2}\left(x_{1}+x_{2}\right)$. Find the maximum value of $\frac{2 a^{3}+27 c+9 a b}{\lambda^{3}}$.
Solution 1 Let $x_{1}=m-\frac{\lambda}{2}, x_{2}=m+\frac{\lambda}{2}$, then $x_{3}>\frac{1}{2}\left(x_{1}+x_{2}\right)=m$, let $x_{3}=m+t, t>0$. By Vieta's formulas, we have
$$
\left\{\begin{array}{l}
a=-\left(x_{1}+x_{2}+x_{3}\right)=-(3 m+t) \\
b=x_{1} x_{2}+x_{2} x_{3}+x_{3} x_{1}=3 m^{2}+2 m t-\frac{\lambda^{2}}{4} \\
c=-x_{1} x_{2} x_{3}=-m^{3}-m^{2} t+\frac{\lambda^{2}}{4} m+\frac{\lambda^{2}}{4} t
\end{array}\right.
$$

Thus, $2 a^{3}-9 a b=a\left(2 a^{2}-9 b\right)=27 m^{3}+27 m^{2} t-\frac{27}{2} m \lambda^{2}-\frac{9}{4} \lambda^{2} t-2 t^{3}$,
$$
27 c=-27 m^{3}-27 m^{2} t+\frac{27}{4} m \lambda^{2}+\frac{27}{4} \lambda^{2} t .
$$

Therefore, $S=\frac{2 a^{3}+27 c-9 a b}{\lambda^{3}}=\frac{9 \lambda^{2} t-4 t^{3}}{2 \lambda^{3}}$.
Since $\lambda>0$ and we need to find the maximum value of $S$, we assume $9 \lambda^{2}-4 t^{2}>0$,
Thus, $S=\frac{1}{4 \sqrt{2} \lambda^{3}} \sqrt{\left(9 \lambda^{2}-4 t^{2}\right)\left(9 \lambda^{2}-4 t^{2}\right) \cdot 8 t^{2}}$
$$
\leqslant \frac{1}{4 \sqrt{2} \lambda^{3}} \cdot \sqrt{\left[\frac{2\left(9 \lambda^{2}-4 t^{2}\right)+8 t^{2}}{3}\right]^{3}}=\frac{3 \sqrt{3}}{2} .
$$

Equality holds when $9 \lambda^{2}-4 t^{2}=8 t^{2}$, i.e., $t=\frac{\sqrt{3}}{2} \lambda$ (at this point, $9 \lambda^{2}-4 t^{2}>0$). 
If we set $m=0, \lambda=2$, then $x_{1}=-1, x_{2}=1, x_{3}=\sqrt{3}$.
Thus, when $a=-c=-\sqrt{3}, b=-1$, $S$ reaches its maximum value $\frac{3 \sqrt{3}}{2}$.
Solution 2 Let $x_{3}=\frac{1}{2}\left(x_{1}+x_{2}\right)+t(t>0)$, by Vieta's formulas, we have
$$
\begin{array}{l}
\frac{2 a^{3}+27 c-9 a b}{\lambda^{3}} \\
=\frac{-2\left(x_{1}+x_{2}+x_{3}\right)^{3}-27 x_{1} x_{2} x_{3}+9\left(x_{1}+x_{2}+x_{3}\right)\left(x_{1} x_{2}+x_{2} x_{3}+x_{3} x_{1}\right)}{\lambda^{3}} \\
=\frac{\left(x_{1}+x_{2}-2 x_{3}\right)\left(x_{2}+x_{3}-2 x_{1}\right)\left(x_{3}+x_{1}-2 x_{2}\right)}{\lambda^{3}} \\
=\frac{t(2 t+3 \lambda)(3 \lambda-2 t)}{2 \lambda^{3}} \\
\left.=\frac{1}{4 \sqrt{2} \lambda^{3}} \sqrt{\left(9 \lambda^{2}-4 t^{2}\right)\left(9 \lambda^{2}-4 t^{2}\right) \cdot 8 t^{2}} \text { (assuming } 9 \lambda^{2}-4 t^{2}>0\right) \\
\leqslant \frac{1}{4 \sqrt{2} \lambda^{3}} \sqrt{\left[\frac{2\left(9 \lambda^{2}-4 t^{2}\right)+8 t^{2}}{3}\right.} \\
=\frac{3 \sqrt{3}}{2} .
\end{array}
$$

Equality holds when $t=\frac{\sqrt{3}}{2} \lambda$. At this point, let $x_{2}>x_{1}$, and set $x_{3}=\frac{1}{2}\left(x_{1}+x_{2}\right)+\frac{\sqrt{3}}{2}\left(x_{2}-x_{1}\right)$, then we have $a=-\frac{3}{2}\left(x_{1}+x_{2}\right)-\frac{\sqrt{3}}{2}\left(x_{2}-x_{1}\right)$,
$$
\begin{array}{l}
b=\frac{\left(x_{1}+x_{2}\right)^{2}+\sqrt{3}\left(x_{2}^{2}-x_{1}^{2}\right)}{2}+x_{1} x_{2}, \\
c=\frac{-x_{1} x_{2}\left(x_{1}+x_{2}\right)-\sqrt{3} x_{1} x_{2}\left(x_{2}-x_{1}\right)}{2} .
\end{array}
$$

Thus, the maximum value of $\frac{2 a^{3}+27 c-9 a b}{\lambda^{3}}$ is $\frac{3 \sqrt{3}}{2}$.
Solution 3 Notice that the numerator of the original expression
$$
\begin{aligned}
2 a^{3}+27 c-9 a b & =27\left[\left(-\frac{a}{3}\right)^{3}+a \cdot\left(-\frac{a}{3}\right)^{2}+b \cdot\left(-\frac{a}{3}\right)+c\right] \\
& =27 f\left(-\frac{a}{3}\right)=27\left(-\frac{a}{3}-x_{1}\right)\left(-\frac{a}{3}-x_{2}\right)\left(-\frac{a}{3}-x_{3}\right) \\
& =\left(-a-3 x_{1}\right)\left(-a-3 x_{2}\right)\left(-a-3 x_{3}\right)
\end{aligned}
$$

Since $-a=x_{1}+x_{2}+x_{3}$, then
the numerator of the original expression $=\left(x_{2}+x_{3}-2 x_{1}\right)\left(x_{3}+x_{1}-2 x_{2}\right)\left(x_{1}+x_{2}-2 x_{3}\right)$.

Let $x_{2}=x_{1}+2 m, x_{3}=x_{1}+m+n$, where $m>0, n>0$, then
the numerator of the original expression $=(3 m+n)(3 m-n) \cdot 2 n=2 n\left(9 m^{2}-n^{2}\right)$.
Thus, the original expression $=\frac{1}{4}\left[9\left(\frac{n}{m}\right)-\left(\frac{n}{m}\right)^{3}\right]$.

Let $\frac{n}{m}=t, t>0$, then the original expression $=\frac{1}{4}\left(9 t-t^{3}\right)$.
Let $g(t)=9 t-t^{3}, t>0$, it is easy to prove that $g(t)$ is an increasing function on $(0, \sqrt{3}]$ and a decreasing function on $[\sqrt{3},+\infty)$. Therefore, when $t=\sqrt{3}$, $g(t)$ reaches its maximum value $6 \sqrt{3}$. At this point, the original expression has a maximum value of $\frac{3 \sqrt{3}}{2}$ (it is easy to verify that the maximum value can be achieved).