9. (2000 National High School Mathematics League Test) The range of negative values of $a$ that make the inequality $\sin ^{2} x+a \cos x+a^{2} \geqslant 1+\cos x$ hold for all $x \in$ $\mathbf{R}$ is $\qquad$.
9. Solution The original inequality can be transformed into $\left(\cos x-\frac{a-1}{2}\right)^{2} \leqslant a^{2}+\frac{(a-1)^{2}}{4}$.

Since $-1 \leqslant \cos x \leqslant 1, a<0, \frac{a-1}{2}<0$,
when $\cos x=1$, the function $y=\left(\cos x-\frac{a-1}{2}\right)^{2}$ has the maximum value $\left(1-\frac{a-1}{2}\right)^{2}$, thus we have $\left(1-\frac{a-1}{2}\right)^{2} \leqslant a^{2}+\frac{(a-1)^{2}}{4}$, simplifying gives $a^{2}+a-2 \geqslant 0$, so $a \geqslant 1$ or $a \leqslant-2$, and since $a<0$, we have $a \leqslant-2$.