\[\cot z=\frac{1}{z}+2z\sum_{n=1}^{\infty}\frac{1}{z^{2}-n^{2}\pi^{2}},\]