Example 10. Find $\lim _{x \rightarrow \pi} \frac{\sin ^{2} x}{1+\cos ^{3} x}$.
Solution. Factoring the numerator and the denominator and canceling the factor $1+\cos x \neq 0$, we get

$$
\begin{gathered}
\lim _{x \rightarrow \pi} \frac{\sin ^{2} x}{1+\cos ^{3} x}=\lim _{x \rightarrow \pi} \frac{1-\cos ^{2} x}{1+\cos ^{3} x}=\lim _{x \rightarrow \pi} \frac{(1+\cos x)(1-\cos x)}{(1+\cos x)\left(1-\cos x+\cos ^{2} x\right)}= \\
=\lim _{x \rightarrow \pi} \frac{1-\cos x}{1-\cos x+\cos ^{2} x}=\frac{1-(-1)}{1-(-1)+(-1)^{2}}=\frac{2}{3}
\end{gathered}
$$