Example 2. Find the range of the function $y=\frac{x+1}{x^{2}+x+1}$.
Solve the inequality system $-3 y^{2}+2 y+1 \geqslant 0, y \neq 0$. The solution set is $-\frac{1}{3} \leqslant y \leqslant 1, y \neq 0$. However, when $x=-1$, $y=0$. By including $\{0\}$, the range becomes $-\frac{1}{3} \leqslant y \leqslant 1$.
2. $b^{2}-4 a c \geqslant 0$. In this case, $a x^{2}+b x+c$ has roots $x_{1}, x_{2}$. If $x_{1}, x_{2}$ are not roots of $d x+e=0$, then it can be handled similarly to 1. If $x_{1}, x_{2}$ are at least one root of $d x+e=0$, then it is transformed into the form $y=\frac{f}{r x+s}$. If $f=0$, the range is $\{0\}$. If $f \neq 0$, find the range by determining the domain of the inverse function.

If $a=0$, the function is transformed into $y=\frac{m x^{2}+n x+p}{b x+c}$. If $m=0$ or $b x+c$ is a factor of the numerator, then it is transformed into $y=\frac{n x+p}{b x+c}$ or $y=k x+l$, and the range can be found using the method of finding the domain of the inverse function. Otherwise, it is
$$
m x^{2}+(n-b y) x+p-y c=0,
$$

The range of $y$ can be found by solving the inequality $(n-b y)^{2}-4 m(p-y c) \geqslant 0$.