Divergence of an integral related to a Riemann integral $\int_{1}^{\infty}\dfrac{1}{x}dx$
Each integral needs to converge separately. As a definition, $$\int_{-\infty}^\infty f(x)\mathrm dx=\lim_{A\to -\infty}\lim_{B\to \infty} \int_A^B f(x)\mathrm dx$$ Since neither of these limits exist for our $f$, the integral is divergent.