prove $\int_0^\infty \frac{\log^2(x)}{x^2+1}\mathrm dx=\frac{\pi^3}{8}$ with real methods
Context: I looked up "complex residue" on google images, and saw this integral. I, being unfamiliar with the use of contour integration, decided to try proving the result without complex analysis. Seeing as I was stuck, I decided to ask you for help.
I am attempting to prove that $$J=\int_0^\infty\frac{\log^2(x)}{x^2+1}\mathrm dx=\frac{\pi^3}8$$ With real methods because I do not know complex analysis.
I have started with the substitution $x=\tan u$: $$J=\int_0^{\pi/2}\log^2(\tan x)\mathrm dx$$ $$J=\int_0^{\pi/2}\log^2(\cos x)\mathrm dx-2\int_{0}^{\pi/2}\log(\cos x)\log(\sin x)\mathrm dx+\int_0^{\pi/2}\log^2(\sin x)\mathrm dx$$ But frankly, this is basically worse.
Could I have some help? Thanks.
Update: Wait I think I actually found a viable method
$$F(\alpha)=\int_0^\infty \frac{x^{\alpha}}{x^2+1}\mathrm dx$$ As I have shown in other posts of mine, $$\int_0^\infty\frac{x^{2b-1}}{(1+x^2)^{a+b}}\mathrm dx=\frac12\mathrm{B}(a,b)=\frac{\Gamma(a)\Gamma(b)}{2\Gamma(a+b)}$$ so $$F(\alpha)=\frac12\Gamma\left(\frac{1+\alpha}2\right)\Gamma\left(\frac{1-\alpha}2\right)$$ And from $$\Gamma(1-s)\Gamma(s)=\frac\pi{\sin \pi s}$$ we see that $$F(\alpha)=\frac\pi{2\cos\frac{\pi \alpha}{2}}$$ So $$J=F''(0)=\frac{\pi^3}8$$
Okay while I have just found a proof, I would like to see which ways you did it.
Solution 1:
You can also write it as: $$I=\int_0^1\frac{\log^2(x)}{x^2+1}dx+\int_1^\infty \frac{\log^2(x)}{x^2+1}dx$$ In the second one do a $x\rightarrow \frac{1}{x}$ $$\Rightarrow I=2\int_0^1 \frac{\ln^2 x}{1+x^2}dx =2\sum_{n=0}^\infty (-1)^n\int_0^1 x^{2n}\ln^2 xdx$$$$\int_0^1 t^a dt=\frac{1}{a+1}\Rightarrow \int_0^1 t^a \ln^k tdt=\frac{d^k}{da^k} \left(\frac{1}{a+1}\right)=\frac{(-1)^k k!}{(a+1)^{k+1}}$$ $$\Rightarrow I=4\sum_{n=0}^\infty \frac{(-1)^{n} }{(2n+1)^3}=4\cdot\frac{\pi^3}{32}=\frac{\pi^3}{8}$$
Solution 2:
\begin{align} J&=\int_0^\infty\frac{\ln^2 x}{x^2+1}\mathrm dx\\ K&=\int_0^\infty\frac{\ln(x)}{x^2+1}\mathrm dx\\ K^2&=\int_0^\infty\frac{\ln x}{x^2+1}\mathrm dx\int_0^\infty\frac{\ln y}{y^2+1}\mathrm dy\\ &=\int_0^\infty \int_0^\infty\frac{\ln x\ln y}{(x^2+1)(y^2+1)}\mathrm dx\mathrm dy\\ &=\frac{1}{2}\int_0^\infty \int_0^\infty\frac{\ln(xy)^2-\ln^2 x-\ln^2 y}{(x^2+1)(y^2+1)}\mathrm dx\mathrm dy\\ &=\frac{1}{2}\int_0^\infty \int_0^\infty\frac{\ln(xy)^2}{(x^2+1)(y^2+1)}\mathrm dx\mathrm dy-\int_0^\infty \int_0^\infty\frac{\ln^2 x}{(x^2+1)(y^2+1)}\mathrm dx\mathrm dy\\ &=\frac{1}{2}\int_0^\infty \frac{1}{y^2+1}\left(\int_0^\infty\frac{\ln(xy)^2}{x^2+1}\mathrm dx\right)\mathrm dy-\frac{\pi}{2}J \end{align}
Perform the change of variable $u=xy$ ($x$ is the variable)
\begin{align}K^2&=\frac{1}{2}\int_0^\infty \int_0^\infty\frac{y\ln^2 u}{(y^2+1)(y^2+u^2)}\mathrm du\mathrm dy-\frac{\pi}{2}J\\ &=\frac{1}{4}\int_0^\infty\frac{\ln^2 u}{1-u^2}\left[\ln\left(\frac{u^2+y^2}{1+y^2}\right)\right]_{y=0}^{y=\infty}\mathrm du-\frac{\pi}{2}J\\ &=-\frac{1}{2}\int_0^\infty\frac{\ln^3 u}{1-u^2}\mathrm du\\ &=-\frac{1}{2}\left(\int_0^1\frac{\ln^3 u}{1-u^2}\mathrm du+\int_1^\infty\frac{\ln^3 u}{1-u^2}\mathrm du\right)-\frac{\pi}{2}J\\ \end{align}
In the second integral perform the change of variable $v=\dfrac{1}{u}$
\begin{align}K^2&=-\int_0^1\frac{\ln^3 u}{1-u^2}\mathrm du-\frac{\pi}{2}J\\ &=\frac{1}{2}\int_0^1\frac{2u\ln^3 u}{1-u^2}\mathrm du-\int_0^1\frac{\ln^3 u}{1-u}\mathrm du-\frac{\pi}{2}J \\\end{align}
In the first integral perform the change of variable $v=u^2$,
\begin{align}K^2&=\frac{1}{16}\int_0^1\frac{\ln^3 u}{1-u}\mathrm du-\int_0^1\frac{\ln^3 u}{1-u}\mathrm du-\frac{\pi}{2}J\\ &=-\frac{15}{16}\int_0^1\frac{\ln^3 u}{1-u}\mathrm du-\frac{\pi}{2}J\\ &=-\frac{15}{16}\times -6\zeta(4)-\frac{\pi}{2}J\\ &=\frac{45}{8}\zeta(4)-\frac{\pi}{2}J\\ \end{align}
Moreover, $K=0$ (perform the change of variable $v=\frac{1}{x}$)
Therefore,
\begin{align}J&=\frac{45}{4\pi}\zeta(4)\\ &=\frac{45}{4\pi}\times \frac{\pi^4}{90}\\ &=\boxed{\frac{\pi^3}{8}} \end{align}
Solution 3:
Recall the formula $$\int_0^\infty \frac{t^{x}}{1+t^2}dt=\frac{\pi}{2}\sec\frac{\pi x}{2}$$ Differentiating this formula twice with respect to $x$ yields the answer.
To derive this formula, use the following sequence of substitutions, the Beta Function, and the reflection formula of the Gamma Function: $$\begin{align} \int_0^\infty \frac{t^x}{1+t^2}dt &=\frac{1}{2}\int_0^\infty \frac{t^{(x-1)/2}}{1+t}dt \\ &=\frac{1}{2}\int_0^1 t^{(x-1)/2}(1-t)^{(-1-x)/2}dt\tag{1} \\ &=\frac{1}{2}\frac{\Gamma(\frac{1+x}{2})\Gamma(\frac{1-x}{2})}{\Gamma(1)} \\ &=\frac{\pi}{2}\sec\frac{\pi x}{2} \end{align}$$ where $(1)$was obtained by substituting $t\mapsto \frac{t}{1-t}$.
Solution 4:
Pretty straightforward this integral can be related to the Dirichlet Beta Function $\beta(s)$ and its integral representation which is given by
$$\beta(s)~=~\frac1{\Gamma(s)}\int_0^\infty \frac{t^{s-1}}{e^{t}+e^{-t}}\mathrm dt$$
Therefore, enforce the substitution $x=e^{-t}$ within your integral $J$ to obtain
\begin{align*} J=\int_0^\infty\frac{\log^2(x)}{1+x^2}\mathrm dx &= \int_{-\infty}^\infty\frac{t^2}{1+e^{-2t}}e^{-t}\mathrm dt\\ &=\int_0^\infty\frac{t^2}{1+e^{-2t}}e^{-t}\mathrm dt+\underbrace{\int_{-\infty}^0\frac{t^2}{1+e^{-2t}}e^{-t}\mathrm dt}_{t~\mapsto~ -t}\\ &=\int_0^\infty\frac{t^2}{e^t+e^{-t}}\mathrm dt+\int_0^\infty\frac{t^2}{1+e^{2t}}e^t\mathrm dt\\ &=2\int_0^\infty\frac{t^2}{e^t+e^{-t}}\mathrm dt\\ &=2\Gamma(3)\beta(3) \end{align*}
$$\therefore~J~=~2\int_0^\infty\frac{t^2}{e^t+e^{-t}}\mathrm dt~=~\frac{\pi^3}8$$
The result follows from the known value $\beta(3)=\frac{\pi^3}{32}$ for which a proofcan be found here for instance. The validity of the integral representation can be shown by utilizing the geometric series of the denominator combined with the change of summation and integration, which is allowed in this case, and followed by applying the Defintion of the Dirichlet Beta Function and the Gamma Function.