# Why $\int^{+\infty}_{-\infty} x \, dx \neq 0$

We are going over improper integrals and tests for convergence in my Calc II course. During a lecture, my professor warned us to take caution when taking integrals from negative infinity to infinity.

His specific example was: $$\int^{+\infty}_{-\infty} x \, dx$$

I understand that the function is definitely not convergent, but my current intuition would be that the integral from $-\infty \rightarrow 0$ would be equal to $-\infty$, and likewise the part from $0 \rightarrow \infty$ would be $+\infty$, so one could think that the negative and positive parts would cancel out, rendering the integral to equal $0$.

But, the prof made it very clear that this is not the case, and that we will learn how to deal with "nasty" integrals like this in future courses on real analysis. I have been trying to find a fairly simple explanation that a first year undergrad like myself would actually understand, but no luck this far.

I still kind of do not accept this as being not equal to zero, as both of the parts grow as $O(x^{-1})$, so I can't understand why they do not cancel out.

Any insight on this would be appreciated.

NB: I understand that if one blindly follows the rule that both must converge for the overall integral to converge. But, I am the kind of person that always wonders why something is.

-
Read something about principal value: en.wikipedia.org/wiki/Cauchy_principal_value –  Poppy Jan 13 at 23:43
The fundamental error is assuming that you can cancel two limiting procedures that aren't forced to proceed at the same rate or otherwise linked together; while we could replace the upper limit with $b$ and add $\lim b\to\infty$, we could just as well replace it with $2b$. It only could make sense for the limit to exist if any such valid replacement gives the same result. –  Eugene Shvarts Jan 13 at 23:47

This is a good question. My answers differ from the other answers because this deals very closely with convergence issues from higher mathematics.

It boils down to what it means for an improper integral to converge, in a sense. It is (almost always) the case that we say

$$\int_{-\infty}^\infty f(x) \mathrm{d}x$$

converges iff

$$\lim_{a \to -\infty}\lim_{b \to \infty}\int_a^bf(x)\mathrm{d}x$$

converges, which is what Frank Lu says in his answer. You seem to want it to be defined as $$\lim_{a \to \infty}\int_{-a}^a f(x)\mathrm{d}x,$$

which happens to converge in the Cauchy Principal Value sense (in fact, that is the Cauchy Principal Value of this integral). Cauchy Principal Values are common in higher math, especially in complex analysis and residue calculus..

You might ask Why don't we define improper integration to align with Cauchy Principal Values? That is also a good question, and I think it depends on what you one wants from their integrals. A big problem with Cauchy Principal Values is that they are very dependent on coordinates. If you "shifted the center" to be $1$ instead of $0$, you would get a different answer for the integral (it would diverge), i.e.

$$\lim_{a \to \infty} \int_{1-a}^{1+a}f(x)\mathrm{d}x \neq \lim_{a \to \infty}\int_{-a}^a f(x)\mathrm{d}x,$$

which violates our intuitive understanding of integrals and our desire to have well-defined answers. Cauchy Principal Values depart from Riemann sums - so getting this "extra convergence" has a price. Conversely, we demand stricter convergence from Riemann (or Lebesgue) integrals to have them better line up with our intuition. (Usually! Sometimes, CPVs are very useful!)

-
Thanks for the no-nonsense answer, I know the rules and that the integral doesn't actually converge, but I wanted to go beyond that and see how else it could be treated. –  Richard P Jan 14 at 0:15

Is your stance that $\infty+(-\infty)=0$? That kind of thinking would be problematic. Presumably, $1+\infty=\infty$. So then you would have $1+\infty+(-\infty)=0$, which I guess would make $1=0$.

-
My stance is that if I have two functions, one of which is positive, and one of which is negative, and both of which are increasing at the same rate, any infinitesimal change in the input will have equal effect on the output. For example, N+(-N)=0 and (N+1) + (-(N+1))=0 –  Richard P Jan 13 at 23:41
You are biased at centering the split at $0$ then. What if you centered the split at say $x=1$, which should be equally valid. Then a certain step rightward does not contribute the same area as the opposite of the same step leftward. –  alex.jordan Jan 13 at 23:43
That's exactly what I am doing. I'm viewing the function as being symmetric about the origin and using the geometric interpretation of an integral. –  Richard P Jan 13 at 23:45
What would you say about $\int_{-\infty}^{\infty}(x-10)\,dx$? It's just a shift of the integral you are working with, so it should have the same result if a result exists. But the only symmetry here is about $x=10$. What do you get if you still cut the integral at $x=0$? (I'm just trying to let you see that there are other valid ways to look at your integral where there is asymmetry, and a net result of $0$ would be inconsistent with that.) –  alex.jordan Jan 14 at 0:17

Remember, $\infty$ is not a number. So it makes no sense to have something that is not a number in the upper and lower limits of the integral. So how do we avoid this issue? Well, that's the entire idea of Calculus (making infinitesimals something we can work with)

So what is the idea of Calculus? Well, we look at limits. So though $\infty$ is not a number, we can look at what happens when this integral has upper and lower limits that approach infinity. So what we want is this $$\lim_{b \to \infty} \int_{-b}^b x \; dx$$ Well, the integral is easy to calculate, it's $x^2/2+C$, now we evaluate it using the upper and lower limits, $$\frac{b^2}{2}-\frac{(-b)^2}{2}=0$$ then we have $$\lim_{b \to \infty} 0=0$$ So in that sense the integral is $0$ (what we have done above is called the improper integral). However, one still needs to be careful when talking about infinities. Why? Well, isn't original integral the same as... $$\int_{-\infty}^\infty x\;dx= \int_{-\infty}^bx\;dx + \int_{b}^\infty x\;dx$$ where $b$ is any real number. Notice neither of those integrals on the right converge, so neither can the integral on the left converge! Because on the right we have infinities. If we 'forced' those to converge, many of the properties of the reals could be forced to break down. So we just contradicted the fact that the integral converges!

What's the lesson here? It's that one can just throw around infinities without being clear what is mean. Infinity is not a number, it's a limit. When we treat it like a number, 'bad' things happen. As you can see, it's not enough to say that the 'areas' cancel out. That's an intuitive way to think about things. But remember, the integral is a concept independent of areas. It's something much bigger. So the interpretation may work in one direction, that is an integral can represent an area, but not the other way around. Especially not when dealing with infinite areas, because what would that even mean!? This is what makes talking about anything involving infinities difficult and why we often use limits instead, where one can be very clear about what one means when one says things like 'infinity' (often referring to a limit of some sort, and limits have a rigorous definition). This may be tedious, but it makes things clear and is why Mathematics can be so interesting. All of this you will cover in a Real Analysis course, as your professor said. This gives you something to look forward to!

-

Note that the improper integral

$$\int_{-\infty}^{\infty}f(x)dx$$

converges if and only if both

$$\int_0^{\infty}f(x)dx,\quad \int_{-\infty}^0f(x)dx$$

converge

-

In general $\int_{-\infty}^{\infty}f(x)\,dx$ is defined by

$$\int_{-\infty}^{\infty}f(x)\,dx =\lim_{a\to\infty}\int_{-a}^{0}f(x)\,dx + \lim_{b\to\infty}\int_{0}^{b}f(x)\,dx$$

and not by

$$\int_{-\infty}^{\infty}f(x)\,dx = \lim_{a\to\infty}\int_{-a}^{a}f(x)\,dx$$

If you would use the second one as definition, then the integral would be $0$

-
I know the general equation for an integral of that form. But, going from the RHS of Eqn.(1), even though the two integrals don't converge, one could make the assumption that they both diverge at the same rate, thus making them cancel out. I understand that if one blindly follows the rule that both must converge for the overall integral to converge. But, I am the kind of person that always wonders why something is. –  Richard P Jan 13 at 23:43
@RichardP It doesn't matter if they diverge at the same rate (although as alex.jordan points out, this is biased to centering the integral at zero, and math is prejudiced like this), since you would have to evaluate the limits first before adding them together, not during the evaluation of the limit. –  anon Jan 13 at 23:47
Nevertheless, this is a perfect example. It the limit exists it must be the same for any sequence $(a_n,b_n)\to (-\infty, infty)$. However, we find for once, the problem with $\infty - \infty$, we find that "one" limit is zero, but, taking the sequence $-n,2^n$ for the lower and upper bounds, the integral clearly diverges. Addtionally, it is easy to find $a_n,b_n$ such that for fixed $n$ the integral is say $1/2$. And hence with that sequence the limit is $1/2$. This can be performed for any real number. –  Quickbeam2k1 Jan 13 at 23:51

By definition, an integral $\int_a^b f(x) dx$ is convergent ( here: $f$ is continuous from $(a,b)$to $\Bbb R$) if $$L_1=\lim\limits_a F$$ and $$L_2=\lim\limits_b F$$ exists, where $F$ is a primitive of $f$ (ie: $F'=f$). Then we have: $$\int_a^b f(x) dx=L_2-L_1$$ In our case $$f(x)=x$$ so $$F(x)=\frac{x^2}{2}$$ and $$\lim\limits_{-\infty} F=+\infty$$ is not a real number. This suffices ta say that the integral diverges.

-

Arithmetic with infinite quantities is seriously problematic, for a number of reasons. For example, what "should" $\infty-\infty$ be? It seems sensible to say that it should be $0$, but then associativity breaks down, as we see (for example) that $$1+(\infty-\infty)=1+0=1,$$ but we "should" have $1+\infty=\infty,$ and so $$(1+\infty)-\infty=\infty-\infty=0,$$ which is a problem, since $1\ne0.$ In a similar fashion, we can show that there is no natural value (finite or infinite) for $\infty-\infty$.

Even if we are just considering "infinite arithmetic" as limiting behavior for finite arithmetic, we run into problems. For example, $\lim_{x\to\infty}(1+x)=\lim_{x\to\infty} x=\infty,$ but we can't simply substitute and pull the limit back out, for then $$1=\lim_{x\to\infty}1=\lim_{x\to\infty}(1+x-x)\overset{*}{=}\lim_{x\to\infty}(1+x)-\lim_{x\to\infty}x=\infty-\infty,$$ and on the other hand $$0=\lim_{x\to\infty}0=\lim_{x\to\infty}(x-x)\overset{*}{=}\lim_{x\to\infty}x-\lim_{x\to\infty}x=\infty-\infty,$$ so we've got problems. (The * marks the problematic steps that we can't actually take.)

We run into a similar problem when we're looking at this doubly improper integral. It is certainly true that $$\lim_{t\to\infty}\int_{-t}^t x\,dx=0,$$ but on the other hand, we have $$\lim_{s\to\infty}\lim_{t\to\infty}\int_{-s}^tx\,dx=\infty,\\\lim_{t\to\infty}\lim_{s\to\infty}\int_{-s}^tx\,dx=-\infty.$$ More generally, for any real $a,$ we can say that $$\lim_{t\to\infty}\int_{-\sqrt{t-a}}^{\sqrt{t+a}}x\,dx=a,$$ so once again, there's not really a natural choice. We can make the improper integral seem to converge to anything, simply by taking an appropriate approach to the infinite limits of integration, and so the improper integral fails to converge at all.

-