Example 16 Find the maximum value of the function $f(x)=\sqrt{x^{4}-3 x^{2}-6 x+13}-\sqrt{x^{4}-x^{2}+1}$.
(1992 National High School League Question)
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-0)^{2}+\left(x^{2}-1\right)^{2}} \text {. }
$$

As shown in Figure 30-9, the above expression can be interpreted as: 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 (outside) the parabola and point $B$ is above (inside) the parabola, the line $AC$ intersects the parabola. The intersection point is determined by solving the equations $y=x^{2}$ and $\frac{y-1}{x-0}=\frac{2-1}{3-0}$ simultaneously. Eliminating $y$ yields $3 x^{2}-x-1=0$. Since the constant term of this equation is negative, it must have a negative root. By the triangle inequality, the difference between the lengths of two sides is less than the length of the third side. When point $P$ is at the intersection point $C$ corresponding to the negative root, $f(x)$ reaches its maximum value $|AB|=\sqrt{10}$.