# On calculating ∫10ln(1−x2)dx\int_0^1\ln(1-x^2)\;{\mathrm dx} — where is the mistake?

I’ve seen the integral $\displaystyle \int_0^1\ln(1-x^2)\;{dx}$ on a thread in this forum and I tried to calculate it by using power series. I wrote the integral as a sum then again as an integral. Here is my calculation:

I should have got $2\ln{2}-2$, not $\ln{2}-2$. I’m thinking that either I made a very silly mistake, or the blue step is wrong (probably the order cannot be switched, although I don’t know why)!

This is quite interesting. I think the problem does lie in the blue line. The sum over $\frac{1}{k+1}-\frac{2}{2k+3}$ converges absolutely, but the sums over the two terms individually diverge. What you’re doing when you combine the two series as you do is effectively to move the terms $\frac{2}{2k+3}$ back to twice the $k$ value from where they belong, and that’s a different series; you can only do that when the two terms absolutely converge individually.

What you’re effectively calculating by “slowing down” $k$ in the second term is

and that is indeed $\ln 2 - 2$.

[Update]

The above explanation refers to the series above the blue line to show that exchanging the sum and integral in the blue line can’t be valid. But of course that should also be decidable from just the blue line itself.

First off, note that actually the first step after the blue line isn’t quite right, either: At $x=1$, the sum in the integrand actually diverges to $-\infty$, so the value $-3/2$ of the integrand in the last line for $x=1$ is obtained by rearranging a divergent series. But that problem only occurs at $x=1$; for all other values of $x$, the series converges absolutely and may validly be arranged to obtain the integrand in the last line. But this discontinuity at $x=1$ already shows that the partial sums don’t converge uniformly. Indeed

which for large $n$ is close to the integrand in the last line for most $x$ but close to $x=1$ suddenly becomes positive and ends up at $n$ for $x=1$, as it must. Here‘s a plot for $n=100$.

Here‘s a very nice general treatment of the interchange of limits based on uniform convergence, which can be applied to integrals, derivatives and sums alike. Since the series in the integrand diverges at $x=1$, we have to treat the integral as a limit taking the upper integration limit to $1$, and this limiting operation and the one in the series can only be interchanged if the uniform convergence criterion is fulfilled.

(Here‘s another example where an integral and a function limit can’t be interchanged due to lack of uniform convergence; this one is a bit simpler because there’s no sum involved.)