<s>[INST] Partial fraction decomposition of $\pi\cdot \tan(\pi z)$ 
Evaluate the partial fraction decomposition of $\pi \tan(\pi z)$ 

$$2\pi \tan(\pi z)=\cot\left(\frac{\pi}{2}-\pi z\right)-\cot\left(\frac{\pi}{2}+\pi z\right)$$ $$=\frac{2}{1-2z}+\sum_{k=1}^\infty \frac{1-2z}{(\frac{1}{2}-z)^2-k^2}-\frac{2}{1+2z}-\sum_{k=1}^\infty \frac{1+2z}{(\frac{1}{2}-z)^2-k^2}$$
$$=\frac{8z}{1-4z^2}+\sum_{k=1}^\infty \frac{4-8z}{1-2z+4z^2-4k^2}-\sum_{k=1}^\infty \frac{4+8z}{1+2z+4z^2-4k^2}$$
I know that the result should be $$\pi \tan(\pi z)=\sum_{k=1}^\infty \frac{8z}{(2k+1)^2-4z^2}$$ but I dont know how to get there.
Any suggestions?
 [/INST] You may exploit the fact that $\tan(z)=\frac{d}{dz}\log(\cos z)$ and:
$$ \cos(z)=\prod_{n\geq 0}\left(1-\frac{4z^2}{(2n+1)^2\pi^2}\right)\tag{1}$$
(Weierstrass product) so:
$$ \tan(z) = \sum_{n\geq 0}\frac{-8z}{4z^2-(2n+1)^2\pi^2}\tag{2}$$
and:
$$\begin{eqnarray*}\pi\tan(\pi z) = \sum_{n\geq 0}\frac{-2z}{z^2-\left(\frac{2n+1}{2}\right)^2}&=&-\sum_{n\geq 0}\left(\frac{1}{z-\frac{2n+1}{2}}+\frac{1}{z+\frac{2n+1}{2}}\right)\\&=&\color{red}{\sum_{m\in\frac{1}{2}+\mathbb{Z}}\frac{-1}{z-m}}.\tag{3}\end{eqnarray*}$$
On the other hand, every singularity of $\pi\tan(\pi z)$ is a simple pole and lie in $\frac{1}{2}+\mathbb{Z}$, and for every $m$ that belongs to such a set:
$$ \text{Res}\left(\pi\tan(\pi z),z=m\right)=\lim_{z\to m}\frac{\pi\sin(\pi z)(z-m)}{\cos(\pi z)}\stackrel{DH}{=}\lim_{z\to m}\frac{\pi\sin(\pi z)}{-\pi \sin(\pi z)}=\color{red}{-1},\tag{4}$$
giving another proof of $(3)$.
</s>