Example 5. Find $\lim _{x \rightarrow-1} \frac{3 x^{4}+2 x^{3}-x^{2}+5 x+5}{x^{3}+1}$.
Solution. When $x=-1$, both the numerator and the denominator become zero. Factoring them, we find

\[
\begin{gathered}
x^{3}+1=(x+1)\left(x^{2}-x+1\right) \\
3 x^{4}+2 x^{3}-x^{2}+5 x+5=(x+1)\left(3 x^{3}-x^{2}+5\right)
\end{gathered}
\]

The second equality is obtained by directly dividing $3 x^{4}+2 x^{3}-x^{2}+5 x+5$ by $(x+1)$. By canceling the common factor $(x+1) \neq 0$ in the numerator and the denominator and taking the limit, we get

\[
\begin{gathered}
\lim _{x \rightarrow-1} \frac{3 x^{4}+2 x^{3}-x^{2}+5 x+5}{x^{3}+1}=\lim _{x \rightarrow-1} \frac{3 x^{3}-x^{2}+5}{x^{2}-x+1}= \\
=\frac{3(-1)^{3}-(-1)^{2}+5}{(-1)^{2}-(-1)+1}=\frac{1}{3}
\end{gathered}
\]

Remark. To resolve the indeterminate form of $\frac{0}{0}$ given by the ratio of two polynomials, one should factor out the critical factor (i.e., the factor that equals zero at the limiting value of $x$) in both the numerator and the denominator and cancel it.