Example 3. Find the range of the function $y=\frac{x^{2}+x+1}{x+2}$.
Solving $x+2$ is not a factor of $x^{2}+x+1$. Therefore, solving the inequality $(1-y)^{2}-4(1-2 y) \geqslant 0$ yields the range $(-\infty,-3-4 \sqrt{3}] \cup[3+4 \sqrt{3}$, $+\infty$).
(Author's affiliation: Tianjin Hebei District Jiaoshi Jinjin School)