9. (14 points) Given $f(x)=\frac{x^{4}+k x^{2}+1}{x^{4}+x^{2}+1}, k, x \in \mathbf{R}$,
(1) Find the maximum and minimum values of $f(x)$;
(2) Find all real numbers such that for any three real numbers $a$, $b$, $c$, there exists a triangle with side lengths $f(a)$, $f(b)$, $f(c)$.
9. Solution: (1) $f(x)=1+\frac{(k-1) x^{2}}{x^{4}+x^{2}+1}$, and $x^{4}+1 \geqslant$ $2 x^{2}$, so $0 \leqslant \frac{x^{2}}{x^{4}+x^{2}+1} \leqslant \frac{1}{3}$

When $k \geqslant 1$, $f(x)_{\max }=\frac{k+2}{3}, f(x)_{\min }=1$; when $kf(x)_{\max } \Rightarrow-\frac{1}{2}<k<4$.