TITLE: How do you evaluate: $\int _{0}^{\infty} \frac{\log x}{e^x+e^{-x}+1} \ \mathrm dx$
QUESTION [6 upvotes]: I want to find the value of
$\displaystyle \tag*{} \int _{0}^{\infty} \frac{\log x}{e^x+e^{-x}+1} \ \mathrm dx$
At first, I solved this elementary integral:
$\displaystyle \tag*{} \int _{0}^{\infty} \frac{\log x}{e^x+e^{-x}} \ \mathrm dx$
Using the same method, I couldn't find my asked integral. Are there any ways to connect them? Any help would be appreciated.

REPLY [4 votes]: The similar problem was posted on AoPS the other day. There are nice answers posted. For the sake of completeness, I would like to add the solution, based on approach developed by Yaroslav Blagouchine; it is convenient for solving the problems with a specific symmetry by means of the integration along a rectangular contour in the complex plane.
Let
$$I=\int_0^\infty \frac{\ln{x}}{e^{x}+e^{-x}+1}dx=\int_0^\infty \frac{\ln{x}}{2\cosh x+1}dx$$
$$=\lim_{a\to0}\frac{1}{2}\int_0^\infty\frac{\ln(x^2+a^2)}{2\cosh x+1}dx=\frac{1}{4}\lim_{a\to0}\Re\int_{-\infty}^\infty\frac{\ln(a-ix)}{\cosh x+\frac{1}{2}}dx$$
Let's consider
$$I(a)=\frac{1}{4}\int_{-\infty}^\infty\frac{\ln(a-ix)}{\cosh x+\frac{1}{2}}dx=\frac{\pi}{2}\int_{-\infty}^\infty\frac{\ln(a-2\pi i t)}{\cosh 2\pi t+\frac{1}{2}}dt$$
$$=\frac{\pi}{2}\ln2\pi\int_{-\infty}^\infty\frac{dt}{\cosh 2\pi t+\frac{1}{2}}+\frac{\pi}{2}\int_{-\infty}^\infty\frac{\ln\big(\frac{a}{2\pi}-it\big)}{\cosh 2\pi t+\frac{1}{2}}dt=I_1+I_2(a)$$
Now, we move to the complex plane and consider the closed rectangular contour $-R\,\to R\,\to (R+i)\,\to (-R+i)\,\to -R;\,\,R\to \infty$; counter clockwise.
Let's also consider the following integral along this contour. The integrand has simple poles at the points $z=\frac{i}{3}$ and $\frac{2i}{3}$.
$$\frac{\pi}{2}\ln2\pi\oint\frac{e^{i\beta z}}{\cosh 2\pi z-\frac{1}{2}}dz=I_1(\beta)\big(1-e^{-\beta}\big)=\frac{\pi}{2}\ln2\pi \,2\pi i\operatorname{Res}_{\binom{\frac{i}{3}}{\frac{2i}{3}}}\frac{e^{i\beta z}}{\cosh 2\pi z-\frac{1}{2}}$$
$$I_1(\beta)\big(1-e^{-\beta}\big)=\frac{\pi}{2}\ln2\pi\frac{2\pi i}{\sqrt 3\pi i}\Big(e^{-\frac{\beta}{3}}-e^{-\frac{2\beta}{3}}\Big)$$
(We also have to add side integrals - along $R\to R+i$ and $-R+i\to-R$, but these integrals $\to 0$ at $R\to\infty$). Taking the limit $\beta\to 0$, we find
$$\boxed{\,\,I_1(0)=I_1=\frac{\pi}{3\sqrt 3}\ln2\pi\,\,}$$
To evaluate $I_2(a)$, we notice that
$$\frac{\ln\big(\frac{a}{2\pi}-it\big)}{\cosh 2\pi t-\frac{1}{2}}=\frac{\ln\Gamma\big(\frac{a}{2\pi}-it+1\big)-\ln\Gamma\big(\frac{a}{2\pi}-it\big)}{\cosh 2\pi t-\frac{1}{2}}$$
$$=\frac{\ln\Gamma\big(\frac{a}{2\pi}-i(t+i)\big)}{\cosh 2\pi (t+i)-\frac{1}{2}}\,-\,\frac{\ln\Gamma\big(\frac{a}{2\pi}-it\big)}{\cosh 2\pi t-\frac{1}{2}}$$
(We used the fact that $\cosh (x+2\pi i)=\cosh x$). Adding two integrals (along $R\to R+i$ and $-R+i\to-R$ - these integrals $\to 0$ at $R\to\infty$), we can present $I_2(a)$ in the form of the integral along the same rectangular contour
$$I_2(a)=-\frac{\pi}{2}\oint\frac{\ln\Gamma\big(\frac{a}{2\pi}-iz\big)}{\cosh 2\pi z-\frac{1}{2}}dz=-\frac{\pi}{2}\,2\pi i\operatorname{Res}_{\binom{\frac{i}{3}}{\frac{2i}{3}}}\frac{\ln\Gamma\big(\frac{a}{2\pi}-iz\big)}{\cosh 2\pi z-\frac{1}{2}}=-\frac{\pi}{\sqrt 3}\Big(\ln\Gamma\big(\frac{a}{2\pi}+\frac{1}{3}\big)-\ln\Gamma\big(\frac{a}{2\pi}+\frac{2}{3}\big)\Big)$$
$$\boxed{\,\,I_2(a)=\frac{\pi}{\sqrt 3}\ln\frac{\Gamma\big(\frac{a}{2\pi}+\frac{2}{3}\big)}{\Gamma\big(\frac{a}{2\pi}+\frac{1}{3}\big)}\,\,}$$
Coming back to our initial integral
$$I=I_1+\Re\,I_2(0)=\frac{\pi}{3\sqrt 3}\ln2\pi+\frac{\pi}{\sqrt 3}\ln\frac{\Gamma\big(\frac{2}{3}\big)}{\Gamma\big(\frac{1}{3}\big)}$$
Using the reflection formula for gamma-function $\Gamma\big(\frac{2}{3}\big)\Gamma\big(\frac{1}{3}\big)=\frac{\pi}{\sin\frac{\pi}{3}}=\frac{2\pi}{\sqrt3}$
$$\boxed{\,\,I=\frac{\pi}{3\sqrt 3}\ln2\pi+\frac{\pi}{\sqrt 3}\ln\frac{2\pi}{\sqrt3}-\frac{2\pi}{\sqrt 3}\ln\Gamma\Big(\frac{1}{3}\Big)=-0.126321...\,\,}$$