Example 7 When $x$ varies, the minimum value of the fraction $\frac{3 x^{2}+6 x+5}{\frac{1}{2} x^{2}+x+1}$ is $\qquad$
(1993, National Junior High School Competition)
Let $y=\frac{3 x^{2}+6 x+5}{\frac{1}{2} x^{2}+x+1}$. Then,
$$
\left(3-\frac{1}{2} y\right) x^{2}+(6-y) x+(5-y)=0 \text {. }
$$

Since $x$ is a real number, $\Delta \geqslant 0$, so,
$$
y^{2}-10 y+24 \leqslant 0 \text {. }
$$

Thus, $4 \leqslant y \leqslant 6$.
When $y=4$, $x=1$.
Therefore, when $x=1$, the minimum value of the original expression is 4.