For example, $5 y=\frac{3 x^{2}+3 x+4}{x^{2}+x+1}$, the maximum value is ( . ).
(A) $4 \frac{1}{3}$
(B) 4
(C) $3 \frac{3}{4}$
(D) 3
(1992, Shandong Province Junior High School Mathematics Competition)
Solution: The given equation can be transformed into a quadratic equation in $x$: $(y-3) x^{2}+(y-3) x+(y-4)=0$.
According to the problem, we have
$$
\begin{array}{c}
\Delta=(y-3)^{2}-4(y-3)(y-4) \geqslant 0 . \\
\because y-3=\frac{3 x^{2}+3 x+4}{x^{2}+x+1}-3 \\
=\frac{1}{\left(x+\frac{1}{2}\right)^{2}+\frac{3}{4}}>0,
\end{array}
$$
$\therefore \Delta \geqslant 0$ is transformed into $(y-3)-4(y-4)=0$.
Solving this, we get $y \leqslant 4 \frac{1}{3}$.
Therefore, the maximum value of $y$ is $4 \frac{1}{3}$. Option (A) should be selected.
Note: To find the extremum of a function, it is usually first transformed into a quadratic equation in terms of the independent variable, and then the extremum can be found using the discriminant.