I am trying to understand why my reasoning is wrong. Say I have to calculate:$$\int_{-\infty}^{+\infty} \frac{1}{x^2}\ \text{d}x$$ This integral does not converge of course, but I expect its Cauchy Principal Value to be zero. This happens not to be right (at least according to W. Mathematica).

What is wrong with the following reasoning?

$$\lim_{a\to -\infty \\ \epsilon\to 0 \\ b\to +\infty} \left(\int_a^{\epsilon} + \int_{\epsilon}^b\right) \frac{1}{x^2}\ \text{d}x = \lim_{a\to -\infty \\ \epsilon\to 0 \\ b\to +\infty} \left(-\frac{1}{x}\bigg|_a^{+\epsilon} - \frac{1}{x}\bigg|_{\epsilon}^b\right) = \lim_{a\to -\infty \\ \epsilon\to 0 \\ b\to +\infty}\left(-\frac{1}{\epsilon} + \frac{1}{a} - \frac{1}{b} + \frac{1}{\epsilon}\right) $$ $$= \lim_{a\to -\infty \\ \epsilon\to 0 \\ b\to +\infty}\frac{1}{a} - \frac{1}{b} = 0$$


Your integration limit is wrong for the first integral. It should be $-\epsilon$ as you are trying to not hit the origin. Your calculation thus becomes

$$\lim_{a\to -\infty \\ \epsilon\to 0 \\ b\to +\infty} \left(\int_a^{-\epsilon} + \int_{\epsilon}^b\right) \frac{1}{x^2}\ \text{d}x = \lim_{a\to -\infty \\ \epsilon\to 0 \\ b\to +\infty} \left(-\frac{1}{x}\bigg|_a^{-\epsilon} - \frac{1}{x}\bigg|_{\epsilon}^b\right) = \lim_{a\to -\infty \\ \epsilon\to 0 \\ b\to +\infty}\left(\frac{1}{\epsilon} + \frac{1}{a} - \frac{1}{b} + \frac{1}{\epsilon}\right) $$ $$= \lim_{a\to -\infty \\ \epsilon\to 0 \\ b\to +\infty} \frac{2}{\epsilon}+\frac{1}{a} - \frac{1}{b} = \infty$$ so that the Cauchy principal value of this integral is infinite. You should expect this as both branches (left and right of origin) are above the $x$-axis.