I'm trying to prove divergence of the integral $\int_1^{\infty}\frac{\left|\cos{x^2}\right|}{x^q}dx$, where $0, by applying the mean-value theorem to $\int_{n\pi}^{(n+1)\pi}\frac{\left|\cos{x^2}\right|}{x^q}dx$: there exists $c_n\in [n\pi,(n+1)\pi]$ such that $\int_{n\pi}^{(n+1)\pi}\frac{\left|\cos{x^2}\right|}{x^q}dx=\left|\cos{c_n^2}\right|\int_{n\pi}^{(n+1)\pi}\frac{1}{x^q}dx$. So if I can show that $\inf{\left|\cos{c_n^2}\right|}\neq 0$, we would have the divergence, by comparison with $\int_1^{\infty}\frac{1}{x^q}dx$. It isn't apparent to me how to prove that bit.
I know that the divergence can also be proved by noting that $\left|\cos{x^2}\right|\geq\cos^2{x^2}=\frac{1+\cos{2x^2}}{2}$ and using a test akin to Dirichlet's test for series to prove the convergence of $\int_1^{\infty}\frac{\cos{2x^2}}{x^q}dx$.
But I'd like to know if my idea can be finished.
Thank you.