TITLE: Prove $\int^{\infty}_0 \frac{\sin(\sqrt{x})\ln^2\big(\frac{1}{\sqrt{x}}\big)}{x}dx=\frac{\pi^3}{12}+\gamma^2 \pi$
QUESTION [5 upvotes]: I came across the following integral

Prove
$$\int^{\infty}_0 \frac{\sin(\sqrt{x})\ln^2\big(\frac{1}{\sqrt{x}}\big)}{x}dx=\frac{\pi^3}{12}+\gamma^2 \pi$$

where $\gamma$ is the euler-mascheroni constant.
I simplify the integral.
let $x=u^2 \Rightarrow dx=2udu$
$$\Rightarrow\int^{\infty}_0 \frac{\sin(\sqrt{x})\ln^2\big(\frac{1}{\sqrt{x}}\big)}{x}dx\
= 2\int^{\infty}_0 \frac{\sin(u)\ln^2(u)}{u}du$$
How does one proceed from here?
Is there a particular formula or theorem that I need to use? Am I in too deep water if I can't figure this out?
Thank you for your time

REPLY [7 votes]: We start with the substitution $ x\mapsto x^2$ and noting that $\ln^2(1/x) = \ln^2x$.
$$I =2  \int_0^\infty \frac{\sin(x)\ln^2x}{x}\, dx $$
Now, let
$$I(k) = \int_0^\infty \frac{\sin x}{x^k}\, dx\qquad 0\lt k\le 1$$
Also, we have
$$\frac1{x^k} =\frac1{\Gamma(k)} \int_0^\infty e^{-xt}t^{k-1}\, dt $$
Using this result
$$\begin{align} I (k)&= \frac1{\Gamma(k)} \int_0^\infty\int_0^\infty e^{-xt}\sin(x)t^{k-1}\, dtdx \\  &= \frac1{\Gamma(k)} \int_0^\infty\int_0^\infty e^{-xt}\sin(x)t^{k-1}\, dxdt \\ &= \frac1{\Gamma(k)}\int_0^\infty \frac{t^{k-1}}{t^2+1} \, dt \\ I(k) &= \frac{\pi}{2\Gamma(k)\sin\frac{\pi k}{2}} \end{align}$$
To get the last result, we use the substitution $t^2 \mapsto t$ and the classical result $\int_0^\infty \frac{t^{s-1}}{1+t}\, dt = \frac{\pi}{\sin (\pi s)} $. I wasn't able to justify the interchange of the two integrals.
Now differentiating both sides twice w.r.t. $k$ and letting $k \to 1 $ we get
$$  \int_0^\infty \frac{\sin(x)\ln^2x}{x}\, dx= \frac I2 = \frac{\pi \gamma^2}{2}+\frac{\pi^3}{24} $$