TITLE: How to derive the formula for $\sum_{n=0}^{\infty}\tan^{-1}(\frac{x^{2}}{n^{2}})$
QUESTION [6 upvotes]: How to derive the formula
  $$\sum_{n=1}^{\infty}\tan^{-1}\left(\frac{x^{2}}{n^{2}}\right)=\tan^{-1}\left[\frac{\tan\left(\frac{x\pi}{\sqrt{2}}\right)-\tanh\left(\frac{x\pi}{\sqrt{2}}\right)}{\tan\left(\frac{x\pi}{\sqrt{2}}\right)+\tanh\left(\frac{x\pi}{\sqrt{2}}\right)}\right]$$

Is the formula correct? How do I derive the above formula? I tried to apply the formula integral as the limit of sum formula.

REPLY [7 votes]: I'd start that sum at $n=1$ if I were you.
Now, up to multiples of $\pi$,
$$\sum_{n=1}^\infty\tan^{-1}\frac{x^2}{n^2}
$$
is the argument of the complex number
$$\prod_{n=1}^\infty\left(1+\frac{ix^2}{n^2}\right).$$
But
$$\prod_{n=1}^\infty\left(1-\frac{z^2}{n^2}\right)=\frac{\sin\pi z}{\pi z}$$
so how about choosing $z$ to make $-z^2=ix^2$?