Find the residue of $$ctg(z)$$
$cos(z)=\sum_{n=0}^{\infty}(-1)^n\frac{z^{2n}}{2n!}$
$sin(z)=\sum_{n=0}^{\infty}(-1)^n\frac{z^{2n+1}}{(2n+1)!}$
So $ctg(z)=\frac{cos(z)}{sin(z)}=\sum_{n=0}^{\infty}(-1)^{2n}\frac{2n+1}{z}$
And the poles are at $n\pi$ how can I find $Res(f,\pi n)?$
Do you really believe that $\cot$ is a constant function?
Anyway$$(\forall n\in\mathbb{N}):\operatorname{Res}(\cot z,n\pi)=\frac{\cos(n\pi)}{\sin'(n\pi)}=1.$$