I have been trying to evaluate the following sum using residues:
$$ \sum_{n=1}^{\infty}\frac{1}{\sinh^{2}(\pi n)}=\frac{1}{6}-\frac{1}{2\pi}$$
I am mainly interested in using residues to do this. I can do it using real methods.
I tried using $\displaystyle \oint\frac{\pi\cot(\pi z)}{\sinh^{2}(\pi z)}dz$
The residue at $z=0$ is $\frac{-2}{3}$
The residue at $\displaystyle z=n, \;\ (n=\pm 1, \pm 2, \pm 3, ....)$ is $\displaystyle \lim_{z\to n}\frac{(z-n)\cos(\pi z)}{\sin(\pi z)\sinh^{2}(\pi z)}=\frac{1}{\sinh^{2}(\pi n)}$
The residue at $\displaystyle z=ni, \;\ (\pm 1, \pm 2, \pm 3, .....)$ is
$\displaystyle \lim_{z\to ni}\frac{(z-ni)\pi\cot(\pi z)}{\sinh^{2}(\pi z)}=\frac{1}{\sinh^{2}(\pi n)}$
So, by the residue theorem:
$\displaystyle \oint\frac{\pi \cot(\pi z)}{\sinh^{2}(\pi z)}dz=\frac{-2}{3}+4\sum_{n=1}^{N}\frac{1}{\sinh^{2}(\pi n)}$
As $N\to \infty$, the left side goes to 0, then solve for the sum at hand.
It would appear the 1/6 is in there, but I have failed to arrive at the correct solution.
Where does the $\frac{1}{2\pi}$ come into play?.
No doubt, I am doing it incorrectly. Can someone point me in the right direction?
Thanks a lot.
There are two problems. One is that you dropped the factor $2\pi\mathrm i$ in the residue theorem. The other is that the left-hand side doesn't go to zero as $N\to\infty$.
If we integrate over a quadratic contour at half-integer coordinates, opposite sides yield the same contributions, so we need twice the sum of the contributions from one horizontal segment and one vertical segment. The contribution from the vertical segments goes to $0$, since the denominator decays exponentially. However, the contribution from the horizontal segments doesn't go to zero; it is, with $a=2k\pi +\pi/2$,
$$ \begin{align} \int_{(-a+\mathrm ia)/\pi}^{(a+\mathrm ia)/\pi}\frac{\pi\cot(\pi z)}{\sinh^2(\pi z)}\mathrm dz &= \int_{-a+\mathrm ia}^{a+\mathrm ia}\frac{\cot z}{\sinh^2z}\mathrm dz \\ &= \int_{-a}^a\frac{\cos x\cosh a-\mathrm i\sin x\sinh a}{\sin x\cosh a+\mathrm i\cos x\sinh a}\frac1{(\sinh x\cos a+i\cosh x\sin a)^2}\mathrm dx \\ &= -\int_{-a}^a\frac{\cos x\cosh a-\mathrm i\sin x\sinh a}{\sin x\cosh a+\mathrm i\cos x\sinh a}\frac1{\cosh^2x}\mathrm dx\;. \end{align} $$
With $a\to\infty$, both $\cosh a$ and $\sinh a$ are asymptotic to $\mathrm e^a$, so the first fraction goes to $-\mathrm i$, and we're left with twice
$$ \mathrm i\int_{-\infty}^\infty\frac1{\cosh^2 x}\mathrm dx=2\mathrm i\;. $$
This contribution of $4\mathrm i$, divided by the $4$ in front of your sum and the factor $2\pi\mathrm i$ in the residue theorem, yields the term $1/(2\pi)$; the minus sign arises because I integrated clockwise.