Example 7. Find the residue of the function

$$
f(z)=\cos z \sin \frac{1}{z}
$$

at its singular point $z=0$.
Solution. To determine the nature of the singular point, we expand the given function into a Laurent series in the neighborhood of the point $z=0$. We have

$$
\begin{aligned}
& \cos z=1-\frac{z^{2}}{2!}+\frac{z^{4}}{4!}-\ldots \\
& \sin \frac{1}{z}=\frac{1}{z}-\frac{1}{3!z^{3}}+\frac{1}{5!z^{5}}-\ldots
\end{aligned}
$$

Multiplying these series, we get

$$
\begin{aligned}
f(z) & =\cos z \sin \frac{1}{z}=\left(1-\frac{z^{2}}{2!}+\frac{z^{4}}{4!}-\ldots\right)\left(\frac{1}{z}-\frac{1}{3!z^{3}}+\frac{1}{5!z^{5}}-\ldots\right)= \\
& =\left(1+\frac{1}{2!3!}+\frac{1}{4!5!}+\ldots\right) \frac{1}{z}- \\
& -\left(\frac{1}{0!3!}+\frac{1}{2!5!}+\frac{1}{4!7!}+\ldots\right) \frac{1}{z^{3}}+\ldots+\text { regular part }
\end{aligned}
$$

Thus, the Laurent series in the neighborhood of the point $z=0$ is

$$
\cos z \sin \frac{1}{z}=\sum_{n=0}^{\infty} \frac{1}{(2 n)!(2 n+1)!} \frac{1}{z}+c_{-3} \frac{1}{z^{3}}+\ldots+\text { regular part, }
$$

where $c_{-(2 k-1)} \neq 0, k=1,2, \ldots$

The principal part of the Laurent series contains an infinite number of terms, which means that the point $z=0$ is an essential singularity of the function. The required residue is

$$
\operatorname{res}_{z=0}\left(\cos z \sin \frac{1}{z}\right)=c_{-1}=\sum_{n=0}^{\infty} \frac{1}{(2 n)!(2 n+1)!}
$$