Calculate this integral, $\int_0^{\infty}\frac{\ln^2x}{1+x^2}dx$

$\displaystyle\int_0^{\infty}\dfrac{\ln^2x}{1+x^2}dx$

$x=\arctan\alpha$

$dx=\dfrac{1}{1+\alpha^2}d\alpha$

and try a lot items, but didnt arrived anywhere.

• According to Wolfram, there is no anti derivative in terms of standard functions, since this is a definite integral I suspect a "trickier" method must be used rather than conventional integration – imranfat Aug 10 '16 at 20:11
• okey okey,$\infty$ sorry. – user2312512851 Aug 10 '16 at 20:17
• Evaluate the closed contour integral $$\oint_C \frac{\log^3(z)}{z^2+1}\,dz$$where $C$ is the classical keyhole contour. – Mark Viola Aug 10 '16 at 20:27
• @OlivierOloa: I noticed, why do you tell me ? – Yves Daoust Aug 10 '16 at 20:39
• This type of integral was also computed at the following MSE link. – Marko Riedel Aug 10 '16 at 21:10

We may prove through Euler's beta function and the reflection formula for the $\Gamma$ function that for any $a\in(-1,1)$ we have $$I(a)=\int_{0}^{+\infty}\frac{x^a}{x^2+1}\,dx = \frac{\pi}{2\cos\left(\frac{\pi a}{2}\right)} \tag{1}$$ hence: $$I''(0) = \int_{0}^{+\infty}\frac{\log^2(x)}{x^2+1}\,dx = \lim_{a\to 0}\frac{\pi^3(3-\cos(a\pi))}{16\cos^3\left(\frac{\pi a}{2}\right)}=\color{red}{\frac{\pi^3}{8}}.\tag{2}$$

I would like to point out a related fact, too.

• This is really nice. – James Aug 11 '16 at 1:25

Hint. A possible route. One may write, with the change of variable $x \to \frac1x$, $$\int_0^{\infty}\dfrac{\ln^2x}{1+x^2}dx=\int_0^1\dfrac{\ln^2x}{1+x^2}dx+\int_1^{\infty}\dfrac{\ln^2x}{1+x^2}dx=2\int_0^1\dfrac{\ln^2x}{1+x^2}dx$$ then one may expand the integrand and integrate termwise, getting $$2\int_0^1\dfrac{\ln^2x}{1+x^2}dx=2\sum_{n=0}^\infty(-1)^n\int_0^1x^{2n}\ln^2xdx=4\sum_{n=0}^\infty\frac{(-1)^n}{(2n+1)^3}=\frac{\pi ^3}{8}.$$

• This approach is fine, but requires one to know the value of the series. An alternative is to evaluate the classical keyhole contour integral of $\frac{\log^3(z)}{z^2+1}$. Or even use Feynman's Trick and evaluate the second derivative of $\int_0^\infty \frac{x^a}{x^2+1}\,dx$ at $a=0$. ;-)) -Mark – Mark Viola Aug 10 '16 at 20:33

Let us evaluate it via the Mellin transform $$\mathcal{M}[f(x)](s) = \int\limits_{0}^{\infty} x^{s-1} f(x) \mathrm{d} x \label{eq:1608132} \tag{2}$$

where $$f(x) = \frac{1}{1+x^{2}} \label{eq:1608133} \tag{3}$$

Applying the Mellin transform, yields $$\mathcal{M}[f(x)](s) = \int\limits_{0}^{\infty} \frac{x^{s-1}}{1+x^{2}} \mathrm{d} x = \frac{\pi}{2}\csc\left(\frac{\pi}{2}s\right) \label{eq:1608134} \tag{4}$$

And thus \begin{align} \int\limits_{0}^{\infty} \frac{\mathrm{ln}^{2}(x)}{1+x^{2}} \mathrm{d} x & = \frac{\mathrm{d}^{2}}{\mathrm{d}s^{2}} \int\limits_{0}^{\infty} \frac{x^{s-1}}{1+x^{2}} \mathrm{d} x |_{s=1} \\ & = \frac{\mathrm{d}^{2}}{\mathrm{d}s^{2}} \frac{\pi}{2}\csc\left(\frac{\pi}{2}s\right) |_{s=1} \\ & = \frac{\pi^{3}}{16}[\cos(\pi s) + 3]\csc^{3}\left(\frac{\pi}{2}s\right) |_{s=1} \\ & = \frac{\pi^{3}}{8} \label{eq:1608135} \tag{5} \end{align}