Example 8. Find the residue of the function

$$
w=z^{2} \sin \frac{1}{z+1}
$$

at its singular point.
Solution. A singular point of the given function is the point $z=-1$. To determine the nature of this point, we expand the function into a Laurent series in the neighborhood of the point $z=-1$. For this, we express $z^{2}$ in terms of powers of the difference $z-(-1)=z+1$. We have

$$
z^{2}=[(z+1)-1]^{2}=(z+1)^{2}-2(z+1)+1
$$

The Laurent series for the function $\sin \frac{1}{z+1}$ in the neighborhood of the point $z=-1$ is

$$
\sin \frac{1}{z+1}=\frac{1}{z+1}-\frac{1}{3!(z+1)^{3}}+\frac{1}{5!(z+1)^{5}}-\ldots
$$

Multiplying (6) and (7), we find

$$
\begin{aligned}
v & =z^{2} \sin \frac{1}{z+1}=\left[(z+1)^{2}-2(z+1)+1\right]\left[\frac{1}{z+1}-\frac{1}{3!(z+1)^{3}}+\frac{1}{5!(z+1)^{5}}-\ldots\right]= \\
& =\left(1-\frac{1}{3!}\right) \frac{1}{z+1}+\frac{2}{3!} \frac{1}{(z+1)^{2}}+\left(\frac{1}{5!}-\frac{1}{3!}\right) \frac{1}{(z+1)^{3}}+\ldots+[-2+(z+1)]
\end{aligned}
$$

The Laurent series contains an infinite number of terms with negative powers of the sum $z+1$. Therefore, the point $z=-1$ is an essential singular point of the given function, and its residue at this point is

$$
\operatorname{res}_{z=-1} w=1-\frac{1}{3!}=\frac{5}{6}
$$