Example 1. Find the residues at the singular points of the function

$$
f(z)=\frac{\tan z}{z^{2}-\pi z / 4}
$$
SOLUTION. Let's represent the function $f(z)$ as

$$
f(z)=\frac{\operatorname{tg} z}{z^{2}-\pi z / 4}=\frac{\sin z}{z \cos z(z-\pi / 4)}
$$

1. We find the isolated singular points of the function $f(z)$. The singular points of the function are the zeros of the denominator, i.e.

$$
z=0, \quad z=\pi / 4, \quad z_{k}=\frac{\pi}{2}+\pi k, \quad k=0, \pm 1, \ldots
$$

2. We determine the type of each singular point and compute the residue at each:

$z=0$ - a removable singular point, since

$$
\lim _{z \rightarrow 0} f(z)=\lim _{z \rightarrow 0} \frac{\sin z}{z \cos z(z-\pi / 4)}=-\frac{4}{\pi}
$$

Therefore, by formula (1)

$$
\operatorname{res}_{z=0} f(z)=0 \text {. }
$$

The point $z=\pi / 4$ is a simple pole, so by formula (3)

$$
\begin{aligned}
& \operatorname{res}_{z=\pi / 4} f(z)=\lim _{z \rightarrow \pi / 4}(z-\pi / 4) f(z)= \\
& =\lim _{z \rightarrow \pi / 4} \frac{(z-\pi / 4) \operatorname{tg} z}{z(z-\pi / 4)}=\lim _{z \rightarrow \pi / 4} \frac{\operatorname{tg} z}{z}=4 / \pi
\end{aligned}
$$

The points $z_{k}=\pi / 2+\pi k$ are simple poles of the function $f(z)$. Let's represent $f(z)$ as

$$
f(z)=\frac{\frac{\sin z}{z^{2}-\pi z / 4}}{\cos z}=\frac{\varphi(z)}{\psi(z)}
$$

where $\varphi(z)$ and $\psi(z)$ are analytic at the points $z_{k}=\pi / 2+\pi k$ and

$$
\varphi\left(z_{k}\right)=\frac{\sin z_{k}}{z_{k}^{2}-\pi z_{k} / 4} \neq 0, \quad \psi\left(z_{k}\right)=\cos z_{k}=0, \quad \psi^{\prime}\left(z_{k}\right)=-\sin z_{k} \neq 0
$$

Therefore, by formula (4)

$$
\begin{aligned}
& \operatorname{res}_{z=z_{k}} f(z)=\frac{\frac{\sin z_{k}}{z_{k}\left(z_{k}-\pi / 4\right)}}{-\sin z_{k}}= \\
& =\frac{\frac{\sin (\pi / 2+\pi k)}{(\pi / 2+\pi k)(\pi / 2+\pi k-\pi / 4)}}{-\sin (\pi / 2+\pi k)}=-\frac{1}{(\pi / 2+\pi k)(\pi / 4+\pi k)} . \\
& \text { Answer. } \operatorname{res}_{z=0} \frac{\operatorname{tg} z}{z^{2}-\pi z / 4}=0, \quad \operatorname{res}_{z=\pi / 4} \frac{\operatorname{tg} z}{z^{2}-\pi z / 4}=\frac{4}{\pi} \\
& \operatorname{res}_{z=\pi / 2+\pi k} \frac{\operatorname{tg} z}{z^{2}-\pi z / 4}=-\frac{1}{(\pi / 2+\pi k)(\pi / 4+\pi k)} .
\end{aligned}
$$