9. (16 points) Let the domain of $f(x)$ be $[0,+\infty)$, and $f\left(\lg \left(1+\tan ^{2} x\right)\right)=\cos 2 x$. Solve the inequality
$$
f\left(x^{2}-1\right) \geqslant 1 \text {. }
$$
$$
\begin{array}{l}
\text { II. 9. Let } t=\lg \left(1+\tan ^{2} x\right) \text {. Then } \\
t \geqslant 0 \text {, } \\
10^{t}=1+\tan ^{2} x=\frac{1}{\cos ^{2} x} \Rightarrow \cos ^{2} x=10^{-t} \\
\Rightarrow \cos 2 x=2 \cos ^{2} x-1=2 \times 10^{-t}-1 .
\end{array}
$$

Then $f(t)=2 \times 10^{-t}-1$ is decreasing on the interval $[0,+\infty)$.
$$
\begin{array}{l}
\text { Also, } f(0)=2 \times 10^{0}-1=1 \text {, thus, } \\
f\left(x^{2}-1\right) \geqslant 1 \Leftrightarrow 0 \leqslant x^{2}-1 \leqslant 0 \Leftrightarrow x= \pm 1 .
\end{array}
$$

Therefore, the solution set of $f\left(x^{2}-1\right) \geqslant 1$ is $\{-1,1\}$.