I need to find the residue at $z= -1$ and $z=-2$ of the following function:
$$f(z) = \frac{\pi \cot(\pi z)}{(z+1)(z+2)}$$
I now that $f(z)$ has a double pole at $z=-1$ because $\sin(-\pi) = 0 $. Now for a double pole the residue should be: $$\lim\limits_{z \to -1} \frac{d}{dz} \frac{(z+1) \pi \cot(\pi z)}{z+2}$$
However evaluating the differentiation of that term can be quite annoying especially if you don't remember the "formula" for $\cot(z)$. Is there a more simple to evaluate this?
I know that the answer should be $-1$ (checked with Maple)
A series expansion is probably the quickest way here. An important sum identity for cotangent is: $$ \pi \cot(\pi z) = \frac{1}{z} +2z \sum_{n=1}^{\infty}\frac{1}{z^2-n^2} = \frac{1}{z}+\frac{2z}{z^2-1} +\frac{2z}{z^2-4}+\frac{2z}{z^2-9}+\cdots $$Let $f(z) = \frac{\pi \cot(\pi z)}{(z+1)(z+2)}$. Each singularity is a double pole, so to compute the residues we have $$ \text{Res}(f(z);z=-1) = \lim_{z\to -1} \frac{2z}{(z^2-1)(z+1)(z+2)}\cdot \frac{(z+1)^2}{1!} = \lim_{z\to -1}\frac{2z}{(z-1)(z+2)}=-1 $$The residue at $z=-2$ is computed similarly and is found to be $-1$ as well.