Convergence of the integral $\int _0^\infty \ln^2x\sin(x^2)\,dx$ $$\int _0^\infty (\ln^2x)\sin(x^2)dx$$
Does this converge?
In the answers in our textbook, we've been told that since the inner function limit's in in infinity is not 0 then the integral doesn't converge. I couldn't find a theorem that states this though.
Are there any other good ways to prove that this integral diverges?
 A: There is no real difficulty at $0$, since near $0$ the function $\sin(x^2)$ behaves like $x^2$, so $\lim_{x\to 0^+}\ln^2 x\sin(x^2)=0$. So we examine
$$\int_1^B (\ln^2 x)( \sin(x^2))\,dx.\tag{1}$$
Rewrite as
$$\int_1^B \frac{\ln^2 x}{2x} 2x \sin(x^2)\,dx,$$
and use integration by parts, letting $u=\frac{\ln^2 x}{2x}$ and $dv=2x\sin(x^2)\,dx$. Then  $du=\frac{2\ln x-\ln^2 x}{2x^2}\,dx$ and we can take $v=-\cos(x^2)$. Thus our integral (1) is
$$\left.\left(-\frac{\ln^2 x}{2x}\cos(x^2)\right)\right|_1^B +\int_1^B \frac{2\ln x-\ln^2 x}{2x^2}\cos(x^2)\,dx.$$
The first part gives no problem, indeed it vanishes as $B\to\infty$. The remaining integral has a (finite) limit as $B\to\infty$, because $\cos(x^2)$ is bounded and the $2x^2$ in tthe denominator crushes the $\ln$ terms in the numerator.  
It follows that our original integral converges. 
A: The textbook's answer is wrong, and there is no way to prove that this integral diverges. Instead, there are ways to establish its convergence.
Since the integrand is  continuous on segment $[0,1]$, it suffices to verify convergence on $(1,\infty)$, which can be established by substituting $x=\sqrt{t}$ followed by integrating by parts, thus reducing the integral to an absolutely convergent one:$$\int\limits_1^{\infty}(\ln{x})^2\sin(x^2)\,dx=\frac{1}{8}\cdot\!\!\int\limits_1^{\infty}\frac{(\ln{t})^2}{\sqrt{t}}\!\cdot \sin{t}\,dt=-\frac{1}{8}\cdot\!\!\int\limits_1^{\infty}\frac{(\ln{t})^2}{\sqrt{t}}\,d(\cos{t})=\dots$$
A: $\newcommand{\+}{^{\dagger}}%
 \newcommand{\angles}[1]{\left\langle #1 \right\rangle}%
 \newcommand{\braces}[1]{\left\lbrace #1 \right\rbrace}%
 \newcommand{\bracks}[1]{\left\lbrack #1 \right\rbrack}%
 \newcommand{\ceil}[1]{\,\left\lceil #1 \right\rceil\,}%
 \newcommand{\dd}{{\rm d}}%
 \newcommand{\down}{\downarrow}%
 \newcommand{\ds}[1]{\displaystyle{#1}}%
 \newcommand{\equalby}[1]{{#1 \atop {= \atop \vphantom{\huge A}}}}%
 \newcommand{\expo}[1]{\,{\rm e}^{#1}\,}%
 \newcommand{\fermi}{\,{\rm f}}%
 \newcommand{\floor}[1]{\,\left\lfloor #1 \right\rfloor\,}%
 \newcommand{\half}{{1 \over 2}}%
 \newcommand{\ic}{{\rm i}}%
 \newcommand{\iff}{\Longleftrightarrow}
 \newcommand{\imp}{\Longrightarrow}%
 \newcommand{\isdiv}{\,\left.\right\vert\,}%
 \newcommand{\ket}[1]{\left\vert #1\right\rangle}%
 \newcommand{\ol}[1]{\overline{#1}}%
 \newcommand{\pars}[1]{\left( #1 \right)}%
 \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}}
 \newcommand{\pp}{{\cal P}}%
 \newcommand{\root}[2][]{\,\sqrt[#1]{\,#2\,}\,}%
 \newcommand{\sech}{\,{\rm sech}}%
 \newcommand{\sgn}{\,{\rm sgn}}%
 \newcommand{\totald}[3][]{\frac{{\rm d}^{#1} #2}{{\rm d} #3^{#1}}}
 \newcommand{\ul}[1]{\underline{#1}}%
 \newcommand{\verts}[1]{\left\vert\, #1 \,\right\vert}$
\begin{align}
&\color{#00f}{\large\int_{0}^{\infty}\ln^{2}\pars{x}\sin\pars{x^{2}}\,\dd x}
=\int_{0}^{\infty}\ln^{2}\pars{x^{1/2}}\sin\pars{x}\,\half\,x^{-1/2}\dd x
\\[3mm]&={1 \over 8}\int_{0}^{\infty}x^{-1/2}\ln^{2}\pars{x}\sin\pars{x}\,\dd x
\\[3mm]&={1 \over 8}\lim_{\mu \to -1/2}\partiald[2]{}{\mu}
\Im\int_{0}^{\infty}x^{\mu}\expo{\ic x}\,\dd x
=
{1 \over 8}\lim_{\mu \to -1/2}\partiald[2]{}{\mu}
\Im\int_{0}^{\infty}\pars{\ic x}^{\mu}\expo{-x}\ic\,\dd x
\\[3mm]&=
{1 \over 8}\lim_{\mu \to -1/2}\partiald[2]{}{\mu}
\Re\bracks{\expo{\ic\pi\mu/2}\int_{0}^{\infty}x^{\mu}\expo{-x}\,\dd x}
={1 \over 8}\lim_{\mu \to -1/2}\partiald[2]{}{\mu}
\Re\bracks{\expo{\ic\pi\mu/2}\Gamma\pars{\mu + 1}}
\\[3mm]&=\color{#00f}{\large{\root{2\pi} \over 64}\bracks{\pi + 2\Psi\pars{1/2}}^{2}}
\approx 0.0241614
\end{align}
Notice that $\Psi\pars{1/2} = -\gamma - 2\ln\pars{2}$ such that an equivalent result is
$$
\color{#00f}{\large{1 \over 32}\,\root{\pi \over 2}\bracks{2\gamma - \pi + \ln\pars{16}}^{2}}
$$
which is the usual result of symbolic software.
A: To see it (convergence), make the change of variables $t=\ln(x)$ which gives

$$ \int _{-\infty }^{\infty }\!{t}^{2}\sin \left( {{\rm e}^{2\,t}}
 \right) {{\rm e}^{t}}{dt}.$$

A: Consider the Gamma function
$$\Gamma(s)=\int_{0}^{\infty}{t^{s-1}\cdot e^{-t}dt} ,s\in \mathbb{R^{+}}$$ now consider the substitution $t=iu^{2}$ which yields the following $$\Gamma(s)=2e^{i\frac{\pi}{2}s}\int_{i0}^{i\infty}{u^{2s-1}\cdot e^{-i u^{2}}du}=_{(1)} 2e^{i\frac{\pi}{2}s}\int_{0}^{\infty}{u^{2s-1}\cdot e^{-i u^{2}}du}$$
Primarly we are aiming for evaluating $$\frac{\partial^{2}}{\partial s^{2}}[\frac{\Gamma(s)}{2}\cdot e^{-i \frac{\pi}{2}s}]_{s=\frac{1}{2}}= 4\int_{0}^{\infty}{log^{2}(u) \cdot e^{-i u^{2}}du}$$ Simplifying the derivatives on the LHS followed by an identification of the imaginary part we have that $$\int_{0}^{\infty}{log^{2}(u) sin(u^{2})du}=\frac{1}{8}\sqrt{\frac{\pi}{2}}(\gamma +log4 -\frac{\pi}{2})^{2}$$
I would appreciate if anyone could help me justify the equality step (1)
A: $\sin(x^2)>.5$ on $(\sqrt{\pi/6+2k\pi},\sqrt{5\pi/6+2k\pi}),k\in\mathbb{N}$.  When $x>e$, $\log^2(x)>1$, so we can see that the positive part of the integral is greater than $.5\sum_{k=2}^K \left(\sqrt{5\pi/6+2k\pi}-\sqrt{\pi/6+2k\pi}\right)$ for any $K\in\mathbb{N}\setminus\{1\}$.  Now see that 
$$
\sum_{k=2}^K \left(\sqrt{5\pi/6+2k\pi}-\sqrt{\pi/6+2k\pi}\right)=\sum_{k=2}^K \left(\frac{2\pi/3}{\sqrt{5\pi/6+2k\pi}+\sqrt{\pi/6+2k\pi}}\right)\geq\sum_{k=2}^K \left(\frac{2\pi/3}{\sqrt{5\pi/6+2k\pi}}\right)
$$
which we see is unbounded.  We conclude that the positive part of the integral is unbounded.  Similarly, we can conclude that the negative part of the integral is unbounded.  Therefore it is not integrable.
