Does $$\int^{\infty}_{0}\frac{\cos ^2\left(3x+1\right)}{\sqrt{x}+1} dx$$converge/diverge?
Around $\infty$, this function behaves like:
$$\frac{\cos ^2(3x)}{\sqrt{x}} dx$$
but this does that tell me anything about its convergence or divergence? How can I proceed from here? Something I do notice that that $\cos^2(3x)$ oscillates between $0$ and $1$, and so I think it diverges. Am I right?
Note \begin{eqnarray} &&\int\frac{\cos ^2\left(3x+1\right)}{\sqrt{x}+1} dx\\ &=&\frac12\int\frac{1+\cos\left(6x+2\right)}{\sqrt{x}+1} dx\\ &=&\frac12\int\frac{1}{\sqrt{x}+1} dx+\frac12\int\frac{\cos\left(6x+2\right)}{\sqrt{x}+1} dx\\ &=&\frac12\int\frac{1}{\sqrt{x}+1} dx+\frac12\int\frac{1}{\sqrt{x}+1} d\sin\left(6x+2\right)\\ &=&\frac12\int\frac{1}{\sqrt{x}+1} dx+\frac12\sin(6x+2)\frac{1}{\sqrt{x}+1}+\frac12\int\frac{\sin(6x+2)}{2\sqrt x(\sqrt{x}+1)^2} dx. \end{eqnarray} Now $$\left|\int_0^\infty\frac{\sin(6x+2)}{2\sqrt x(\sqrt{x}+1)^2} dx\right|\le\int_0^\infty\frac{1}{2\sqrt x(\sqrt{x}+1)^2} dx<\infty $$ and hence $\int_0^\infty\frac{\sin(6x+2)}{2\sqrt x(\sqrt{x}+1)^2} dx$ converges. Clear $\int_0^\infty\frac{1}{\sqrt{x}+1} dx$ diverges, so the improper integral diverges.