6. The maximum value of the function $f(x)=\sqrt{x^{4}-3 x^{2}-6 x+13}-\sqrt{x^{4}-x^{2}+1}$ is

保留了源文本的换行和格式。
$\sqrt{10}$
6.【Analysis and Solution】Given $f(x)=\sqrt{x^{4}-3 x^{2}-6 x+13}-\sqrt{x^{4}-x^{2}+1}$
$$
=\sqrt{(x-3)^{2}-\left(x^{2}-2\right)^{2}}-\sqrt{x^{2}+\left(x^{2}-1\right)^{2}}
$$

It can be seen that the geometric meaning of the function $y=f(x)$ is:
The difference in distances from a point $P\left(x, x^{2}\right)$ on the parabola $y=x^{2}$ to points $A(3,2)$ and $B(0,1)$.
Since point $A$ is below the parabola and point $B$ is above the parabola, the line $A B$ intersects the parabola, and the intersection point is given by the negative root of the system of equations.

Because the difference between two sides of a triangle is less than the third side, when point $P$ is located at the intersection point $C$ corresponding to the negative root, $f(x)$ has a maximum value of $|A B|=\sqrt{10}$.