Closed form for ${\large\int}_0^\infty\frac{x\,\sqrt{e^x-1}}{1-2\cosh x}\,dx$

This is another one of those integrals that looks grim, then turns out to be fine once you work out what's going off and choose the right path. In this case, the trick is simply to change variables to $$ u^2 = e^x - 1, $$ which doesn't change the range of integration; this is the same as $ x = \log{(1+u^2)} $ Then $$ dx = \frac{2u}{1+u^2}, $$ and most significantly, $$ 2\cosh{x} -1 = (1+u^2)-1 + \frac{1}{1+u^2}, $$ and we find that your first integral becomes (rewriting it to be positive) $$ \int_0^{\infty} \frac{\sqrt{e^x-1}}{2\cosh{x}-1}\, dx = \int_0^{\infty} \frac{2u^2}{u^2(1+u^2)+1} \, du = \int_{-\infty}^{\infty} \frac{u^2}{1+u^2+u^4} \, du $$ The integrand being even, this is straightforward to finish off using the residue theorem, giving the $\pi/\sqrt{3}$.


Of course, what you actually care about is this with another $\log{(1+u^2)}$ in it. The usual trick here is to set $$ I(a) = \int_{-\infty}^{\infty} \frac{u^2\log{(1+a u^2)}}{1+u^2+u^4} \, du. $$ $I(1)$ is what we want, $I(0)$ is clearly $0$, so we can write $I(1) = \int_0^1 I'(a)$. It so happens that $I'(a)$ is much easier to compute, since it is just $$ I'(a) = \int_{-\infty}^{\infty} \frac{u^4}{(1+u^2+u^4)(1+a u^2)} \, du, $$ which another tedious residue computation, or equally uninteresting partial fractions gives as $$ I'(a) = \frac{\pi}{\sqrt{3}} \left( \frac{a-2}{a^2- a+1} + \frac{\sqrt{3}}{\sqrt{a} (a^2- a+1)} \right), $$ and so $$ I(1) = \frac{\pi}{\sqrt{3}} \int_0^1 \left( \frac{a-2}{a^2- a+1} + \frac{\sqrt{3}}{\sqrt{a} (a^2- a+1)} \right) \, da, $$ another integral whose difficulty lies more in patience than in ingenuity, and we eventually obtain the final answer $$ I(1) = \frac{\pi^2}{6}+\frac{\pi}{2 \sqrt{3}} \log{\left(7+4 \sqrt{3}\right)}.$$


By substituting $x\mapsto\ln(1+x^2)$ we see that the integral is equivalent to $$I=-\int^\infty_{-\infty}\frac{x^2\ln(1+x^2)}{x^4+x^2+1}dx$$ This is equivalent to $2\pi i$ times the residues of $f(z)=-\dfrac{2z^2\ln(1-iz)}{z^4+z^2+1}$ in the upper-half plane at $z=e^{\pi i/3}$ and $z=e^{2\pi i/3}$. The result is $$I=\frac{\pi^2}{6}+\frac{\pi}{\sqrt{3}}\ln(2+\sqrt{3})$$