TITLE: Is $\int_{-\infty}^{\infty} \sin x \, \mathrm{dx}$ divergent or convergent?
QUESTION [6 upvotes]: I was determining whether 
$$\int_{-\infty}^{\infty} \sin x \, \mathrm{dx}$$
was divergent or convergent. So, I did the following steps:
$$\begin{align}
\int_{-\infty}^{\infty} \sin x \, \mathrm{dx} &= \int_{0}^{\infty}\sin x \, \mathrm{dx}+\int_{-\infty}^0\sin x \, \mathrm{dx} \\
&=\lim_{t\rightarrow\infty} \left(-\cos x |^{t}_{0}\right) + \lim_{a\rightarrow-\infty} \left(-\cos x |^{0}_{a}\right)\\
&=\lim_{t\rightarrow\infty} -\cos (t) + \cos 0 + \lim_{a\rightarrow-\infty} -\cos 0 + \cos a\\
&=\lim_{t\rightarrow\infty}1 - \cos t + \lim_{a\rightarrow-\infty} -1+\cos a
\end{align}$$
Now, at this point, it would be reasonable to say that both the limits are undefined and therefore, the integral is divergent but then if I try something like the following 
\begin{align}
\quad\quad&=\lim_{t\rightarrow\infty}1 -\cos t + \lim_{a\rightarrow\infty} -1+\cos a \\
\quad\quad&=\lim_{t\rightarrow\infty}-1 -\cos t + \lim_{a\rightarrow\infty} \cos a+1 \\
\quad\quad&=\lim_{b\rightarrow\infty}-1 +\cos b - \cos b+1 \\
\quad\quad&= 0
\end{align}
So, as you can see, it was shown before that the integral is divergent but with some manipulation, we came at an answer of $0$ but is that valid? I assume, a similar technique can be applied to $\int_{-\infty}^{\infty} \frac{1}{x} \, \mathrm{dx}$.

REPLY [2 votes]: Maybe it is helpful.
The inverse Fourier transformation of the Dirac-delta function is
$$
\delta (t) = \frac{1}{2\pi} \int_{-\infty}^\infty \mathrm{e}^{\mathrm{i} \omega t} \mathrm{d} \omega 
$$
By letting $\omega = x$, it is shown that 
$$
\int_{-\infty }^\infty \sin x\mathrm{d} x= \Im(2\pi \delta (t=1)) = 0
$$