Evaluation of $\int_0^\infty \frac{\ln^2(x)}{1+x^2}dx$

calculusintegration

While evaluating some integrals I came across this one that got me stuck:
$$I=\int_0^\infty \frac{\ln^2(x)}{1+x^2}dx=\frac{\pi^3}{8}$$
The result is from wolframalpha since I wasn't able to compute it.

Firstly I thought of series expansion of $\frac{1}{1+x^2}$, but it's wrong since we are not integrating in $(0,1)$ but in $(0,+\infty)$ so the series doesn't converge.

Then I tried with the substitution $x=\tan(t)$, and this way the integral reduces to

$$I=\int_0^\frac{\pi}{2} \ln^2(\tan(t)) dt$$

but got stuck again. Can anybody provide a solution?

Best Answer

Hint: To exploit the series expansion, make a substitution over part of the integration interval.

$$\int_1^\infty \frac{\ln^2(x)}{1+x^2}\,dx \stackrel{x\mapsto\tfrac1x}= \int_0^1 \frac{\ln^2\left(\frac1x\right)}{1+\frac1{x^2}}\,\frac{dx}{x^2} = \int_0^1 \frac{\ln^2(x)}{1+x^2} \, dx\\ \implies I = 2\int_0^1 \frac{\ln^2(x)}{1+x^2}\,dx$$