TITLE: Why doesn't this converge?
QUESTION [8 upvotes]: Why doesn't $$\int_{-1}^1 \frac{1}{x}~\mathrm{d}x$$ converge? I mean you would think that because of symmetry the area from the negative side and positive side cancel out, resulting in the integral equaling zero.
By the way, I'm familiar with the way to test if an integral converges by splitting the integral into $0$ to $1$ and $0$ to $-1$ and adding up the integral sums. I don't really understand why this is valid though in the case of symmetry.

REPLY [8 votes]: The integral as you've written isn't well-defined - what you've written is:
$\qquad$Integrate $\frac1x$ along the line running from $-1$ to $+1$
However, since $\frac1x$ isn't defined at 0, this doesn't make sense.
As such, the integral as you've written it is slightly ambiguous. The answer to whether or not the integral converges will depend on how you define it. There are two ways of doing this:

In general, when seeing an integral like this, we are referring to:
$1$)
$$\lim_{\epsilon, \delta \to 0}\left(\int_{-1}^{-\delta}\frac1x\mathrm dx+\int_\epsilon^1\frac1x\mathrm dx\right)\\=\left(\lim_{\delta \to 0}\int_{-1}^{-\delta}\frac1x\mathrm dx\right)+\left(\lim_{\epsilon \to 0}\int_\epsilon^1\frac1x\mathrm dx\right)$$
In this case, because we are allowing $\epsilon$ and $\delta$ to converge to $0$ at different rates, the integral will not generally converge.
The only way to make this integral to converge will be to impose a relation on $\epsilon$ and $\delta$ such as $\epsilon = \delta$. However, when writing the above integral, we usually mean that we are considering the convergence of $\epsilon$ and $\delta$ without these restrictions, and hence this integral will diverge.

However, we could also consider:
$2$)
$$\lim_{\delta \to 0}\left(\int_{-1}^{-\delta}\frac1x\mathrm dx+\int_\delta^1\frac1x\mathrm dx\right)$$
Here, the two integrals are converging at the same rate, and in this case, the integral is $0$.
I'm guessing this is what you intuitively had in mind when you said that the positive and negative sides should cancel each other out. However, this integral is not the same as (1), and when writing $\displaystyle\int_{-1}^1\frac1x\mathrm dx$, a writer will normally be referring to ($1$) and not ($2$).

Contrast this to the integral $$\int_2^4\frac1x$$
As in ($1$), we can write this integral as 
$$\lim_{\epsilon, \delta \to 0}\left(\int_{2}^{3-\delta}\frac1x+\int_{3+\epsilon}^4\frac1x\right)$$
However, in this case, both integrals converge separately and hence the total integral will converge. This is different to ($1$) where both integrals diverge separately, and hence their sum will diverge.

REPLY [5 votes]: The main issue here is that, despite the odd-ness of the integrand function, $\frac{1}{x}$ is not a Riemann integrable function over $(0,1)$, hence the value of such integral, if existing, would be something like $\infty-\infty$. 
Also notice that:
$$\int_{(-1,-a/n)\cup(b/n,1)}\frac{dx}{x}=-\log\frac{n}{a}+\log\frac{n}{b}=\log\frac{a}{b}.$$
By choosing different values for $a$ and $b$ and taking the limit as $n\to +\infty$, you get different hypothetical values for your integral.