Let be $a\in\mathbb C\setminus\mathbb Z$ a fixed complex number, and define the following function:
$f(z)=\frac{a\pi\cot\pi z}{z(a-z)}$ It has simple poles in $z\in\mathbb Z\setminus\{0\}$ and in $z=a$, and a double pole in $z=0$. my textbook says that it is straightforward that:
$\operatorname{Res}(f,n)=\frac{a}{n(a-n)}\;\;$ for $n\in\mathbb Z\setminus\{0\}$
$\operatorname{Res}(f,a)=-\pi\cot\pi a$
$\operatorname{Res}(f,0)=\frac{1}{a}$
but I don't understand why these fact are true.