# Integral $\int_0^1 \frac{(x^2+1)\ln(1+x)}{x^4-x^2+1}dx$

Greetings a while ago I met this integral $$I=\int_0^1 \frac{(x^2+1)\ln(1+x)}{x^4-x^2+1}dx$$ To be fair I spent some time with it and solved it in a heuristic way, I want to avoid that way so I won't show that approach, but the result I got is $$\frac{\pi}{6} \ln(2+\sqrt 3)$$ so I bet it can be shown in a nice way.

Solving other independent integrals I also met this one: $$J=\int_0^\infty \frac{\ln(1+x^2+x^4)}{1+x^2}dx=\pi \ln(2+\sqrt 3)$$ Which is pretty easy to compute, so most of my time I tried to show that $$J=6I$$, however without explictly evaluating them I had no luck.

Also I tried to use partial fractions: $$I=\frac12 \left(\int_0^1 \frac{\ln(1+x)}{x^2+\sqrt 3x +1}dx - \int_0^1 \frac{\ln(1+x)}{x^2-\sqrt 3 x+1}dx\right)$$ Considering: $$K(t) =\int_0^1 \frac{\ln(1+x)}{x^2-2\cos(t)x+1}dx$$ We have that: $$I=\frac12 \left(K\left(\frac{5\pi}{6}\right)-K\left(\frac{\pi}{6}\right)\right)$$, and since: $$\frac{\sin t}{x^2-2x\cos t+1}=\frac{1}{2i}\left(\frac{e^{it}}{1-xe^{it}}-\frac{e^{-it}}{1-xe^{-it}}\right)=\Im \left(\frac{e^{it}}{1-xe^{it}}\right)=$$ $$=\sum_{n=0}^{\infty} \Im\left(x^n e^{i(n+1)t}\right)=\sum_{n=0}^\infty x^n\sin((n+1)t)$$ the integral becomes: $$\frac12 \left(\frac{1}{\sin \left(\frac{5\pi}{6}\right)}\sum_{n=0}^\infty \sin\left(\frac{5\pi}{6} (n+1) \right) + \frac{1}{\sin \left(\frac{\pi}{6}\right)}\sum_{n=0}^\infty \sin\left(\frac{\pi}{6} (n+1) \right)\right)\int_0^1 x^n \ln(1+x)dx$$ $$=2\sum_{n=0}^\infty \sin\left(\frac{\pi}{6} (n+1) \right)\int_0^1 x^n \ln(1+x)dx$$ I dont know how to deal with the integral and the sum combined. I would love to get some help!

\begin{align}J&=\int_0^1 \frac{(x^2+1)\ln(1+x)}{x^4-x^2+1}dx\\ &=\int_0^1\int_0^1 \frac{x(x^2+1)}{(x^4-x^2+1)(1+xt)}\,dt\,dx\\ &=-\int_0^1\int_0^1 \frac{t(t^2+1)}{(t^4-t^2+1)(1+xt)}\,dt\,dx+\int_0^1\int_0^1 \frac{t^3+t^2x-\sqrt{3}t^2-\sqrt{3}tx+t+x}{2(t^4-t^2+1)(x^2-\sqrt{3}x+1)}\,dt\,dx+\\ &\int_0^1\int_0^1 \frac{t^3+t^2x+\sqrt{3}t^2+\sqrt{3}tx+t+x}{2(t^4-t^2+1)(x^2+\sqrt{3}x+1)}\,dt\,dx\\ &=-J+\int_0^1\int_0^1 \frac{t^3+t^2x-\sqrt{3}t^2-\sqrt{3}tx+t+x}{2(t^4-t^2+1)(x^2-\sqrt{3}x+1)}\,dt\,dx+\\ &\int_0^1\int_0^1 \frac{t^3+t^2x+\sqrt{3}t^2+\sqrt{3}tx+t+x}{2(t^4-t^2+1)(x^2+\sqrt{3}x+1)}\,dt\,dx\\ \end{align}

Since,

\begin{align}A_1&=\int_0^1 \frac{t}{t^4-t^2+1}\,dt\\ &=\frac{1}{\sqrt{3}}\left[\arctan\left(\frac{2t^2-1}{\sqrt{3}}\right)\right]_0^1\\ &=\frac{\pi}{3\sqrt{3}}\\ A_3&=\int_0^1 \frac{t^3}{t^4-t^2+1}\,dt\\ &=\frac{1}{12}\left[2\sqrt{3}\arctan\left(\frac{2t^2-1}{\sqrt{3}}\right)+3\ln(t^4-t^2+1)\right]_0^1\\ &=\frac{\pi}{6\sqrt{3}}\\ B_1&=\int_0^1 \frac{1}{x^2-\sqrt{3}x+1}\,dx\\ &=2\Big[\arctan\left(2x-\sqrt{3}\right)\Big]_0^1\\ &=\frac{5\pi}{6}\\ B_2&=\int_0^1 \frac{1}{x^2+\sqrt{3}x+1}\,dx\\ &=2\Big[\arctan\left(2x+\sqrt{3}\right)\Big]_0^1\\ &=\frac{\pi}{6}\\ C_1&=\int_0^1 \frac{x}{x^2-\sqrt{3}x+1}\,dx\\ &=\Big[\frac{1}{2}\ln\left(x^2-\sqrt{3}x+1\right)+\sqrt{3}\arctan\left(2x-\sqrt{3}\right)\Big]_0^1\\ &=\frac{1}{2}\ln\left(2-\sqrt{3}\right)+\frac{5}{4\sqrt{3}}\pi\\ C_2&=\int_0^1 \frac{x}{x^2+\sqrt{3}x+1}\,dx\\ &=\Big[\frac{1}{2}\ln\left(x^2+\sqrt{3}x+1\right)-\sqrt{3}\arctan\left(2x+\sqrt{3}\right)\Big]_0^1\\ &=\frac{1}{2}\ln\left(2+\sqrt{3}\right)-\frac{1}{4\sqrt{3}}\pi\\ A_2&=\int_0^1 \frac{t^2}{t^4-t^2+1}\,dt\\ &=\int_0^1 \frac{t^2+1}{t^4-t^2+1}\,dt-\int_0^1 \frac{1}{t^4-t^2+1}\,dt\\ &=\left[\arctan\left(\frac{x}{1-x^2}\right)\right]_0^1-\frac{1}{2\sqrt{3}}\int_0^1 \frac{x}{x^2+\sqrt{3}x+1}\,dx+\frac{1}{2\sqrt{3}}\int_0^1 \frac{x}{x^2-\sqrt{3}x+1}\,dx-\\ &\frac{1}{2}\int_0^1 \frac{1}{x^2+\sqrt{3}x+1}\,dx-\frac{1}{2}\int_0^1 \frac{1}{x^2-\sqrt{3}x+1}\,dx\\ &=\frac{\pi}{2}-\frac{1}{2\sqrt{3}}C_2+\frac{1}{2\sqrt{3}}C_1-\frac{1}{2}B_2-\frac{1}{2}B_1\\ &=\frac{\pi}{4}-\frac{1}{2\sqrt{3}}\ln\left(2+\sqrt{3}\right)\\ A_0&=\int_0^1 \frac{1}{t^4-t^2+1}\,dt\\ &=\int_0^1 \frac{1+t^2}{t^4-t^2+1}\,dt-\int_0^1 \frac{t^2}{t^4-t^2+1}\,dt\\ &=\left[\arctan\left(\frac{x}{1-x^2}\right)\right]_0^1-A_2\\ &=\frac{\pi}{4}+\frac{1}{2\sqrt{3}}\ln\left(2+\sqrt{3}\right)\\ \end{align}

then,

\begin{align} 2J&=\left(\frac{1}{2}A_3B_1+\frac{1}{2}A_2C_1-\frac{\sqrt{3}}{2}A_2B_1-\frac{\sqrt{3}}{2}A_1C_1+\frac{1}{2}A_1B_1+\frac{1}{2}A_0C_1\right)+\\ &\left(\frac{1}{2}A_3B_2+\frac{1}{2}A_2C_2+\frac{\sqrt{3}}{2}A_2B_2+\frac{\sqrt{3}}{2}A_1C_2+\frac{1}{2}A_1B_2+\frac{1}{2}A_0C_2\right)\\ \end{align}

Since,

\begin{align}\frac{1}{2}A_3B_1&=\frac{5\pi^2}{72\sqrt{3}}\\ \frac{1}{2}A_2C_1&=\frac{5\pi^2}{32\sqrt{3}}+\frac{\pi}{16}\ln\left(2-\sqrt{3}\right)-\frac{1}{8\sqrt{3}}\ln\left(2-\sqrt{3}\right)\ln\left(2+\sqrt{3}\right)-\frac{5\pi}{48}\ln\left(2+\sqrt{3}\right)\\ -\frac{\sqrt{3}}{2}A_2B_1&=\frac{5\pi}{24}\ln\left(2+\sqrt{3}\right)-\frac{5\pi^2}{16\sqrt{3}}\\ -\frac{\sqrt{3}}{2}A_1C_1&=-\frac{\pi}{12}\ln\left(2-\sqrt{3}\right)-\frac{5\pi^2}{24\sqrt{3}}\\ \frac{1}{2}A_1B_1&=\frac{5\pi^2}{36\sqrt{3}}\\ \frac{1}{2}A_0C_1&=\frac{\pi}{16}\ln\left(2-\sqrt{3}\right)+\frac{5\pi^2}{32\sqrt{3}}+\frac{1}{8\sqrt{3}}\ln\left(2-\sqrt{3}\right)\ln\left(2+\sqrt{3}\right)+\frac{5\pi}{48}\ln\left(2+\sqrt{3}\right)\\ \frac{1}{2}A_3B_2&=\frac{\pi^2}{72\sqrt{3}}\\ \frac{1}{2}A_2C_2&=\frac{\pi}{12}\ln\left(2+\sqrt{3}\right)-\frac{\pi^2}{32\sqrt{3}}-\frac{1}{8\sqrt{3}}\ln^2\left(2+\sqrt{3}\right)\\ \frac{\sqrt{3}}{2}A_2B_2&=\frac{\pi^2}{16\sqrt{3}}-\frac{\pi}{24}\ln\left(2+\sqrt{3}\right)\\ \frac{\sqrt{3}}{2}A_1C_2&=\frac{\pi}{12}\ln\left(2+\sqrt{3}\right)-\frac{\pi^2}{24\sqrt{3}}\\ \frac{1}{2}A_1B_2&=\frac{\pi^2}{36\sqrt{3}}\\ \frac{1}{2}A_0C_2&=\frac{1}{8\sqrt{3}}\ln^2\left(2+\sqrt{3}\right)+\frac{\pi}{24}\ln\left(2+\sqrt{3}\right)-\frac{\pi^2}{32\sqrt{3}}\\ \end{align}

Therefore,

\begin{align}2J&=\frac{\pi}{24}\ln\left(2-\sqrt{3}\right)+\frac{3\pi}{8}\ln\left(2+\sqrt{3}\right)\end{align}

Since,

\begin{align}\left(2-\sqrt{3}\right)\left(2+\sqrt{3}\right)=1\end{align}

Therefore,

\begin{align}2J&=-\frac{\pi}{24}\ln\left(2+\sqrt{3}\right)+\frac{3\pi}{8}\ln\left(2+\sqrt{3}\right)\\ &=\frac{\pi}{3}\ln\left(2+\sqrt{3}\right) \end{align}

Thus,

\begin{align}\boxed{J=\frac{\pi}{6}\ln\left(2+\sqrt{3}\right)} \end{align}

Here is a hint:

For some constants $$p$$,$$q$$ consider the integral

$$L_{p,q} = \int_0^1 \frac{ln(1+px)}{1+qx} dx$$

and do an Integration by parts (Focus on Integration of $$\frac{1}{1+qx}$$, while the other factor will only be differentiated). Thus:

$$L_{p,q} = [ln(1+px)ln(1+qx)/q]_0^1 - \frac{p}{q} \int_0^1 \frac{ln(1+qx)}{1+px} dx = [ln(1+px)ln(1+qx)/q]_0^1 - \frac{p}{q} L_{q,p} = ln(1+p)ln(1+q)/q - \frac{p}{q} L_{q,p}$$.

This is only a System of linear algebraic equations for the $$L_{q,p}$$. Identify the Parameters and solve the System of two algebraic equations (one for the integral of desire and the other one with p,q reversed).

• Thanks! I will try to digest it tomorrow as I need to sleep. – Zacky Oct 18 '18 at 22:31
• Unfortunately, if you reverse $p$ and $q$, then you get the same equation: $$p\,L_{p,q}+q\,L_{q,p}=\ln\big((1+p)(1+q)\big)\,.$$ So, you cannot solve for $L_{p,q}$. But this looks very nice. – Batominovski Oct 18 '18 at 22:35
• Sorry I cannot see how to use your hint, can you give some further indications? – Zacky Oct 19 '18 at 9:58
• I can also give you a hint for the integral $Q_n:=\int x^nln(1+x)dx$. If you integrate the function $ln(1+x)$, you obtain $(1+x)ln(1+x)-(1+x)$. After Differentiation of the $x^n$ you have $Q_n = ((1+x)ln(1+x)-(1+x))x^n - n\int x^nln(1+x)dx - n \int x^{n-1}ln(1+x)dx + n \int x^{n-1}(1+x)dx = nQ_n - nQ_{n-1} + n \int x^{n-1}(1+x)dx + ((1+x)ln(1+x)-(1+x))x^n$ – kryomaxim Oct 19 '18 at 10:30
• Feyman's trick works fine. (it's a bit lenghty) – FDP Oct 19 '18 at 11:01