Evaluate of $\int_{0}^{\infty}\frac{e^{x\pi}-1}{e^{x\pi}+1}\cdot \frac{x}{(1+x^2)(9+x^2)} dx$ Would like to know how would you evaluate $(1)$:
$$\int_{0}^{\infty}\frac{e^{x\pi}-1}{e^{x\pi}+1}\cdot \frac{x}{(1+x^2)(9+x^2)} dx=\frac{1}{8}?\tag1$$
Notices that, $$\tanh\left(\frac{x\pi}{2}\right)=\frac{e^{x\pi}-1}{e^{x\pi}+1}$$
$$\int_{0}^{\infty}\tanh\left(\frac{x\pi}{2}\right)\cdot \frac{x}{(1+x^2)(9+x^2)} dx\tag 2$$
$$8\int_{0}^{\infty}\tanh\left(\frac{x\pi}{2}\right)\cdot \frac{x}{1+x^2} dx-8\int_{0}^{\infty}\tanh\left(\frac{x\pi}{2}\right)\cdot \frac{x}{9+x^2} dx \tag3$$
 A: Basically, we note
$$
\int_{0}^{\infty} e^{-at}\sin(xt) \,\mathrm{d}t = \frac{x}{a^2+x^2}
$$
$$
\int_{0}^{\infty} {\frac{\cos(\alpha x)}{\cosh(\beta x)} \mathrm{d}x} = \frac{\pi}{2\beta} \operatorname{sech}\left(\frac{\pi\alpha}{2\beta}\right)
$$
then denote desired integral with $I(a,b)$ that is
$$
\begin{aligned}
I(a,b)
& = \int_{0}^{\infty} \frac{x}{(a^2+x^2)(b^2+x^2)}\tanh\left(\frac{\pi x}{2}\right)\mathrm{d}x\\
& = \frac1{b^2-a^2} \int_{0}^{\infty} \left(\frac{x}{a^2+x^2}-\frac{x}{b^2+x^2}\right)\tanh\left(\frac{\pi x}{2}\right)\mathrm{d}x\\
& = \frac1{b^2-a^2}\int_{0}^{\infty} \left(\int_{0}^{\infty} (e^{-at}-e^{-bt})\sin(xt) \,\mathrm{d}t\right)\tanh\left(\frac{\pi x}{2}\right)\mathrm{d}x\\
& = \frac1{b^2-a^2}\int_{0}^{\infty} (e^{-at}-e^{-bt}) \left( \int_{0}^{\infty} \sin(xt)\tanh\left(\frac{\pi x}{2}\right)\mathrm{d}x\right)\mathrm{d}t\\
& = \frac1{b^2-a^2}\int_{0}^{\infty} (e^{-at}-e^{-bt}) \left( -\frac{i}{2}\int_{0}^{\infty} \frac{\cos\left(t-\frac{i\pi}{2}\right)x-\cos\left(t+\frac{i\pi}{2}\right)x}{\cosh\left(\frac{\pi x}{2}\right)}\mathrm{d}x\right)\mathrm{d}t\\
& = \frac1{b^2-a^2}\int_{0}^{\infty} (e^{-at}-e^{-bt}) \left( -\frac{i}{2}\left(\operatorname{sech}\left(t-\frac{i\pi}{2}\right)-\operatorname{sech}\left(t+\frac{i\pi}{2}\right)\right)\right)\mathrm{d}t\\
& = \frac1{b^2-a^2}\int_{0}^{\infty} \frac{e^{-at}-e^{-bt}}{\sinh t} \mathrm{d}t = \frac1{b^2-a^2}\left(\psi\left(\frac{1+b}{2}\right) - \psi\left(\frac{1+a}{2}\right)\right)
\end{aligned}
$$
which easily reveals $I(1,3)=\frac1{8}$
Supplement for some identites
$$
\sinh\left(\frac{\pi x}{2}\right)=-i\sin\left(\frac{i\pi x}{2}\right), \quad\cosh\left(t\pm\frac{i\pi}{2}\right)=\pm i\sinh t
$$
and
Gauss's representation of digamma function for $\Re(z)>0$, namely
$$
\psi(z) = \int_{0}^{\infty} {\left( \frac{e^{-t}}{t} - \frac{e^{-zt}}{1-e^{-t}} \right) \mathrm{d}t}
$$

Edit for some necessary explanation, actually this integral
$$
\int_{0}^{\infty} \sin(xt)\tanh\left(\frac{\pi x}{2}\right)\mathrm{d}x
$$
does not converge under common meaning, there are some abuse of notation need to be justified, a quick insight is to recall
$$
\int_{0}^{\infty} {\frac{\sin(\alpha x)}{\sinh(\beta x)} \mathrm{d}x} = \frac{\pi}{2\beta} \tanh\left(\frac{\pi\alpha}{2\beta}\right)
$$
and we have
$$
\begin{aligned}
\int_{0}^{\infty} \sin(xt)\tanh\left(\frac{\pi x}{2}\right)\mathrm{d}x
& = \int_{0}^{\infty} \frac{\mathrm{d}w}{\sinh w} \left(\frac2{\pi}\int_{0}^{\infty} \sin(xt)\sin(xw)\mathrm{d}x\right)\\
& = \int_{0}^{\infty} \frac{\delta(t-w)-\delta(t+w)}{\sinh w} \mathrm{d}w = \frac1{\sinh t}
\end{aligned}
$$
by utilizing the Dirac's delta in such integral.
Or more directly, recalling $(w>0)$
$$
\int_{0}^{\infty} \frac{x\sin(wx)}{a^2+x^2}\mathrm{d}x = \frac{\pi}{2}e^{-aw}
$$
hence
$$
\begin{aligned}
I(a,b)
& = \int_{0}^{\infty} \frac{x}{(a^2+x^2)(b^2+x^2)}\tanh\left(\frac{\pi x}{2}\right)\mathrm{d}x\\
& = \frac1{b^2-a^2} \int_{0}^{\infty} \left(\frac{x}{a^2+x^2}-\frac{x}{b^2+x^2}\right) \left( \frac2{\pi}\int_{0}^{\infty} {\frac{\sin(wx)}{\sinh(w)} \mathrm{d}w} \right) \mathrm{d}x\\
& = \frac1{b^2-a^2}\int_{0}^{\infty} \frac{\mathrm{d}w}{\sinh w} \left(\frac{2}{\pi} \int_{0}^{\infty} \left(\frac{x\sin(wx)}{a^2+x^2} - \frac{x\sin(wx)}{b^2+x^2}\right) \mathrm{d}x\right)\\
& = \frac1{b^2-a^2}\int_{0}^{\infty} \frac{e^{-aw}-e^{-bw}}{\sinh w} \mathrm{d}w = \frac1{b^2-a^2}\left(\psi\left(\frac{1+b}{2}\right) - \psi\left(\frac{1+a}{2}\right)\right)
\end{aligned}
$$
which appears to be a better solution.
