# Evaluating $-\ln(1-x)$ and an infinite sum

I did a little evaluation of the function $-\ln(1-x)$ with a sum of an infinite series, but I have come to a contradiction, and I would like to ask your help to find my mistake.

Let us start with the sum: $$\sum_{i=0}^\infty x^k = \frac{1}{1-x}$$ which converges at $|x|<1$. Then, divide it by $x$ and we will get: $$\sum_{i=0}^\infty x^{k-1} = \frac{1}{x(1-x)}$$ Now, we will integrate the infinite sum (which we can for all $|x|<1$), and we will receive: $$\sum_{i=0}^\infty \frac{x^k}{k} = \int_0^x\frac{1}{t(1-t)}$$

Now, the contradiction comes by the fact that the infinite sum at the left part equals $-\ln(1-x)$, while by using integration by parts for the integral in the right we get: $$\ln(t)+\ln(1-t)|_0^x$$ which diverges because of $\ln(0)$, and isn't equal to $-\ln(1-x)$.

As I stated above, I obviously have a mistake somewhere, and would be happy to get your help, thanks!

• You have a sum over $i$ of $x^k$. Whatever, the sum starts at zero, so the $x^k/k$ term is wrong. – Gerry Myerson May 19 '17 at 10:38
• Gerry - you're right, I've missed that. thanks! – Mickey May 19 '17 at 10:49

Since, for $|x| < 1$ we have $$\frac{1}{1-x} = \sum_{k = 0}^\infty x^k.$$ Now since $$\int \frac{1}{1-x} dx = -\ln(1-x).$$ So that $$-\ln(1-x) = \int \left(\sum_{k = 0}^\infty x^k\right) dx = \sum_{k = 0}^\infty \frac{x^{k+1}}{k+1} ~\mbox{for} ~|x| < 1$$