TITLE: Integral $\int_{-1}^1\frac1x\sqrt{\frac{1+x}{1-x}}\ln\left(\frac{2\,x^2+2\,x+1}{2\,x^2-2\,x+1}\right) \mathrm dx$
QUESTION [507 upvotes]: I need help with this integral:
$$I=\int_{-1}^1\frac1x\sqrt{\frac{1+x}{1-x}}\ln\left(\frac{2\,x^2+2\,x+1}{2\,x^2-2\,x+1}\right)\ \mathrm dx.$$
The integrand graph looks like this:
$\hspace{1in}$
The approximate numeric value of the integral:
$$I\approx8.372211626601275661625747121...$$
Neither Mathematica nor Maple could find a closed form for this integral, and lookups of the approximate numeric value in WolframAlpha and ISC+ did not return plausible closed form candidates either. But I still hope there might be a closed form for it.
I am also interested in cases when only numerator or only denominator is present under the logarithm.

REPLY [4 votes]: Figured I would contribute and add a self-contained real analytic method:
I will use the following representations that are fairly straight-forward to prove:
$$2\int_{0}^{\infty}\frac{\cos(x)-\cos(t \, x)}{x}\left(e^{-x\sqrt{-a-bi}}+e^{-x\sqrt{-a+bi}}\right) \, dx=\ln \left((t^2 -a)^2 + b^2\right)-\ln \left((1-a)^2+b^2\right)$$
$$\int_{0}^{\infty}\frac{\sin(x)}{x}\left(e^{-x\sqrt{-a-bi}}+e^{-x\sqrt{-a+bi}}\right) \, dx=\arctan\left(\frac{1}{\sqrt{-a-bi}}\right)+\arctan\left(\frac{1}{\sqrt{-a+bi}}\right)$$
$$\int_{0}^{\infty}\frac{\cos(t)-\cos(t \, x)}{x^2-1} \, dx=\frac{\pi}{2}\sin(t),\> \text{for} \, \> t\geq 0$$
Now we can begin evaluating $I$:
$$I=\int_{-1}^{1}\frac{1}{x}\sqrt{\frac{1+x}{1-x}}\ln\left(\frac{2x^2+2x+1}{2x^2-2x+1}\right) \, dx$$
Enforce the substitution $\sqrt{\frac{1+x}{1-x}} = u$:
$$\implies I = \int_{0}^{\infty}\frac{4u^2}{u^4-1}\ln\left(\frac{5u^4-2u^2+1}{u^4-2u^2+5}\right)\, du \stackrel{u \, \mapsto \frac{1}{u}}{=}\int_{0}^{\infty}\frac{4}{u^4-1}\ln\left(\frac{5u^4-2u^2+1}{u^4-2u^2+5}\right) \, du$$
From adding the two, we can deduce:
$$I = \int_{0}^{\infty}\frac{2}{u^2-1}\ln\left(\frac{5u^4-2u^2+1}{u^4-2u^2+5}\right) \, du$$
Since
$$\ln\left(5 u^4-2 u^2+1\right)-\ln(4)=\ln\left(\left(u^2-\frac{1}{5}\right)^2+\frac{4}{25}\right)-\ln\left(\frac{4}{5}\right)$$
$$\ln(u^4-2 u^2+5)-\ln(4)=\ln((u^2-1)^2+4)-\ln(4)$$
We can write
$$A=\int_{0}^{\infty}\frac{2}{u^2-1}\left(\ln\left(\left(u^2-\frac{1}{5}\right)^2+\frac{4}{25}\right)-\ln\left(\frac{4}{5}\right)\right)\,du\\
B=\int_{0}^{\infty}\frac{2}{u^2-1}\left(\ln((u^2-1)^2+4)-\ln(4)\right)\, du$$
such that $I = A-B$
Now from the starting representations we deduce:
$$\begin{align} \implies A &= \int_{0}^{\infty}\frac{4}{u^2-1}\int_{0}^{\infty}\frac{\cos(t)-\cos(u \, t)}{t}\left(e^{-t\sqrt{(-1-2i)/5}}+e^{-t\sqrt{(-1+2i)/5}}\right)\,dt\,du
\\ &= 2\pi\int_{0}^{\infty}\frac{\sin(t)}{t}\left(e^{-t\sqrt{(-1-2i)/5}}+e^{-t\sqrt{(-1+2i)/5}}\right)\, dt 
\\ &= 2\pi\arctan\left(\frac{\sqrt{5}}{\sqrt{-1-2i}}\right)+2\pi\arctan\left(\frac{\sqrt{5}}{\sqrt{-1+2i}}\right)
\\ &= \Re\left(4\pi \arctan\left(\frac{\sqrt{5}}{\sqrt{-1-2i}}\right)\right)\end{align}$$
Similarly, one finds $$B=\Re\left(4\pi\arctan\left(\frac{1}{\sqrt{-1-2i}}\right)\right)$$
By using the identity:
$$\arctan (x)+\arctan (y)=\arctan \left(\frac{x+y}{1-x y}\right)$$
One deduces
$$\boxed{I=4\pi \operatorname{arccot} \left(\sqrt{\phi}\right)}$$