[Math] Integral $\int_0^\infty \frac{\ln(1+x+x^2)}{1+x^2}dx$

closed-formdefinite integralsintegration

Prove that$$I=\int_0^\infty \frac{\ln(1+x+x^2)}{1+x^2}dx=\frac{\pi}{3}\ln(2+\sqrt 3)+\frac43G$$

I've found this integral in my notebook and perhaps I encountered it before since it looks quite familiar.
Anyway I thought it's quite a trivial integral so I'm gonna solve it quickly, but I am having some hard time to finish it. I went on with Feynman's trick:

$$I(a)=\int_0^\infty \frac{\ln((1+x^2)a+x)}{1+x^2}dx\Rightarrow I'(a)=\int_0^\infty \frac{dx}{a+x+ax^2}$$
$$=\frac1a\int_0^\infty \frac{dx}{\left(x+\frac{1}{2a}\right)^2+1-\frac{1}{4a^2}}=\frac{1}{a}\frac{1}{\sqrt{1-\frac{1}{4a^2}}}\arctan\left(\frac{x+\frac{1}{2a}}{\sqrt{1-\frac{1}{4a^2}}}\right)\bigg|_0^\infty$$$$=\frac{\pi}{\sqrt{4a^2-1}}-\frac{2}{\sqrt{4a^2-1}}\arctan\left(\frac{1}{\sqrt{4a^2-1}}\right)=\frac{2\arctan\left(\sqrt{4a^2-1}\right)}{\sqrt{4a^2-1}}$$
We can prove easily via the substitution $x\to \frac{1}{x}$ that $I(0)=0$ so we have that:
$$I=I(1)-I(0)=2\int_0^1 \frac{\arctan\left(\sqrt{4a^2-1}\right)}{\sqrt{4a^2-1}}da$$
Now I thought about two substitutions:
$$ \overset{a=\frac12\cosh x}=\int_{\operatorname{arccosh}(0)}^{\operatorname{arccosh}(2)} \arctan(\sinh x)dx$$
$$\overset{a=\frac12\sec x}=\int_{\operatorname{arcsec}(0)}^{\frac{\pi}{3}}\frac{x}{\cos x}dx$$
But in both cases the lower bound is annoying and I think I am missing something here (maybe obvious).
So I would love to get some help in order to finish this.


Edit: We can apply once again Feynman's trick. First consider: $$I(t)=\int_0^1 \frac{2\arctan(t\sqrt{4a^2-1})}{\sqrt{4a^2-1}}da\Rightarrow I'(t)=2\int_0^1 \frac{1}{1+t^2(4a^2-1)}da$$
$$=\frac{1}{t\sqrt{1-t^2}}\arctan\left(\frac{2at}{\sqrt{1-t^2}}\right)\bigg|_0^1=\frac{1}{t\sqrt{1-t^2}}\arctan\left(\frac{2t}{\sqrt{1-t^2}}\right)$$
So once again we have $I(0)=0$, so $I=I(1)-I(0)$.
$$\Rightarrow I=\int_0^1\frac{1}{t\sqrt{1-t^2}}\arctan\left(\frac{2t}{\sqrt{1-t^2}}\right)dt\overset{t=\sin x}=\int_0^\frac{\pi}{2}\frac{\arctan(2\tan x)}{\sin x}dx$$
At this point Mathematica can evaluate the integral to be:
$$I=\frac{\pi}{3}\ln(2+\sqrt 3)+\frac43G$$
I didn't try the last integral yet, but I am thinking of Feynman again $\ddot \smile$.


Edit 2: Found that I already was on it some time ago, and actually posted it here, which means I have solved it before using Feynman's trick, but right now I can't remember how I did it.

So given the circumstances I am positive that it can be solved starting with my approach, but if you have any other ways then feel free to share it.

Best Answer

Solution 1.

By splitting the integral at $1$ and letting $x\to \frac{1}{x}$ in the second part, we get:$$I=\int_0^\infty \frac{\ln(1+x+x^2)}{1+x^2}dx=\int_0^1 \frac{\ln(1+x+x^2)+\ln\left(1+\frac{1}{x}+\frac{1}{x^2}\right)}{1+x^2}dx$$ $$=2\int_0^1 \frac{\ln(1+x+x^2)}{1+x^2}dx-2\int_0^1 \frac{\ln x}{1+x^2}dx$$ Via the substitution $x=\frac{1-t}{1+t}\Rightarrow dx=-\frac{2}{(1+t)^2}dt$ and using this, we obtain: $$I=2\int_0^1\frac{\ln\left(\frac{3+t^2}{(1+t)^2}\right)}{1+t^2}dt+2G=2\int_0^1 \frac{\ln(3+t^2)}{1+t^2}dt-4\int_0^1\frac{\ln(1+t)}{1+t^2}+2G$$ The second one is a well known Putnam integral, and for the first one we can try to use Feynman's trick. $$I=2J-\frac{\pi}{2}\ln 2+2G, \quad J=\int_0^1 \frac{\ln(3+x^2)}{1+x^2}dx$$

$$J(a)=\int_0^1 \frac{\ln(2+a(1+x^2))}{1+x^2}dx\Rightarrow J'(a)=\frac1a\int_0^1 \frac{dx}{\frac{a+2}{a}+x^2}dx$$ $$=\frac1a\sqrt{\frac{a}{a+2}}\arctan\left(x\sqrt{\frac{a}{a+2}}\right)\bigg|_0^1=\frac{1}{\sqrt{a(a+2)}}\arctan\left(\sqrt{\frac{a}{a+2}}\right)$$ We are looking to find $J=J(1)$, but we also have: $J(0)=\frac{\pi}{4}\ln 2$ so: $$J=J(1)-J(0)+J(0)=\underbrace{\int_0^1 J'(a)da}_{=K}+\frac{\pi}{4}\ln 2 $$ Now letting $\sqrt{\frac{a+2}{a}}=x\Rightarrow \frac{1}{\sqrt{a(a+2)}}da=-a dx=-\frac{2}{x^2-1}dx\,$ gives us: $$K=\int_0^1 \frac{1}{\sqrt{a(a+2)}}\arctan\left(\sqrt{\frac{a}{a+2}}\right)da=2\int_\sqrt 3^\infty \frac{\arctan \left(\frac{1}{x}\right)}{x^2-1}dx$$ $$=\frac{\pi}{2}\ln(2+\sqrt 3)-2\int_{\sqrt 3}^\infty \frac{\arctan x}{x^2-1}dx $$ $$H=2\int_{\sqrt 3}^\infty \frac{\arctan x}{x^2-1}dx\overset{x=\tan t}=-2\int_\frac{\pi}{3}^\frac{\pi}{2} \frac{t}{\cos(2t)}dt\overset{\large 2t=x+\frac{\pi}{2}}=\int_{\frac{\pi}{6}}^\frac{\pi}{2} \frac{\frac{\pi}{4}+\frac{x}{2}}{\sin x}dx$$ $$=\frac{\pi}{4}\ln\left(\tan\frac{x}{2}\right)\bigg|_\frac{\pi}{6}^\frac{\pi}{2}+\frac12 \int_0^\frac{\pi}{2}\frac{x}{\sin x}dx-\frac12\int_0^\frac{\pi}{6}\frac{x}{\sin x}dx$$ The last two integrals are linked in this post and using their values we get: $$H=\frac{\pi}{4}\ln(2+\sqrt 3)+G+\frac{\pi}{12}\ln(2+\sqrt 3)-\frac23G=\boxed{\frac{\pi}{3}\ln(2+\sqrt 3)+\frac13G}$$ $$\Rightarrow \boxed{K=\frac{\pi}{6}\ln(2+\sqrt 3)-\frac13G}\Rightarrow \boxed{J=\frac{\pi}{6}\ln(2+\sqrt 3)+\frac{\pi}{4}\ln 2-\frac13G}$$ $$\Rightarrow I=\int_0^\infty \frac{\ln(1+x+x^2)}{1+x^2}dx=\boxed{\frac{\pi}{3}\ln(2+\sqrt 3)+\frac43G}$$


Solution 2.

We can start by considering: $$A=\int_0^\frac{\pi}{2} \ln(2+\sin x)dx,\quad B=\int_0^\frac{\pi}{2}\ln(2-\sin x)dx$$ Like in mrtaurho's approach we have: $$I=\frac{\pi}{2}\ln 2 +A=\frac{\pi}{2}\ln 2+\frac12\left((A+B)+(A-B)\right)\tag 1$$ A solution for $A-B\,$ can be found here. $$A-B=\int_0^\frac{\pi}{2}\ln\left(\frac{2+\sin x}{2-\sin x}\right)dx=-\frac{\pi}{3}\ln(2+\sqrt 3) +\frac{8}{3}G\tag2$$ And for $A+B$ we can directly use this result. $$A+B=\int_0^\frac{\pi}{2} \ln(4-\sin^2 x)=\int_0^\frac{\pi}{2} \ln(4\cos^2x +3\sin^2 x)dx$$$$=\pi \ln 2 +\int_0^\frac{\pi}{2} \ln\left(\cos^2 x+\frac34 \sin^2 x\right)dx=\pi\ln\left(1+\frac{\sqrt 3}{2}\right)\tag3$$ Now plugging $(2)$ and $(3)$ into $(1)$ yields the result.

$$\boxed{I=\frac{\pi}{2}\ln 2+\frac12\left(\pi\ln(2+\sqrt 3)-\pi \ln 2-\frac{\pi}{3}\ln(2+\sqrt 3)+\frac83G\right)=\frac{\pi}{3}\ln(2+\sqrt 3)+\frac43G}$$