# Why is $\int^\infty_{-\infty} \frac{x}{x^2+1} dx$ not zero?

We break up $\int^\infty_{-\infty} \dfrac{x}{x^2+1} dx$ into:

$$\lim_{t\to -\infty} \int^0_t \dfrac{x}{x^2+1} dx + \lim_{t\to \infty} \int^t_0 \dfrac{x}{x^2+1} dx$$

So, evaluated, this gives;

$$\lim_{t \to \infty} \left(\frac{1}{2} \ln (1+t^2)\right) - \lim_{t \to -\infty} \left(\frac{1}{2} \ln (1+t^2)\right)$$

But those two terms are essentially identical! It should be zero! Plus, the integrand is an odd function, so why is this undefined? Is it just an unspoken rule that once you encounter $\infty$ in a mathematical expression you should stop evaluating immediately?

-
Well, the integral from $0$ to $\infty$ is certainly divergent. However, you can still consider the so-called "principal value" integral, which does give the result of zero... – J. M. Nov 8 '11 at 17:51
You can get different values of the integral from different ways of approaching $\pm\infty$, as I explain in an answer below. – Michael Hardy Nov 8 '11 at 18:04

Such an integral is defined ONLY if each of the two parts is defined:

$\displaystyle\lim\limits_{t\to -\infty} \int^0_t \dfrac{x}{x^2+1} dx$

and

$\displaystyle\lim\limits_{t\to \infty} \int^t_0 \dfrac{x}{x^2+1} dx$

Then, if BOTH of these limits exist separately, the full integral is defined as the sum of the two. But, as your work shows, each of these has a limit of $\infty$, i.e., neither exists. So, the full integral, $\displaystyle\int^\infty_{-\infty} \frac{x}{x^2+1} dx$, is undefined.

-
Ugh! I'm getting two conflicting answers! The mathematical community is divided into two camps! Now I have to figure out who is in which camp before I can decide which one to follow! Ugh... – Matt Gregory Nov 8 '11 at 17:57
@MattGregory You are not getting two conflicting answers. My answer is the answer to your question, using stuff you learn in a Calc 1 or 2 class. Look in your book. The definition of such an integral says it is the sum of the two parts IF they exist separately. Gortaur's answer is a more advanced answer, involving real analysis that you probably haven't taken, and the Cauchy principal he mentions is A WAY to define such an integral since it DOES NOT exist. The Cauchy principal value of the integral and the value of the integral are two separate things in this case. – Graphth Nov 8 '11 at 18:00
Ah, okay, you are absolutely right! It is in my book. I swear I read it, but it did not register. Thank you for pointing that out to me! – Matt Gregory Nov 8 '11 at 18:24

This integral does not converge absolutely since $\frac{|x|}{1+x^2}\sim\frac 1{|x|}$ for $|x|\to\infty$ and $\int\limits_{x=1}^\infty \frac{1}{|x|} = \infty$. Though to tackle problems like yours you may consider Cauchy principal value which in your case exists and indeed $0$ since the function is odd.

-

If you "interpret" the integral $\displaystyle \int_{-\infty}^{\infty} \frac{x}{x^2 + 1} dx$ as $\displaystyle \lim_{R \rightarrow \infty} \int_{-R}^{R} \frac{x}{x^2 + 1} dx$, then it is indeed zero. (This is called the Cauchy principal value).

However, note that the integral $\displaystyle \int_{-\infty}^{\infty} \frac{x}{x^2 + 1} dx$ can also be interpreted as, for instance, $$\displaystyle \lim_{R \rightarrow \infty} \int_{-R}^{kR} \frac{x}{x^2 + 1} dx = \lim_{R \rightarrow \infty} \frac12 \log \left( \frac{1 + k^2R^2}{1 + R^2} \right) = \log(k) \text{ where }k > 0.$$ You could also take other functions of $R$ such that the lower limit tends to negative infinity and upper limit tends to infinity as $R \rightarrow \infty$ to get different answers.

Hence, $\displaystyle \int_{-\infty}^{\infty} \frac{x}{x^2 + 1} dx$ is not zero and in fact cannot be assigned any value unless you know how the lower limit and upper limit approach $\infty$.

-
Ah, okay. That's very interesting! – Matt Gregory Nov 8 '11 at 18:53
It may seem weird to consider approaching infinity at various rates, but this can happen very naturally if you make a substitution of variables before evaluating the integral. Often, there are several sensible substitutions for an integral; and for improper integrals, these can result in different ways to approach infinity, as above. – Jonas Kibelbek Nov 8 '11 at 22:54
Yep. Another possible way to rewrite $\int\limits_{-\infty}^\infty f(x)dx$ is $\lim\limits_{a,b\rightarrow\infty}\int_a^b f(x)dx$ where the limit is taken as $a$ and $b$ each arbitrarily (and independently) approach infinity. – user5137 Nov 9 '11 at 6:53

Several years ago I added this example to Wikipedia's article titled improper integral:

$$\lim_{a\rightarrow\infty}\int_{-a}^a\frac{2x\,dx}{x^2+1}=0\text{ and }\lim_{a\rightarrow\infty}\int_{-2a}^a\frac{2x\,dx}{x^2+1}=-\ln 4.$$ In both cases the upper and lower bounds of integration both approach infinities. But the two values we get are different. This can happen only if the positive and negative parts are both infinite, i.e. $\displaystyle \int_{-\infty}^0 \dfrac{2x\;dx}{x^2+1}=-\infty$ and $\displaystyle \int_0^\infty \dfrac{2x\;dx}{x^2+1}=\infty$.

-

We should agree that, whatever it is we want $$\int_{-\infty}^{\infty}f(x)\,dx$$ to be, the expression should still respect the usual rules of integration. In particular, for any real number $c$, we "should" have $$\int_{-\infty}^{\infty}f(x)\,dx = \int_{-\infty}^cf(x)\,dx + \int_c^{\infty}f(x)\,dx.$$

Otherwise, the value of the integral may depend on how we choose to evaluate the integral, and that is no good.

This in turn means that in order for $$\int_{-\infty}^{\infty}f(x)\,dx$$ to make sense, we need both $$\int_{-\infty}^cf(x)\,dx\quad\text{and}\quad\int_{c}^{\infty}f(x)\,dx$$ to make sense separately and independently, and this to happen for every real number $c$.

So in order for $$\int_{-\infty}^{\infty}\frac{x}{1+x^2}\,dx$$ to make sense as a number, we need $$\textbf{both}\quad\int_{-\infty}^c\frac{x}{1+x^2}\,dx\quad\textbf{and}\quad \int_{c}^{\infty}\frac{x}{1+x^2}\,dx\quad\textbf{to each make sense for every }c.$$

However, $$\int_c^{\infty}\frac{x}{1+x^2}\,dx$$ does not exist for any value of $c$, so we cannot make sense of $$\int_{-\infty}^{\infty}\frac{x}{1+x^2}\,dx$$ as a number.

Now, it is tempting to say that since the function is odd and the interval is symmetric about the origin, the integral "should" be equal to $0$. Unfortunately, that runs into serious trouble pretty soon. Consider for example trying to argue that way with $$\int_{-\infty}^{\infty}\sin x\,dx.$$ Okay, that "should" be $0$ because $\sin x$ is an odd function. However, I claim that in fact, the integral "should" be $2$. Why? Well, \begin{align*} \int_{-\infty}^{\infty}&\sin x\,dx\\ &= \cdots + \int_{-4\pi}^{-2\pi}\sin x\,dx +\int_{-2\pi}^0\sin x\,dx + \int_{0}^{\pi}\sin x\,dx +\int_{\pi}^{3\pi}\sin x\,dx + \int_{3\pi}^{5\pi}\sin x\,dx + \cdots \end{align*} now, every integral except for $\int_{0}^{\pi}\sin x\,dx$ is equal to $0$; and $$\int_0^{\pi}\sin x\,dx = 2.$$ So, "clearly", the whole integral, $\int_{-\infty}^{\infty}\sin x\,dx$ "should" equal $2$, not $0$. And by choosing other ways of breaking up $(-\infty,\infty)$, I could give you good reasons why the integral "should be" any particular number you want between $-2$ and $2$.

This just won't do; and so we solve the problem by reaching the only conclusion possible: the original integral simply does not exist. Just because our function is odd is not enough reason to conclude the integral "should" be $0$.

-
+1 Very nice explanation, Arturo! – JavaMan Nov 8 '11 at 18:18
We don't have enough reason to conclude that the integral "should" be zero, but we "should" agree that whatever we want $\int_{\infty}^\infty f(x)dx$ to be, it "should" respect the usual rules of integration ;) – Chris Taylor Nov 8 '11 at 18:36
This is a fantastic answer, Arturo! Your explanations are always great. But, ugh! In your argument you're adding those sine humps in a way that's no longer symmetric about the origin! There's something wrong with that argument, but I don't know what. – Matt Gregory Nov 8 '11 at 19:07
@Matt: There's something contrarian about adding it that way, certainly. It's perhaps not a natural way of doing it. But one would hope that the value of the integral does not depend on how we decide to do the integral, and that if we want to do it in a way that is silly, or a way that is contrarian, or a way that is natural, or a way that is half crazy and half inspired, whichever way we do it, it better give the same answer in the end! – Arturo Magidin Nov 8 '11 at 19:58