# Integral of odd function doesn't converge?

When I look up $$\int_{-1}^1 \dfrac{1}{x} dx$$

on Wolfram Alpha, it says it doesn’t converge. While this is a sum of two diverging integrals, the two areas are clearly symmetric, and I’d assume the answer would be zero. How does one usually treat integrals like this?

#### Solutions Collecting From Web of "Integral of odd function doesn't converge?"

It’s undefined quite simply because you can force it to have another value. First of all, let’s say by $\int_{-1}^1\frac1xdx$ you mean
$$\lim_{s \to 0^-\,\, t \to 0^+}\left(\int_{-1}^s\frac1x dx + \int_t^1 \frac1xdx\right)$$
Now, if we force $s = -t$, then as you say, this evaluates to $0$. However, if we say $s = -at$ for some $a > 0$, then we get something completely different (we get $\ln a$). It’s this “completely different” that in the end makes the value indeterminable.

Side note: It’s possible to go into subdividing the interval $[-1, 1]$ unevenly and use the definition of (Riemann) integral to see that we can get the sum to be whatever we want, and once again, this means undefined.

The problem with this integral is that the function approaches infinity at $0$. For this type of problem, you must treat each side of $0$ separately. We write:

$$\int_{-1}^1\frac{1}{x}dx=\lim_{a\rightarrow 0^+}\int_a^1\frac{1}{x}dx+\lim_{b\rightarrow 0^-}\int_{-1}^b\frac{1}{x}dx.$$

Observe that we use a different limit for each infinite side. One can check that each of these limits diverge, for instance,

$$\lim_{a\rightarrow 0^+}\int_a^1\frac{1}{x}dx=\left.\lim_{a\rightarrow 0^+}\ln(x)\right|^1_a=\lim_{a\rightarrow 0^+}(ln(1)-ln(a))=\infty.$$

Similarly, the other integral is
$$\lim_{b\rightarrow 0^-}\int_{-1}^b\frac{1}{x}dx=\left.\lim_{b\rightarrow 0^-}\ln(|x|)\right|^b_{-1}=\lim_{b\rightarrow 0^-}(ln(-b)-ln(1))=-\infty.$$

Therefore, the entire expression above is an indeterminate form of $\infty-\infty$. In general, if any part of an integral diverges, we say the integral diverges.

In some cases, we take what is called the “Principal Value” which combines the two limits as
$$\lim_{a\rightarrow 0^+}\left[\int_{-1}^{-a}\frac{1}{x}dx+\int_a^1\frac{1}{x}\right]=\lim_{a\rightarrow 0^+}\left[(\ln(a)-\ln(1))+(\ln(1)-\ln(a))\right]=0.$$

Even though this limit exists, only the principal value exists (because the principal value cancels the equal infinities), the original integral itself does not exist.

Even though the two sides of the integral look symmetric, technically whenever you have an indefinite integral (e.g. integral of a function not defined at a point), you break up the integral into pieces that avoid the “problem” point(s) and then evaluate the limit of each piece separately as you approach the problem points. One somewhat contrived way to say that your limit should not exist is that you should be able to say your integral is $\lim_{t \to 0} \int_{at}^1 1/x dx + \int_{-1}^{-bt} 1/x dx$ but if you do this then you will only get $0$ if $a = b$. With derivatives it’s perhaps more clear how problems can arise: If you define the derivative as $\lim_{h \to 0} \frac{f(x+h) – f(x-h)}{2h}$ then you will get that the derivative of $f(x) = |x|$ at $x = 0$ is 0, even though clearly the derivative is undefined there.

The integral is undefined. However consider the following formula:

$$lim_{\epsilon \to 0} \frac {x}{x^2+ \epsilon^2} = \frac {1}{x}$$

Let us try this representation of $1/x$ in your integral. Now perform the integration before taking the limit of $\epsilon$ to $0$. [This change-of-order is presumably not strictly allowed, but obviously it makes a lot of sense to do so anyway.] Note that the integrand is now divergence-free, so the integration is completely straightforward. The anti-derivative is found to be:

$$(1/2) * log (x^2 + \epsilon^2)$$

This function is symmetric, hence the cancellation that we seek indeed takes place and the integral from $-1$ to $+1$ equals zero. Of course it depends on the context of the mathematical problem at hand whether a method like this is justified.