I wish to prove that $$\log \left(\frac{1}{1-x} \right) = \sum_{i=1}^\infty \frac{x^i}{i}.$$
The source I'm following (Notes on generating functions by Michel Goemans, MIT 18.310, Section 8) says to this can be performed by integrating both sides of: $$ \frac{1}{1 - x} = \sum_{i=0}^\infty x^i $$
On trying this, I get upto: \begin{align*} &\frac{1}{1 - x} = \sum_{i=0}^\infty x^i \\ &\int \frac{1}{1-x}dx = \int\sum_{i=0}^\infty x^i dx \\ &\int \frac{1}{1-x}dx = \sum_{i=0}^\infty \int x^i dx \\ &-\ln(|1-x|) + C = \sum_{j=1}^\infty \frac{x^{j}}{j} + D \qquad \text{(set $j \equiv i + 1$)} \\ \end{align*}
which is clearly not what we were going for. I don't understand what I'm doing wrong. Any help would be appreciated. I'm primarily interested in the proof of the equality. It'd be cool if someone could show me how to prove this from the integral.
There's a much simpler proof, starting from the basic formula: $$\ln(1-x)=-\sum_{i=1}^\infty \frac{x^i}{i}\qquad (|x|<1),$$ and using that $\;\ln\Bigl(\dfrac1{1-x}\Bigr)=-\ln(1-x)$.