Example 5 For what real number $x$ does the function $f(x)=x^{2}-x+1+\sqrt{2 x^{4}-18 x^{2}+12 x+68}$ have a minimum value? What is the minimum value?
Given $f(x)=x^{2}-x+1+\sqrt{2 x^{4}-18 x^{2}+12 x+68}$
$$
\begin{array}{l}
=x^{2}-x+1+\sqrt{2(x+3)^{2}+2\left(x^{2}-5\right)^{2}} \\
=x^{2}-x+1+\sqrt{2} \cdot \sqrt{(x+3)^{2}+\left(x^{2}-5\right)^{2}} \\
=\sqrt{2}\left[\frac{x^{2}-x+1}{\sqrt{2}}+\sqrt{(x+3)^{2}+\left(x^{2}-5\right)^{2}}\right] .
\end{array}
$$

Thus, the above expression can be seen as the sum of two distances:
The distance from a moving point $P\left(x, x^{2}\right)$ on the parabola $y=x^{2}$ to the line $y=x-1$
$$
|P Q|=\frac{\left|x-x^{2}-1\right|}{\sqrt{1^{2}+(-1)^{2}}}=\frac{\left|x^{2}-x+1\right|}{\sqrt{2}} \text {, }
$$

and the distance from the moving point $P\left(x, x^{2}\right)$ to the fixed point $(-3,5)$
$$
|P M|=\sqrt{[x-(-3)]^{2}+\left(x^{2}-5\right)^{2}}=\sqrt{(x+3)^{2}+\left(x^{2}-5\right)^{2}} \text {. }
$$

As shown in Figure 5-2, when $|P Q|+| P M|$ is minimized, points $M, P, Q$ are collinear, and this line is the line $l: y=-x+2$ passing through point $M$ and perpendicular to the line $y=x-1$.

Therefore, the minimum value of $|P Q|+|P M|$ is the distance from point $M$ to the line $y=x-1$, which is $\left|\frac{-3-5-1}{\sqrt{1^{2}+(-1)^{2}}}\right|=\frac{9}{2} \sqrt{2}$.

At this time, the intersection points of the line $y=-x+2$ and the parabola are $P_{1}(-2,4)$ and $P_{2}(1,1)$. Hence, when $x=-2$ or $x=1$, the minimum value of the function $f(x)$ is
$$
f(x)_{\min }=\sqrt{2} \cdot \frac{9}{2} \sqrt{2}=9 .
$$