Cotangent expansion to compute infinite products At the end of class my professor remarked that the infinite product expansion of cotangent, 
$$\text{cot}(z)=\frac{1}{z}+\prod \frac{2z}{z^2-n^2\pi^2}$$
can be used to compute infinite products like $\prod \frac{1}{n^2+1}$,$\prod \frac{1}{n^2+a^2}$. I'm assuming I'd substitute in some value for $z$ and the whole thing would pop up. But, I can't figure out how to get rid of the negative sign and its driving me crazy.

Let $z = \pi i a$. Then 
\begin{align*}
\cot (\pi i a) &= \frac{1}{\pi i a} + \prod \frac{2\pi i a}{i^2 \pi^2 a^2 - n^2 \pi^2}\\
- i \coth (\pi a) &= - \frac{i}{\pi a} - \frac{2 i a}{\pi} \prod \frac{1}{a^2 + n^2}\\
\frac{2 a}{\pi} \prod \frac{1}{a^2 + n^2} &= \coth (\pi a) - \frac{1}{\pi a} \\
\prod \frac{1}{a^2 + n^2} &= \frac{\pi}{2a} \coth (\pi a) - \frac{1}{2 a^2}.
\end{align*}
