# Examining Convergence Of Improper Integral.

I have to check the convergence of the improper integral $$\int_{0}^{\infty} \cos^2x\,dx .$$

I have tried to solve it in the following manner: \begin{align}\int_{0}^{\infty}\cos^2x\,dx &= \lim_{B \to \infty} \int_{0}^{B}\cos^2x\,dx \\&= \lim_{B \to \infty} \int_{0}^{B}(1-\sin^2(x))\,dx \\ &= \lim_{B \to \infty}[x]_{0}^{B} -\lim_{B \to \infty} \int_{0}^{B}\sin^2(x)\,dx .\end{align}

Now the first term tends to infinity as $$B \to \infty,$$ so the integral is not convergent.

But unfortunately the answer is given to be convergent. I don't understand how ?

Also I have proven in the same way that $$\int_{0}^{\infty} (\sin x^2)^2\,dx$$ is divergent. So basically I think that if my process is wrong then I am wrong in both cases.

Am I wrong ? If so, looking for guidance then. Thank you.

• You cannot do this this way: the first term goes to $+\infty$, but if the second goes to $-\infty$ you have an indeterminate form. – Clement C. Oct 1 '18 at 13:43
• Oh ! I see. Then what way should I prefer ? – hiren_garai Oct 1 '18 at 13:44
• What you could do, however, is observe that $\cos^2 x$ is periodic with period $\pi$, and $\int_T^{T+\pi} \cos^2 x dx = \frac{\pi}{2}>0$. So... – Clement C. Oct 1 '18 at 13:45
• No, it diverges. See my answer. – Clement C. Oct 1 '18 at 13:57
• @ hiren_garai Perhaps there is a typo in your text and the $^2$ is meant to stand under the $\cos$. Then we have $\int_0^{\infty } \cos \left(x^2\right) \, dx = \frac{1}{2} \sqrt{\frac{\pi }{2}}$ – Dr. Wolfgang Hintze Oct 1 '18 at 14:02

## 1 Answer

You cannot proceed this way, as you end up with something of the form $$\int_0^B dx\, \cos^2 x = u_B - v_B$$ and $$\lim_{B\to\infty} u_B = \infty$$. But if $$\lim_{B\to\infty} v_B = \infty$$ as well, you have an indeterminate form and cannot conclude.

However, note that $$\cos^2$$ is perdiodic with period $$\pi$$, so that for any integer $$k$$ $$\int_0^{k\pi} dx\, \cos^2 x = k\int_0^\pi dx\, \cos^2 x = k\cdot \frac{\pi}{2}$$ and therefore $$\int_0^{B} dx\, \cos^2 x = \int_0^{\lfloor B/\pi\rfloor \pi} dx\, \cos^2 x + \underbrace{\int_{\lfloor B/\pi\rfloor \pi}^B dx\, \cos^2 x}_{\geq 0} \geq \lfloor B/\pi\rfloor\cdot \frac{\pi}{2} \xrightarrow[B\to\infty]{} \infty$$

• Thank you for your answer. In a similar way I can prove the divergence of $$\int_{0}^{\infty} \text{(sin x²)² dx}$$, right ? – hiren_garai Oct 1 '18 at 14:01
• @hiren_garai yes, indeed. – Clement C. Oct 1 '18 at 14:02
• I have one more query, can I visualise the problem in the way that it is the integration of a positive term from $0$ to $\infty$ and so the area of the curve will be unbounded and hence the integral is divergent ? It's just to find a rough idea about the problem . @ClementC. – hiren_garai Oct 1 '18 at 14:09
• Of course, one may write $$\int_0^L \cos^2(x)\,dx=\frac12 L+\frac14 \sin(2L)$$and conclude. – Mark Viola Oct 1 '18 at 14:37
• I got it.@MarkViola. thanks for your time. – hiren_garai Oct 1 '18 at 14:48