up and have the same residue. Thus, $f(z)-\csc(z)$ has no poles. Therefore, $f(z)-\csc(z)$ is $2\pi$-periodic, has no poles, and $\lim\limits_{\operatorname{Im}(z)\to\pm\infty}f(z)-\csc(z)=0$ implies $f(z)-\csc(z)$ is bounded. By Liouville's Theorem , $f(z)-\csc(z)$ is a constant, which must be $0$. Thus, $$ \frac1z+2z\sum_{n=1}^\infty\frac{(-1)^n}{z^2-\pi^2n^2}=\csc(z)\tag{4} $$ share | improve this answer answered Mar 10 at 22:48 robjohn ♦