How to evaluate $\int_C e^z\cot(4z)dz$ where $|z|=1$

Solution 1:

In the region of $\Bbb C$ bounded by $C$ (which is the open disk with center $0$ and radius $1$), $e^z\cot(4z)$ has three poles, at $0$ and at $\pm\frac\pi4$. And therefore, by the residue theorem,\begin{multline}\oint_{|z|=1}e^z\cot(4z)\,\mathrm dz=\\=2\pi i\left(\operatorname{res}_{z=-\pi/4}\bigl(e^z\cot(4z)\bigr)+\operatorname{res}_{z=0}\bigl(e^z\cot(4z)\bigr)+\operatorname{res}_{z=\pi/4}\bigl(e^z\cot(4z)\bigr)\right)=\\=2\pi i\left(\frac{e^{-\pi/4}}4+\frac14+\frac{e^{\pi/4}}4\right)=\frac{\pi i}2\left(e^{-\pi/4}+1+e^{\pi/4}\right).\end{multline}