7. Find the minimum value of the function $f(x)=x^{2}-x+1+\sqrt{2 x^{4}-18 x^{2}+12 x+68}$.
7. Since $x^{2}-x+1>0$ (because $\Delta<0$), and squaring introduces an $x^{3}$ term, the distance formula between two points cannot be used.

Also, $2 x^{4}-18 x^{2}+12 x+68=2\left(x^{2}-5\right)^{2}+2(x+3)^{2}$,
then $f(x)=\sqrt{2}\left[\frac{\sqrt{2}}{2}\left(x^{2}-x+1\right)+\sqrt{\left(x^{2}-5\right)^{2}+(x+3)^{2}}=\sqrt{2}(|P Q|+|P M|)\right]$.
Let $P\left(x, x^{2}\right)$ be a point on the parabola $y=x^{2}$, and its distance to the line $y=x-1$ is $|P Q|=\frac{\left|x^{2}-x+1\right|}{\sqrt{(-1)^{2}+1^{2}}}=$
$\frac{\sqrt{2}}{2}\left|x^{2}-x+1\right|=\frac{\sqrt{2}}{2}\left(x^{2}-x+1\right)$, and the distance from point $P$ to point $M(-3,5)$ is $|P M|=\sqrt{(x+3)^{2}+\left(x^{2}-5\right)^{2}}$.
When $|P Q|+|P M|$ is minimized, points $M$, $P$, and $Q$ are collinear, and this line is the one passing through point $M$ and perpendicular to the line $y=x-1$. That is, the minimum value of $|P Q|+|P M|$ is the distance from point $M$ to the line $y=x-1$, which is $\frac{|-3-5-1|}{\sqrt{(-1)^{2}+1^{2}}}=\frac{9}{2} \sqrt{2}$. At this time, $P_{1}(-2,4)$ or $P_{2}(1,1)$, i.e., when $x=-2$ or $x=1$, the function reaches its minimum value of $\frac{9}{2} \sqrt{2}$.