Integration issue I am trying to solve $\int^{+\infty}_{-\infty}\frac{1}{x}dx $.
I read that it is a contour integral along the semi-circle of large radius in the lower complex plane. First, is there any justification for this, and second, does the integral then become $ -\int^{\pi}_{0} i d\theta$? This is what the text implies but I don't understand why it is $0\rightarrow\pi$ rather than $0\rightarrow2\pi$
 A: You can't integrate it. If we assumed the integral exists (is real), then we'd be able to show that it is approximated by any real number through appropriate finagling. This isn't possible, so the integral doesn't exist.
A: $$\left.\int\limits_1^\infty\frac{dx}{x}=\log|x|\right|_1^\infty\ldots\;\text{the integral diverges and so does yours}$$
A: Make a graph and try to see why this integral is divergent, as stated by Don.
Sometimes graphs really help before embarking on an algebra spree.
A: One of the important issues you face with this integral is that $$\infty - \infty$$ is not defined.
A: If you are talking about Lebesgue integral, this is not integrable as $$\int_{\mathbb{R}}\frac{1}{|x|}dx=\lim\int_{1/n}^n\frac{1}{x}dx=2\lim \;2\log n=+\infty$$ by the Monotone Convergence Theorem. 
If you see it as an improper integral, it diverges at $\pm\infty$ and $0^{\pm}$ for similar $\log $ reasons.
But you can make sense of this by considering the Cauchy Principal Value:
$$
\lim_{\epsilon\rightarrow0^+}\int_{-1/\epsilon}^{-\epsilon}\frac{1}{x}dx+\int_{\epsilon}^{1/\epsilon}\frac{1}{x}dx=0=\int_{-\infty}^{+\infty}\frac{1}{x}dx
$$
in this particular sense.
A: "if we take x to be complex then we can move it from $-\infty$ to $+\infty$ along a complex contour" The approx is given by, $ \frac{1}{(2\sqrt{y^{2}+x^{2}})^{0.5}}e^{-i \int \sqrt{y^{2}+x^{2}}}dx$ 
I realise that the only important thing is the exponential, so I taylor series this to get $e^{x+\frac{y^{2}}{2x}}dx$ then justified that due to the CPV theorem $\int^{+\infty}_{-\infty}x dx \rightarrow 0$ 
and so we are left with $-\frac{iy^2}{2}\int^{+\infty}_{-\infty} \frac{1}{x}dx$, ignoring the coeficients I then read that since x is complex it can be taken along a contour giving, $ \int^{\pi}_{0}\frac{1}{re^{i\theta}}rie^{i\theta} \rightarrow i\pi$, The trouble is that I also read that the limits could be to 2Pi and Im  not sure which is correct.
