$\int_0^\infty \frac{x}{(e^{2\pi x}-1)(x^2+1)^2}dx$? How to calculate integral $\int_0^\infty \frac{x}{(e^{2\pi x}-1)(x^2+1)^2}dx$? I got this integral by using Abel-Plana formula on series $\sum_{n=0}^\infty \frac{1}{(n+1)^2}$. This integral can be splitted into two integrals with bounds from 0 to 1 and from 1 to infinity and the both integrals converge, so does the sum. I checked with WolframAlpha and the value of the integral is $\frac{-9 + \pi^2}{24}$, but I don't know how to compute it. Also, I tried to write $\frac{2xdx}{(1+x^2)^2}=d\frac{1}{x^2+1}$ and then tried to use partial integration, but didn't succeded.
Any help is welcome. Thanks in advance.
 A: Recall Binet's second $\ln \Gamma$ formula:
$$\int_{0}^{\infty} \frac{\arctan (t z)}{e^{2\pi t}-1} \, dt = \frac{1}{2} \ln \Gamma \left(\frac{1}{z}\right) + \frac{1}{2}\left(\frac{1}{z}-\frac{1}{2}\right) \ln (z) + \frac{1}{2z} - \frac{1}{4} \ln (2 \pi)$$
Consider the following integral:
$$\int \frac{t}{(e^{2\pi t}-1)(1+t^2 z^2)^2} \, dz = \frac{t z}{2 (1+t^2 z^2)(e^{2 \pi t}-1)} + \frac{\arctan (t z)}{2 (e^{2 \pi t}-1)}$$
Since $$\frac{t z}{2 (1+t^2 z^2)(e^{2 \pi t}-1)} = \frac{z}{2} \frac{\partial}{\partial z} \left(\frac{\arctan (t z)}{e^{2 \pi t}-1}\right)$$
$$\implies \int_{0}^{\infty} \int \frac{t}{(e^{2\pi t}-1)(1+t^2 z^2)^2} \, dz \, dt = \int_{0}^{\infty} \frac{z}{2} \frac{\partial}{\partial z} \left(\frac{\arctan (t z)}{e^{2 \pi t}-1}\right) \, dt+ \int_{0}^{\infty} \frac{\arctan (t z)}{2 (e^{2 \pi t}-1)} \, dt$$
Using Binet's formula we determine then:
$$\int_{0}^{\infty} \int \frac{t}{(e^{2\pi t}-1)(1+t^2 z^2)^2} \, dz \, dt = \frac{1}{4z}-\frac{1}{8}\ln(2\pi z)-\frac{\psi\left(\frac{1}{z}\right)}{4z}+\frac{1}{4}\ln\left(\Gamma\left(\frac{1}{z}\right)\right)-\frac{1}{8}$$
where $\psi$ is the digamma function.
Taking the derivative with respect to $z$ then the limit as $z \to 1$ we determine:
$$\boxed{\int_{0}^{\infty} \frac{x}{(e^{2 \pi x}-1)(x^2+1)^2} \, dx = \frac{\pi^2}{24} - \frac{3}{8}}$$
A: Here is a brutal-force computation using contour integral.

Let $\operatorname{Log}(\cdot)$ be the logarithm with the branch cut $[0, \infty)$ so that $\operatorname{Arg}(z) \in (0, 2\pi)$. Also, for $s > 0$ we define
$$ I(s) = \int_{0^+ i}^{\infty + 0^+ i} f_s(z) \, \mathrm{d}z, \quad \text{where} \quad f_s(z) = \frac{e^{s\operatorname{Log}(z)}}{(e^{2\pi z}-1)(z^2+1)^2}. $$
Then by noting that the contour integral of $f_s(z)$ along the square with the corners $(\pm1 \pm i)(N+\frac{1}{2})$ vanishes as $N \to \infty$, we get
\begin{align*}
(1 - e^{2\pi i s}) I(s)
&= \int_{0^+ i}^{\infty + 0^+ i} f_s(z) \, \mathrm{d}z + \int_{\infty + 0^- i}^{0^- i} f_s(z) \, \mathrm{d}z 
= 2\pi i \sum_{n \neq 0} \mathop{\mathrm{Res}}_{z=ni} f_s(z).
\end{align*}
Some tedious computation yields:
$$ 2\pi i \mathop{\mathrm{Res}}_{z=ni} f_s(z) = \begin{cases}
e^{i\pi s/2} \left( \frac{is^2}{8} - \frac{3is}{8} + \frac{3i}{16} - \frac{i\pi^2}{12} + \frac{\pi(s-1)}{4} \right), & n = 1, \\
e^{3i\pi s/2} \left( \frac{is^2}{8} - \frac{3is}{8} + \frac{3i}{16} - \frac{i\pi^2}{12} - ​\frac{\pi(s-1)}{4} \right), & n = -1, \\
i e^{i\pi s/2} \frac{n^s}{(n^2-1)^2}, & n \geq 2, \\
i e^{3i\pi s/2} \frac{|n|^s}{(n^2-1)^2}, & n \leq -2. \\
\end{cases} $$
Assuming in addition that $s \notin \mathbb{Z}$, we get
\begin{align*}
I(s)
&= 
+ \frac{e^{i\pi s/2} + e^{3i\pi s/2}}{1 - e^{2\pi i s}} \left( \frac{is^2}{8} - \frac{3is}{8} + \frac{3i}{16} - \frac{i\pi^2}{12} \right) \\
&\quad + \frac{e^{i\pi s/2} - e^{3i\pi s/2}}{1 - e^{2\pi i s}} \frac{\pi(s-1)}{4} \\
&\quad + \frac{i(e^{i\pi s/2} + e^{3i\pi s/2})}{1 - e^{2\pi i s}} \sum_{n=2}^{\infty} \frac{n^s}{(n^2-1)^2}
\end{align*}
Letting $s \to 1$,
\begin{align*}
I(1)
&= \left( \frac{1}{32}+\frac{\pi ^2}{24} \right) - \frac{1}{4} - \frac{1}{2} \sum_{n=2}^{\infty} \frac{n}{(n^2-1)^2}
\end{align*}
Then the desired answer follows from
$$ \sum_{n=2}^{\infty} \frac{n}{(n^2-1)^2}
= \frac{1}{4} \sum_{n=2}^{\infty} \left( \frac{1}{(n-1)^2} - \frac{1}{(n+1)^2} \right)
= \frac{5}{16}. $$
A: Utilize
$\int_0^\infty 
y e^{-y} \sin(x y) dy = \frac x{(x^2+1)^2}
$ to integrate
\begin{align}
&\int_0^\infty \frac{x}{(e^{2\pi x}-1)(x^2+1)^2}dx\\
=& \>\frac12\int_0^\infty \frac{1}{e^{2\pi x}-1} 
\int_0^\infty y e^{-y}\sin(xy)dy \>dx\\
 =& \>\frac12\int_0^\infty y e^{-y}
\int_0^\infty \frac{\sin(xy)}{e^{2\pi x}-1} dx \>dy\\
= & \>\frac12\int_0^\infty y e^{-y}
\left(\frac14\coth\frac y2-\frac1{2y} \right) \overset{t=e^{-y}} {dy}\\ 
= &\>\frac14\int_0^1 \left(\frac{\ln t}{t-1}-\frac32\right)dt
=\frac{\pi^2-9}{24}
\end{align}
where $\int_0^\infty \frac{\sin(xy)}{e^{2\pi x}-1} dx
=\frac14\coth\frac y2-\frac1{2y}
$ is used.
A: $\newcommand{\bbx}[1]{\,\bbox[15px,border:1px groove navy]{\displaystyle{#1}}\,}
 \newcommand{\braces}[1]{\left\lbrace\,{#1}\,\right\rbrace}
 \newcommand{\bracks}[1]{\left\lbrack\,{#1}\,\right\rbrack}
 \newcommand{\dd}{\mathrm{d}}
 \newcommand{\ds}[1]{\displaystyle{#1}}
 \newcommand{\expo}[1]{\,\mathrm{e}^{#1}\,}
 \newcommand{\ic}{\mathrm{i}}
 \newcommand{\mc}[1]{\mathcal{#1}}
 \newcommand{\mrm}[1]{\mathrm{#1}}
 \newcommand{\on}[1]{\operatorname{#1}}
 \newcommand{\pars}[1]{\left(\,{#1}\,\right)}
 \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}}
 \newcommand{\root}[2][]{\,\sqrt[#1]{\,{#2}\,}\,}
 \newcommand{\totald}[3][]{\frac{\mathrm{d}^{#1} #2}{\mathrm{d} #3^{#1}}}
 \newcommand{\verts}[1]{\left\vert\,{#1}\,\right\vert}$
\begin{align}
&\bbox[5px,#ffd]{\int_{0}^{\infty}{x \over \pars{\expo{2\pi x} - 1}\pars{x^{2} + 1}^{2}}
\dd x}
\\[5mm] = &\
{1 \over 4}\bracks{-2\int_{0}^{\infty}{\Im\pars{\bracks{1 + \ic x}^{-2}} \over \expo{2\pi x} - 1}\dd x}
\end{align}
The brackets-$\ds{\bracks{}}$ enclosed expression can be evaluated with the Abel-Plana Formula. Namely,
\begin{align}
&\bbox[5px,#ffd]{\int_{0}^{\infty}{x \over \pars{\expo{2\pi x} - 1}\pars{x^{2} + 1}^{2}}
\dd x}
\\[5mm] = &\
{1 \over 4}\bracks{\sum_{n = 0}^{\infty}{1 \over \pars{1 + n}^{2}} -
\int_{0}^{\infty}{\dd n \over \pars{1 + n}^{2}} -
\left.{1 \over 2}{1 \over \pars{1 + n}^{2}}\right\vert_{n\ =\ 0}}
\\[5mm] = &
{1 \over 4}\pars{{\pi^{2} \over 6} - 1 - {1 \over 2}} = \bbox[5px,#ffd]{{\pi^{2} \over 24} - {3 \over 8}} \approx 0.0362
\end{align}
