How to find the closed form of $\int_{0}^{\infty}{(e^{-x}+x-1)^2\over x(e^{x\over n}-1)}\mathrm dx$ We partially guessed the closed form of $(1)$ to be
$$\int_{0}^{\infty}{(e^{-x}+x-1)^2\over x(e^{x\over n}-1)}\mathrm dx=f(n)+{\pi^2\over 6}n^2+\ln{{2n\choose n}}\tag1$$
where $n\ge1$
$f(1)=-2$
$f(2)=-6$
$f(3)=-11$
$f(4)=-{50\over 3}$
$f(5)=-{137\over 6}$
$f(n)=?$
How can we find the complete closed form for $(1)?$
 A: Hint by user reuns:
$$\begin{align}
\int_0^{\infty } \frac{(\exp (-x)+x-1)^2}{x \left(\exp \left(\frac{x}{n}\right)-1\right)} \, dx & =\int_0^{\infty } \frac{(\exp
   (-x)+x-1)^2 \sum _{k=1}^{\infty } \exp \left(-\frac{k x}{n}\right)}{x} \, dx \\
&=\sum _{k=1}^{\infty } \int_0^{\infty }
   \frac{(\exp (-x)+x-1)^2 \exp \left(-\frac{k x}{n}\right)}{x} \, dx \\
&=\sum _{k=1}^{\infty } \left(\frac{n^2 (-k+n)}{k^2 (k+n)}+2
   \ln (k+n)-\ln (k (k+2 n))\right) \\
&=\sum _{k=1}^{\infty } \left(\frac{n^2 (-k+n)}{k^2 (k+n)}+\ln \left(\frac{(k+n)^2}{k (k+2
   n)}\right)\right) \\
&=\sum _{k=1}^{\infty } \frac{n^2 (-k+n)}{k^2 (k+n)}+\sum _{k=1}^{\infty } \ln \left(\frac{(k+n)^2}{k (k+2
   n)}\right) \\
&=\sum _{k=1}^{\infty } \frac{n^2 (-k+n)}{k^2 (k+n)}+\ln \left(\prod _{k=1}^{\infty } \frac{(k+n)^2}{k (k+2
   n)}\right) \\
&=-2 \gamma  n+\frac{n^2 \pi ^2}{6}-2 n \, \psi (1+n)+\ln \left(\frac{4^n \,\Gamma \left(\frac{1}{2}+n\right)}{\sqrt{\pi
   } \,\Gamma (1+n)}\right) \\
&=-2 n H_n+\frac{n^2 \pi ^2}{6}+\ln \left(\binom{2 n}{n}\right)
\end{align}$$
where


*

*$\gamma$ is  Euler’s constant $=0.577216...$

*$\psi (1+n) $ is the digamma function 

*$H_n$ is the $n$th harmonic number
