TITLE: Evaluate $\int_0^\infty\frac{1-e^{-x}(1+x )}{x(e^{x}-1)(e^{x}+e^{-x})}dx$
QUESTION [20 upvotes]: \begin{equation}
\int_0^\infty\frac{1-e^{-x}(1+x )}{x(e^{x}-1)(e^{x}+e^{-x})}dx
\end{equation}

My colleague got this problem from his friend but he didn't know the answer so he asked my help. Unfortunately, after hours of tired effort I was unable to crack this integral. I was unable to find a way to evaluate it from online search either. I used to be good at solving this kind of problem but now I feel so embarrassed by my stupidity. I'm stuck and I badly need your help. It's a humbling request to ask people here being so kind to help me out. Thank you.

REPLY [9 votes]: $$
\begin{align}
\int_0^\infty\frac{1-e^{-x}(1+x)}{x(e^x-1)(e^x+e^{-x})}\,\mathrm{d}x
&=\int_0^\infty\frac{e^x-(1+x)}{x(e^x-1)(e^{2x}+1)}\,\mathrm{d}x\tag{1}\\
&=\int_0^\infty\sum_{k=2}^\infty\frac{x^{k-1}}{k!}\frac1{(e^x-1)(e^{2x}+1)}\,\mathrm{d}x\tag{2}\\
&=\int_0^\infty\sum_{k=2}^\infty\frac{x^{k-1}}{k!}\,\frac12\left(\frac1{e^x-1}-\frac{1+e^x}{e^{2x}+1}\right)\mathrm{d}x\tag{3}\\
&=\int_0^\infty\sum_{k=2}^\infty\frac{x^{k-1}}{k!}\sum_{j=1}^\infty\left(e^{(1-4j)x}+e^{-4jx}\right)\mathrm{d}x\tag{4}\\
&=\sum_{j=1}^\infty\sum_{k=2}^\infty\left(\frac1{k(4j-1)^k}+\frac1{k(4j)^k}\right)\tag{5}\\
&=\sum_{j=1}^\infty\left[\log\left(\frac{4j-1}{4j-2}\right)-\frac1{4j-1}\right]\\
&+\sum_{j=1}^\infty\left[\log\left(\frac{4j}{4j-1}\right)-\frac1{4j}\right]\tag{6}\\
&=\sum_{j=1}^\infty\left[\log\left(\frac{j}{j-\frac12}\right)-\frac1{2j}+\frac14\left(\frac1j-\frac1{j-\frac14}\right)\right]\tag{7}\\[3pt]
&=\log\left(\Gamma\left(\frac12\right)\right)-\frac\gamma2+\frac14H_{-1/4}\tag{8}\\[9pt]
&=\frac12\log(\pi)-\frac\gamma2+\frac\pi8-\frac34\log(2)\tag{9}
\end{align}
$$
Explanation:
$(1)$: multiply numerator and denominator by $e^x$
$(2)$: expand $e^x-(1+x)$ into a power series
$(3)$: partial fractions
$(4)$: expand into a power series
$(5)$: perform the integration using the Gamma integral
$(6)$: use the power series for $\log(1+x)$
$(7)$: arithmetic
$(8)$: $\prod\limits_{k=1}^{n-1}(k+x)=\frac{\Gamma(n+x)}{\Gamma(1+x)}$, Gautschi's Inequality, $\lim\limits_{n\to\infty}\left(\sum\limits_{k=1}^n\frac1k-\log(n)\right)=\gamma$,
$\phantom{(8)\text{:}}$ and $(2)$ from this answer
$(9)$: $(11)$ from this answer