Does $\int_0^\infty |\cos(x^2)| \mathrm dx$ converge? I know this is a silly question, but I've tried to find an answer using my TI-89 calculator, Maple and wolframalpha but none of those could tell me whether
$$\int_0^\infty |\cos(x^2)| \mathrm dx$$
converges or diverges.
Thus, I'd be very happy if someone could help me out and tell me, whether the given integral converges or not (and why?). Thanks a lot. 
 A: There is a standard technique we learned for dealing with integrals of the form $(*) \int_{a}^{\infty}f(x)\cos (\alpha x)dx$ or $\int_{a}^{\infty}f(x)\sin (\alpha x)dx$ when $f(x)$ is continuous and positive in $[a, \infty)$.


*

*If $\int_{a}^{\infty}f(x)dx$ converges, then (*) converges absolutely by the comparison test because $|f(x)\sin (\alpha x)|\leq f(x)$ (or $|f(x)\cos (\alpha x)|\leq f(x)$).

*If $\int_{a}^{\infty}f(x)dx$ diverges while $f(x)$ is decreasing and $\lim_{x\to\infty}f(x)=0$ then the integrals (*) converge conditionally by Dirichlets test.
I'll illustrate the technique on your integral:
First, lets substitute $t=x^2$, then $(**) \int_{0}^{\infty} \cos(x^2) \mathrm dx=\int_{0}^{\infty} \frac{\cos(t)}{2 \sqrt t} \mathrm dt$. 
Let $f(x)=\frac{1}{2\sqrt x}$ then $f(x)$ is decreasing and $\lim_{x\to\infty}f(x)=0$. Also $cos(x)$ has a bounded anti-derivative. Therefore (**) converges by Dirichlets test.
Now we observe that $|\frac{\cos(x)}{2 \sqrt x}|\geq \frac{\cos^2(x)}{2 \sqrt x}=\frac{1}{4\sqrt x}+\frac{\cos(2x)}{4\sqrt x}$. By the same arguments above $\int_{0}^{\infty}\frac{\cos(2x)}{4\sqrt x}dx$ converges. But then if we assume that $\int_{0}^{\infty}\frac{\cos^2(x)}{2 \sqrt x}$ converges, we get that $\int_{0}^{\infty}\frac{1}{4\sqrt x}$ converges and that's obviously not true. 
A: It diverges.  You should be able to prove that $|\cos(x^2)|>0.1$ for most x.  If you let x=$\sqrt{\pi}u$ it is easier to assess the range of u where the cosine is close to zero.
A: Another method: You could write it as the sum of the integrals on the intervals $\left[\sqrt{\frac{\pi}{2}+k\pi},\sqrt{\frac{\pi}{2}+(k+1)\pi}\right]$, and make a substitution $u=x^2$ to bound the integral on such an interval below by $\frac{1}{\sqrt{\frac{\pi}{2}+(k+1)\pi}}$.  (I'm ignoring the interval $\left[0,\sqrt{\frac{\pi}{2}}\right]$.)
Using the inequality $\frac{\pi}{2}+(k+1)\pi\leq(k+2)\pi$ along with an integral comparison then leads to the estimate 
$$\int_0^\sqrt{\frac{\pi}{2}+N\pi}|\cos(x^2)|dx\geq\frac{2}{\sqrt{\pi}}(\sqrt{N}-\sqrt{2}).$$
