Example 3 (Self-created problem, 1988.11.03) Let $x \in \mathbf{R}, a \geqslant 1$ be a constant, then
$$|\sin x \cdot(\cos x+a)| \leqslant \sqrt{\frac{-a^{2}+20 a+8+\left(a^{3}+8 a\right) \sqrt{a^{2}+8}}{32}}$$
Introducing the parameter $\lambda$, then
$$\begin{aligned}
{[\sin x \cdot(\cos x+a)]^{2}=} & \frac{\sin ^{2} x}{\lambda^{2}} \cdot(\lambda \cos x+\lambda a)^{2} \leqslant \\
& \frac{\sin ^{2} x}{\lambda^{2}} \cdot\left(\lambda^{2}+a^{2}\right)\left(\cos ^{2} x+\lambda^{2}\right)= \\
& \frac{\lambda^{2}+a^{2}}{\lambda^{2}} \sin ^{2} x \cdot\left(\cos ^{2} x+\lambda^{2}\right) \leqslant \\
& \frac{\lambda^{2}+a^{2}}{\lambda^{2}} \cdot\left(\frac{1+\lambda^{2}}{2}\right)^{2}
\end{aligned}$$

By the condition for equality in the inequality, let
$$\left\{\begin{array}{l}
\frac{\cos x}{\lambda}=\frac{\lambda}{a} \\
\sin ^{2} x=\cos ^{2} x+\lambda^{2}
\end{array}\right.$$

Solving for $\lambda^{2}=\frac{1}{4}\left(-a^{2}+a \sqrt{a^{2}+8}\right)$, we get
$$\frac{\lambda^{2}+a^{2}}{\lambda^{2}} \cdot\left(\frac{1+\lambda^{2}}{2}\right)=\frac{-a^{2}+20 a+8+\left(a^{3}+8 a\right) \sqrt{a^{2}+8}}{32}$$

Thus, we obtain equation (3).