Example 16 (1992 National High School League Question) The maximum value of the function $f(x)=\sqrt{x^{4}-3 x^{2}-6 x+13}-$ $\sqrt{x^{4}-x^{2}+1}$ is
Solve: Fill in $\sqrt{10}$. Reason: From $f(x)=\sqrt{(x-3)^{2}+\left(x^{2}-2\right)^{2}}-$ $\sqrt{x^{2}+\left(x^{2}-1\right)^{2}}$, we know that $f(x)$ represents the difference in distances from a point on the parabola $y=x^{2}$ to two points $A(3,2)$ and $B(0,1)$.

As shown in Figure 6-5, since $A$ is below the parabola and $B$ is above the parabola, the line $A B$ intersects the parabola. The intersection points are determined by the system of equations
$$
\left\{\begin{array}{l}
y=x^{2} \\
y-1=\frac{2-1}{3-0} x
\end{array}\right.
$$

Eliminating $y$ yields $3 x^{2}-x-3=0$. Since the constant term is less than zero, the equation must have a negative real root. Let the point corresponding to the negative real root be $C$. Then
$$
f(x)=|P A|-|P B| \leqslant|A B|=\sqrt{3^{2}+(2-1)^{2}}=\sqrt{10} \text {, }
$$

with equality holding if and only if $P$ coincides with $C$. Therefore, the maximum value of $f(x)$ is $\sqrt{10}$.