Integral $\int_{-1}^{1} \frac{x}{1-x^2} \,dx$

Solution 1:

$\newcommand{\d}{\,\mathrm{d}}$The integral must be understood as an improper Riemann integral - although the antiderivative, $-\frac{1}{2}\ln(1-x^2)$, is undefined at $1,-1$, it is defined everywhere close to these points - fix $\epsilon\gt0,\delta\gt0$, and consider instead $1-\epsilon,-1+\delta$, and as you push $\epsilon,\delta$ ever smaller, you'll approach the value of the integral - if it exists. You can think of this as an integral defined on the open interval $(-1,1)$ rather than the closed one, $[-1,1]$. Importantly I must note that the limit must be the same regardless of how you push $\delta,\epsilon\to0$: if you obtain different answers by approaching $(-1,1)$ at different rates, then the integral is not convergent.

That being said, let's compute this:

$$\begin{align}\int_{-1+\delta}^{1-\epsilon}\frac{x}{1-x^2}\d x&=\left[-\frac{1}{2}\ln(1-x^2)\right]_{-1+\delta}^{1-\epsilon}\\&=-\frac{1}{2}[\ln(1-(1-\epsilon)^2)-\ln(1-(-1+\delta)^2)]\\&=-\frac{1}{2}\ln\left(\frac{2\epsilon-\epsilon^2}{2\delta-\delta^2}\right)\end{align}$$

Unfortunately, we see that if $\delta\to0$ faster than $\epsilon$ does, the integral diverges. Therefore classically the integral does not exist. What online calculators are reporting is something called the "principal value" - this is where we let $\delta,\epsilon\to0$ at precisely the same rate. You'll notice that that results in $\ln(1)=0$, which is why they report $0$. The function is also odd, so it stands to reason that if we approach the endpoints at the same rate over a symmetric interval, we'll integrate to zero. Wolfram correctly states that the integral does not converge, and names $0$ as a principal value, so maybe the online calculators you were using were lower-tier.