Improper integral $ \int_{-\infty}^{\infty} \cos(2x) \, \mathrm{d}x $ How do you calculate the improper integral:
$$ \int_{-\infty}^{\infty} \cos(2x) \, \mathrm{d}x $$
You will get $\frac{1}{2}\sin(2x)$ and would have to integrate that from $-\infty$ to $0$, however $\sin$ is also oscillates like $\cos$ therefore the limit to $-\infty$ doesn't exist.
Is this question answerable by odd or even function argument? But then again, the answer I checked online said that the limit was divergent. Hope anyone can help, thanks.
 A: Take two sequences $\{\frac{(4n+1)\pi}{4}\}_{n\in\Bbb{N}}$ and $\{\frac{(4n+3)\pi}{4}\}_{n\in\Bbb{N}}$ which both tend to infinity.
Then $$\int_{0}^{\dfrac{(4n+1)\pi}{4}}\cos(2x)\,dx = \frac{1}{2}\cdot\sin(2\cdot\frac{(4n+1)\pi}{4})=\frac{1}{2}\cdot\sin(\frac{(4n+1)\pi}{2})=\frac{1}{2}$$ .
Hence $$\lim_{n\to\infty}\int_{0}^{\dfrac{(4n+1)\pi}{4}}\cos(2x)\,dx=\frac{1}{2}$$
But $$\int_{0}^{\dfrac{(4n+3)\pi}{4}}\cos(2x)\,dx=\frac{1}{2}\cdot\sin(\frac{(4n+3)\pi}{2})=\frac{-1}{2}$$
Hence $$\lim_{n\to\infty}\int_{0}^{\dfrac{(4n+3)\pi}{4}}\cos(2x)\,dx=\frac{-1}{2}$$.
So the limit cannot be unique and hence the improper integral $\int_{0}^{\infty}\cos(2x)\,dx$ diverges.
Hence $\int_{-\infty}^{\infty}\cos(x)\,dx$ does not exist.
Similarly $\int_{-\infty}^{\infty}\sin(x)\,dx$ also does not exist. But we can define the principal value of the integral to be $0$.
This is because the limit $\displaystyle\lim_{M\to\infty}\int_{-M}^{M}\sin(x)\,dx=\lim_{M\to\infty}\,0 = 0$ . But this does not mean that $\displaystyle\lim_{M,N\to\infty}\int_{-N}^{M}\sin(x)\,dx$ exist.
A: The first thing I would do is let y= 2x so that dx= dy/2 and the integral becomes $\frac{1}{2}\int_{-\infty}^{\infty} sin(y)dy$  It is then easy to calculate that $\frac{1}{2}\int_0^{2\pi} sin(y)dy= \frac{1}{2}\left[-cos(x)\right]_0^{2\pi}= 1$.  But sin(y) is periodic with period $2\pi$ so integrating from negative infinity to infinity we are adding infinitely many intervals on which the interal is 1.  Therefore $\frac{1}{2}\int_{-\infty}^{\infty} sin(y)dy= \int_{-\infty}^{\infty}sin(2x)dx$ DOES NOT CONVERGE.
