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

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

When $k \geqslant 1$, as long as $2 \times 1>\frac{k+2}{3}$, i.e., $1 \leqslant k1$, i.e., $-\frac{1}{2}<k<1$

Therefore, $-\frac{1}{2}<k<4$ is the solution.