Evaluate an absolute monster integral $\int\limits_{0}^{1} \frac{\log(1-x+x^2)}{\sqrt{x}(1+x)}\mathrm{d}x.$

Note

$$I=\int\limits_{0}^{1} \frac{\ln(1-x+x^2)}{\sqrt{x}(1+x)}{d}x \overset{t=\sqrt x} = 2\int\limits_{0}^{1} \frac{\ln(1-t^2+t^4)}{1+t^2}dt $$

Let

$$J(a) = \int_0^1 \frac{\ln(\frac14(1+t^2)^2 \sec^2a -t^2)}{1+t^2}dt $$ with $J(0) = \int_0^1 \frac{2\ln\frac{1-t^2}2}{1+t^2}dt= -2G$

$$J’(a)= \int_0^1 \left(\frac{\tan a}{t^2+2t\cos a+1} + \frac{\tan a}{t^2-2t\cos a+1} \right)dt=\frac\pi2 \sec a $$

$$J(\frac\pi6) = \int\limits_{0}^{1} \frac{\ln(1-t^2+t^4)-\ln3}{1+t^2}dt=\frac12I-\frac\pi4\ln3 $$

Then

\begin{align} I &= \frac\pi2\ln3+2J(\frac\pi6) = \frac\pi2\ln3+2J(0) +2\int_0^{\pi/6} J’(a)da\\ &=\pi \ln3-4G \end{align}


$$I=\int\limits_{0}^{1} \frac{\log(1-x+x^2)}{\sqrt{x}(1+x)}dx\overset{t=1/x}=\int\limits_{1}^{\infty} \frac{\log(1-t+t^2)}{\sqrt{t}(1+t)}dt-\int\limits_{1}^{\infty} \frac{\log(t^2)}{\sqrt{t}(1+t)}dt$$

$$I=\frac{1}{2}\bigl(\int\limits_{0}^{\infty} \frac{\log(1-t+t^2)}{\sqrt{t}(1+t)}dt-\int\limits_{1}^{\infty} \frac{\log(t^2)}{\sqrt{t}(1+t)}dt\bigr)\overset{x=\sqrt{t}}=$$$$=\frac{1}{2}\int\limits_{-\infty}^{\infty} \frac{\log(1-x^2+x^4)}{1+x^2}dx-4\int\limits_{1}^{\infty} \frac{\log(x)}{1+x^2}dx$$

Branch points of logarithm: $e^{\frac{\pi{i}}{6}}, e^{\frac{5\pi{i}}{6}}, e^{\frac{-\pi{i}}{6}}, e^{\frac{-5\pi{i}}{6}}$

For the first couple of roots we close the contour in the bottom half of the complex plane, for the second - in the upper-half.

$$I=\frac{2\pi{i}}{2*2i}\log\Bigl((-i-e^{\frac{\pi{i}}{6}})(-i-e^{\frac{5\pi{i}}{6}})(i-e^{\frac{-\pi{i}}{6}})(i-e^{\frac{-5\pi{i}}{6}})\Bigr)-4G$$ $$I=\frac{\pi}{2}\log\biggl(4(1+\sin{\frac{5\pi}{6}})(1+\sin{\frac{\pi}{6}})\biggr)-4G=\frac{\pi}{2}\log(3^2)-4G=\pi\log3-4G$$


Svyatoslav showed that $$\int_{0}^{1} \frac{\log(1-x+x^{2})}{\sqrt{x}(1+x)} \, \mathrm dx = \frac{1}{2} \int_{-\infty}^{\infty} \frac{\log(1-x^{2}+x^{4})}{1+x^{2}} \, \mathrm dx- 4 G.$$

The following is a slightly different way to show that $$\int_{-\infty}^{\infty} \frac{\log(1-x^{2}+x^{4})}{1+x^{2}} \, \mathrm dx = 2 \pi \log (3). $$


First notice that $$ \begin{align} \int_{-\infty}^{\infty} \frac{\log(1-x^{2}+x^{4})}{1+x^{2}} \, \mathrm dx &= \int_{-\infty}^{\infty} \frac{\log(1+\sqrt{3}x+x^{2})}{1+x^{2}} \, \mathrm dx+ \int_{-\infty}^{\infty} \frac{\log(1-\sqrt{3}x+x^{2})}{1+x^{2}} \, \mathrm dx \\ &= \int_{-\infty}^{\infty} \frac{\log(1+\sqrt{3}x+x^{2})}{1+x^{2}} \, \mathrm dx + \int_{\infty}^{-\infty} \frac{\log(1+\sqrt{3}u + u^{2})}{1+u^{2}} (- \mathrm du) \\ &= 2 \int_{-\infty}^{\infty} \frac{\log(1+\sqrt{3}x+x^{2})}{1+x^{2}} \, \mathrm dx \end{align}$$

In a previous answer I used contour integration to show that $$I(a,b,\theta) = \int_{-\infty}^{\infty} \frac{\log \left(a^{2}+2ax \cos \theta + x^{2}\right)}{x^{2}+b^{2}} \, \mathrm dx = \frac{\pi}{b} \, \log \left(a^{2}+2ab \sin \theta +b^{2} \right), $$ where $a, b >0$ and $0 < \theta < \pi$.

Therefore, $$ \int_{-\infty}^{\infty} \frac{\log(1-x^{2}+x^{4})}{1+x^{2}} \, \mathrm dx = 2 I \left( 1,1, \frac{\pi}{6} \right) = 2 \pi \log(3).$$