Question on the sum $\sum_{n=1}^{\infty}\frac{x^n}{n} = -\ln(1-x)$ $f(x) = \displaystyle\sum_{n=1}^{\infty}\frac{x^n}{n} = x + \frac{x^2}{2} + \frac{x^3}{3} + ... = -\ln(1-x)$ for $|x| < 1$.
$f'(x) = \displaystyle\sum_{n=1}^{\infty}x^{n-1} = 1 + x + x^2 + x^3 +... = \frac{1}{1-x}$ for $|x| < 1$
If $f'(x) = \displaystyle\frac{1}{1-x}$, then $f(x) = \displaystyle\int\frac{1}{1-x}dx$
But $\displaystyle\int \frac{1}{1-x}dx = -\ln(1-x) + C$, and so $f(x) = -\ln(1-x) + C$
Do we need a definite integral here so there will be no $C$ and will agree with how $f(x)$ was originally defined? If so what would the definite integral be? Or maybe there is no definite integral at all?
 A: You're right: $f'(x)=\frac1{1-x}$, so $f(x)$ must be $-\ln(1-x)+C$ for some $C$. Now, to find what $C$ is, try letting $x$ be $0$ and solving for $C$.
Or, if you want to do a definite integral, start with:
$$1+t+t^2+\dotsb=\frac1{1-t}$$
Take the definite integral from $0$ to $x$:
\begin{align}
\int_0^x(1+t+t^2+\dotsb)\operatorname d\!t&=\int_0^x\frac1{1-t}\operatorname d\!t\\
x+\frac{x^2}2+\frac{x^3}3+\dotsb&=-\ln(1-x)
\end{align}

Note that if we take $x=-1$, we get the famous series for $\ln2$:
$$\ln2=1-\frac12+\frac13-\dotsb$$
which can be proven without calculus if you try hard enough.
A: There are various things going on here. One is the issue of the $+C.$ What you wrote might better be put

If $f'(x) = \displaystyle\frac{1}{1-x}$, then by definition of the indefinite integral $\displaystyle\int\frac{1}{1-x}dx=f(x)+C$

Also , by definition of definite integrals
If $f'(x) = \displaystyle\frac{1}{1-x}$, on $[a,b]$ then $ \displaystyle\int_a^b\frac{1}{1-t}dt=f(b)-f(a)$ 
Note that an arbitrarily chosen constant of integration $C$ will cancel out.
I changed the variable of integration so that I could say that for $|x| \lt 1,$ $$\int_0^x\frac1{1-t}dt=-\ln(1-t)\mid_0^x=\left(-\ln(1-x)\right)-(-\ln(1-0))=\ln\left(\frac1{1-x}\right)-0$$ 
There is also the matter of term by term integration and differentiation of power series. Notice that this is one of the interesting cases where 
$f(x) = = x + \frac{x^2}{2} + \frac{x^3}{3} + ... = -\ln(1-x)$ for $|x| < 1$ and also $x=-1$ but not $x=1.$
$f'(x) =  1 + x + x^2 + x^3 +... = \frac{1}{1-x}$ for $|x| < 1$ but not for  $x= -1$ or $x=1.$
