Skip to main content

Alternatively, you may use expansion of cotangent $$ \pi\cot \pi x=\frac1x+\sum_{n=1}^{\infty}\frac{2x}{x^2-n^2} $$ as a blackbox (after all, complex residues are not the only way to obtain this formula: say, there is Herglotz trick, explained, for instance, in Proofs from the Book).

Just substitute $x=i$, for the sum $S=\sum_{n=0}^{\infty} \frac1{n^2+1}$ we get $\pi \cot \pi i=-i-2i(S-1)$, $2iS=i-\pi \cot \pi i=i(1+\pi\cot \pi)$, $S=(1+\pi \cot \pi)/2$

Fedor Petrov
  • 108.9k
  • 9
  • 264
  • 459