What is the intuition behind why the integration of $f(x) = x$ for closed interval of negative to positive infinity diverges, rather than being zero? I'm currently studying integrals in calculus. In teaching improper integrals over infinite intervals, I come across this example in my lecture notes,
$$\int_{-\infty}^{\infty} x \ dx$$
Naturally, the integration is split into two halves, such as $\int_{-\infty}^{0}x\ dx=-\infty$ and $\int_{0}^{\infty}x\ dx=\infty$. The lecture notes conclude that since both these improper integrals diverge, then so does the above improper integral, i.e.
$$\Rightarrow\int_{-\infty}^{\infty}x\ dx\ \mathrm{diverges}$$

Intuitively, however, I would expect that the first improper integral, $\int_{-\infty}^{\infty}x\ dx$ should evaluate to $0$, given that,


*

*An intuitive meaning of the definite integral is the area under the curve

*The curve of $y=x$ gives a negative area for $(-\infty,0)$ and positive area for $(0, \infty)$

*The curve of $y=x$ is symmetrical about $y=0$


So, my questions are


*

*Why is this not the case, and

*Is $\int_{-\infty}^{\infty}x\ dx\ \mathrm{diverges}$ even what I think it means, that $\int_{-\infty}^{\infty}x\ dx=\infty$?

 A: The trouble is that depending on how we try to calculate the integral, we can get different answers. We know how to calculate the integral on any finite interval, so we might try using bigger and bigger intervals and integrating on each one to get an idea of what the integral on all of $\mathbb R$ might be. If we do this in the obvious, symmetrical way, we get zero:
$$\forall t, \int_{-t}^t x\ dx = 0$$
And therefore the limit as $t\to\infty$ is again zero. But what if we went about it differently? What if I used the intervals $[-bt, at]$ where $a$ is different to $b$, essentially growing my interval to the right at a different speed than how it grows to the left?
$$\int_{-bt}^{at} x\ dx = \frac 1 2t^2(a^2-b^2)$$
So we would get either $+\infty$ or $-\infty$ depending on which side grows faster. If we allow ourselves to grow the left and right sides according to arbitrary increasing positive functions $f$ and $g$:
$$\int_{-g(t)}^{f(t)} x\ dx = \frac 1 2 (f(t)^2 - g(t)^2)$$
So that by finding functions with $f(t)^2-g(t)^2=c$, you could make the limit into any constant number you like, making it seem as if the area under the curve is whatever you want it to be, so that your intuition that the area should be zero is based essentially on the aesthetic, not mathematical, fact that you happen to quite like symmetry.
Something similar happens in the simpler context of infinite sums. If I ask you to add up an infinite set of numbers like $\{a_1, a_2, a_3, ...\}$, you should want to ask me in what "order" you should add them up. Notice that the only reason you don't feel the need to do that with a finite set only is because addition is commutative, imagine how confused you'd be if I asked you to "divide the numbers $1, 2, 4$ and $7$". So if I asked you to add up $\{...a_{-2}, a_{-1}, a_0, a_1, a_2, a_3...\}$, what does that even mean? Do you do all the positive indices first, then all the negative ones? Do you skip back and forth like $a_0 + a_1 + a_{-1} + a_2 + a_{-2}+ ...$? Again, without conditions on the $a_i$, these different "orders" of summation can yield different answers.
A: The integral is defined in that way to avoid bad situations (see previous answer).
Your intuitive idea is well defined in another mathematical concept: Cauchy principal value
A: This is because a choice was made in defining improper integrals, namely, we say an improper integral 
$$
\int_{-\infty}^\infty f(x)\mathrm dx
$$
exists if the following limit
$$
\lim_{m\to \infty}\int_{-m}^0f(x)\mathrm dx+\lim_{M\to \infty}\int_0^{M}f(x)\mathrm dx
$$
exists. 
Note that here we have two different limiting variables, meaning that $m$ and $M$ may be going to infinity at different speeds, potentially failing to perfectly cancel each other for each finite $m,M$ in the case of integrating an odd function like yours.
The definition you propose as intuitive is also a useful one, and is called the Cauchy Principal value integral. In this integral, the two limiting variables are the same.
A: By the same argument, we would have$$(\forall a\in\mathbb{R}):\int_{-\infty}^{+\infty}x+a\,\mathrm dx=0.$$But then$$0=\int_{-\infty}^{+\infty}x+a\,\mathrm dx=\int_{-\infty}^{+\infty}x\,\mathrm dx+\int_{-\infty}^{+\infty}a\,\mathrm dx=\int_{-\infty}^{+\infty}a\,\mathrm dx.$$I suppose that you see that there is a problem here.
And, as far as I know, nobody says that $\displaystyle\int_{-\infty}^{+\infty}x\,\mathrm dx=\infty$. People just say that the integral diverges.
A: An intuitive meaning of the definite integral is the area under the curve.
$\int_{-\infty}^{\infty} x dx$ is not an integral. It is the limit of a continuum of integrals. Strictly speaking, $\int_{-\infty}^{\infty} f(x) dx$ for some function $f$ on $\mathbb R$ is defined as $\lim_{S\to -\infty, T\to \infty} \int_S^T f(x) dx$. $\int_S^T f(x) dx$ can itself be interpreted to be the signed area enclosed by the curves $y = 0, y = f(x), x = S, x = T$, but the limit of these signed areas need not itself be interpretable as as a signed area. Also, an interpretation is just that: an interpretation. Interpretations can fail. This is why keeping in mind the rigorous definitions is important in every mathematical discussion.
The curve of $y = x$ gives a negative area for $(−\infty,0)$ and positive area for $(0,\infty)$.
The curves $y = 0, y = x$ do not enclose a region of the plane. Technically, if you view it geometrically, all they do is they partition the plane into 4 non-congruent quadrants. So, naturally, the signed area is undefined: there is no region of the plane to take the signed area of. To be clear: none of these quadrants have well-defined signed area, for the same reason the plane itself has no well-defined signed area.
The curve of $y=x$ is symmetrical about $y=0$.
This is true, but this by itself is insufficient for the signed area of anything to be $0$. As I said above, the curves $y = x, y = 0$ do not enclose a region of the plane, so talking about signed areas here is like talking about the color of a smell.
Is $\int_{-\infty}^{\infty} x dx$ diverges even what I think it means, that $\int_{-\infty}^{\infty} x dx = \infty$?
If $\int_{-\infty}^{\infty} x dx = \infty$ was true, then it would be accurate to say that $\int_{-\infty}^{\infty} x dx$ diverges, though this is abuse of notation: it would be more accurate to say that $\int_S^T x dx$ diverges as $S \rightarrow -\infty, T \rightarrow \infty$. But in this case, $\int_{-\infty}^{\infty} x dx = \infty$ is false. The statement $\int_{-\infty}^{\infty} x dx = \infty$ means that $\lim_{S\to -\infty, T\to \infty} \frac{1}{\int_S^T x dx} = 0$ and $\int_S^T x dx$. But this is not true, because as $S \rightarrow -\infty, T \rightarrow \infty$, $\int_S^T x dx$ does take on negative real-numbered values.
