Example 17 Find the minimum value of the function $f(x)=x^{2}-x+1+\sqrt{2 x^{4}-18 x^{2}+12 x+68}$.
Since $x^{2}-x+1$ is always positive (because $\Delta<0$), and noting that $f(x)=$ $\sqrt{2}\left[\frac{x^{2}-x+1}{\sqrt{2}}+\sqrt{(x+3)^{2}+\left(x^{2}-5\right)^{2}}\right]$, as shown in Figure $30-10$, the above expression can be seen as: the sum of the distances $|P Q|+|P M|$ from a moving point $P\left(x, x^{2}\right)$ on the parabola $y=x^{2}$ to the fixed line $y=x-1$ and to the point $M(-3,5)$.

When points $M, P, Q$ are collinear on line $l$, the sum $|P Q|+|P M|$ is minimized. The line $l$ is the line passing through point $M$ and perpendicular to the line $y=x-1$, which is $y=-x+2$. Solving the system of equations $y=x^{2}$ and $y=-x+2$, we get $P_{1}(-2,4), P_{2}(1,1)$. The distance from point $M$ to the line $y=x-1$ is $\left|\frac{-3-5-1}{\sqrt{1^{2}+(-1)^{2}}}\right|=\frac{9}{2} \sqrt{2}$. Therefore, when $x=-2$ or $x=1$, the function $f(x)$ attains its minimum value $\frac{9}{2} \sqrt{2}$.