TITLE: Residue of $f(z) = \frac{z-1}{1+\cos(\pi z)}$ at $z=2k+1$
QUESTION [5 upvotes]: How can i compute the residue of:
$$f(z) = \frac{z-1}{1+\cos(\pi z)}$$ 
at $z_k=2k+1, k\neq 0$.

REPLY [2 votes]: Set $w=z-(2k+1)$, then at $z=2k+1$, $w=0$.
$$
\begin{align}
\frac{w+(2k+1)-1}{1-\cos(\pi w)}
&=(w+(2k+1)-1)\frac1{\frac{\pi^2}{2}w^2+O\left(w^4\right)}\\
&=(w+2k)\frac1{w^2}\left(\frac2{\pi^2}+O\left(w^2\right)\right)\\
&=\frac{4k}{\pi^2}\frac1{w^2}+\frac2{\pi^2}\frac1w+O(1)
\end{align}
$$
Thus, the residue at $w=0$, aka $z=2k+1$, is $\frac2{\pi^2}$.