Example 4 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)
Since $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}},
$$

if we let $A(3,2), B(0,1), P\left(x, x^{2}\right)$, then $f(x)=|P A|-|P B|$.
Thus, the problem is transformed into finding a point $P$ on the parabola $y=x^{2}$ such that $|P A|-|P B|$ is maximized.

Since point $A$ is below the parabola, and point $B$ is above the parabola, the line $AB$ must intersect the parabola. The intersection points are determined by the system of equations $\left\{\begin{array}{l}y=x^{2} \\ \frac{y-1}{x-0}=\frac{2-1}{3-0}\end{array}\right.$, eliminating $y$ yields $3 x^{2}-x-3=0$.

Since the constant term of the quadratic equation in $x$ is negative, the equation must have a negative root. Also, the difference of two sides of a triangle is less than the third side, so when point $P$ is at the intersection point corresponding to the negative root, $f(x)$ has a maximum value of $|A B|=\sqrt{10}$.