Show that $\int \limits_{0}^{\infty}\frac{x}{\sinh ax}dx=\left(\frac{\pi}{2a}\right)^2$ Show that
$$\int \limits_{0}^{\infty}\frac{x}{\sinh ax}dx=\left(\frac{\pi}{2a}\right)^2$$
using 2 ways: the first using contour integration and the second using real analysis.
 A: Assuming $a\gt0$,
$$
\begin{align}
\int_0^\infty\frac{x}{\sinh(ax)}\mathrm{d}x
&=\frac1{2a^2}\int_{-\infty}^\infty\frac{x}{\sinh(x)}\mathrm{d}x\tag{1}\\
&=\frac1{a^2}\int_{-\infty}^\infty\frac{x}{e^x-e^{-x}}\mathrm{d}x\tag{2}\\
&=\frac1{a^2}\int_{-\infty}^\infty\frac{x+i\pi/2}{i(e^x+e^{-x})}\mathrm{d}x\tag{3}\\
&=\frac{\pi}{2a^2}\int_{-\infty}^\infty\frac1{e^x+e^{-x}}\mathrm{d}x\tag{4}\\
&=\frac{\pi}{2a^2}\int_{-\infty}^\infty\frac1{e^{2x}+1}\mathrm{d}e^x\tag{5}\\
&=\frac{\pi}{2a^2}\int_0^\infty\frac1{u^2+1}\mathrm{d}u\tag{6}\\
&=\frac{\pi^2}{4a^2}\tag{7}
\end{align}
$$
Explanation:
$(1)$: Substitution $x\mapsto x/a$, use even function symmetry to extend range
$(2)$: $\sinh(x)=\frac{e^x-e^{-x}}{2}$
$(3)$: move contour up $i\pi/2$
$(4)$: remove the odd part by symmetry
$(5)$: multiply by $\frac{e^x}{e^x}$
$(6)$: $u=e^x$
$(7)$: $u=\tan(\theta)$ substitution
In $(3)$, the integral along the contour $$[-R,R]\cup[R,R+\frac{i\pi}2]\cup[R+\frac{i\pi}2,-R+\frac{i\pi}2]\cup[-R+\frac{i\pi}2,-R]$$ is $0$ since there are no singularities of the integrand inside the contour. Since the integrand vanishes on $[R,R+\frac{i\pi}2]$ and $[-R,-R+\frac{i\pi}2]$, we can simply exchange the integral along $(-\infty,\infty)$ for $(-\infty+\frac{i\pi}2,\infty+\frac{i\pi}2)$.
A: Let $x\to ax$ so we add $\frac 1{a^2}$
By contour, take the path as
 $$-R \to R \to R + i\pi \to \epsilon + i \pi \to \gamma \to -\epsilon + i \pi \to -R+ i \pi \to -R $$

The integral is 
$$\int_{-R}^R \frac{x}{\sinh(x)}dx +\int_0^{\pi} \frac{R + i y}{\sinh(R + iy )}i dy + \int_R^{\epsilon} \frac{x+i\pi}{\sinh(x+i\pi)}dx + \int_{\gamma } + \int_{-\epsilon}^{-R} \frac{x+ i \pi }{\sinh(x+i\pi)}dx + \int_{\pi}^0 \frac{R + iy}{\sinh(R + iy)}i dy  = 0$$
As $R\to\infty$, the second and the last integral vanishes from Jordan's lemma. The integral containig $R$
$$\int_{-R}^R \frac{x}{\sinh(x)}dx + \int_R^{\epsilon} \frac{x+i\pi}{\sinh(x+i\pi)}dx + \int_{-\epsilon}^{-R} \frac{x+ i \pi }{\sinh(x+i\pi)}dx = 4 \int_\epsilon^R \frac{x}{\sinh(x)}dx$$
The $\gamma$ curve part
$$\int_\gamma = \lim_{\epsilon \to 0}\int_0^{-\pi } \frac{i\pi + \epsilon e^{i\theta}}{\sinh(i\pi + \epsilon e^{i\theta})} i \epsilon e^{i\theta}d\theta  =  \lim_{\epsilon \to 0}\int_0^{-\pi } \frac{\pi \epsilon e^{i\theta}}{\sinh(\epsilon  e^{i\theta})}d\theta  - i \lim_{\epsilon \to 0}\int_0^{-
\pi} \frac{(\epsilon e^{i\theta})^2}{\sinh(\epsilon e^{i\theta})} d\theta =  - \pi^2 $$
Puttnig it all up you get, $$\lim_{R\to\infty}\lim_{\epsilon\to0} 4 \int_\epsilon^R \frac{x}{\sinh(x)}dx - \pi^2 = 0$$
A: $$a>0:$$ 
$$\int_0^{\infty} \frac{x\,dx}{\sinh ax}=\frac{1}{a^2}\int_0^{\infty}\frac{x\,dx}{\sinh x}=\frac{2}{a^2}\int_0^{\infty} \left(\frac{x}{e^{x}}\right)\frac{dx}{1-e^{-2x}}=\frac{2}{a^2}\int_0^{\infty}x\sum_{k=0}^{\infty}e^{-(2k+1)x}\,dx$$
Now, since
$$\int_0^{\infty} xe^{-kx}\,dx=\frac{1}{k^2}$$
We have:
$$\int_0^{\infty} \frac{x\,dx}{\sinh ax}=\frac{2}{a^2}\sum_{k=0}^{\infty} \frac{1}{(2k+1)^2}=\frac{\pi^2}{4a^2}$$
The latter sum follows from:
$$\sum_{k=0}^{\infty} \frac{1}{(2k+1)^2}=\sum_{k=1}^{\infty} \frac{1}{k^2}-\sum_{k=1}^{\infty} \frac{1}{(2k)^2}=\frac{3}{4}\sum_{k=1}^{\infty} \frac{1}{k^2}=\frac{\pi^2}{8}$$
The case $a<0$ is dealt with by adding a negative.
A: Perform integration by parts,
$\begin{align} J&=\int \limits_{0}^{\infty}\frac{x}{\sinh ax}dx\\&=\left[\frac{1}{a}\ln\left(\text{arctanh}\left(\frac{ax}{2}\right)\right)x\right]_0^{\infty}-\int_0^{\infty}\frac{1}{a}\ln\left(\text{arctanh}\left(\frac{ax}{2}\right)\right)dx\\
&=-\frac{1}{a}\int_0^{\infty}\ln\left(\text{arctanh}\left(\frac{ax}{2}\right)\right)dx\\
\end{align}$
Perform the change of variable $y=\text{arctanh}\left(\frac{ax}{2}\right)$,
$\begin{align}J&=-\frac{2}{a^2}\int_0^1\frac{\ln x}{1-x^2}dx\\
&=\frac{2}{a^2}\int_0^1\frac{x\ln x}{1-x^2}dx-\frac{2}{a^2}\int_0^1\frac{\ln x}{1-x}dx
\end{align}$
In the first intégral perform the change of variable $y=2x$,
$\begin{align}J&=\frac{1}{2a^2}\int_0^1\frac{\ln x}{1-x}dx-\frac{2}{a^2}\int_0^1\frac{\ln x}{1-x}dx\\
&=-\frac{3}{2a^2}\int_0^1\frac{\ln x}{1-x}dx\\
&=\frac{3}{2a^2}\zeta(2)\\
&=\frac{1}{4a^2}\pi^2
\end{align}$
A: With real method
\begin{align}\int_{0}^\infty \frac{x}{\sinh ax}~dx
=& \int_{0}^\infty \left(\frac{e^{ax}}a \int_0^1 \frac{1 }{(e^{2ax}-1)y+1}dy\right)dx\\
=&\ \frac\pi{4a^2}\int_0^1 \frac1{\sqrt{y(1-y)}}dy = \frac{\pi^2}{4a^2}
\end{align}
