I want to evaluate this summation:
$$S=1+x+\frac{x^2}{2}+\frac{x^3}{3}+\frac{x^4}{4}+...+...$$
where, $|x|<1$
Here it is my approach
$$S=1+\sum_{n=1}^{\infty}\frac{x^n}{n}=f(x)$$
$$f'(x)=1+x+x^2+x^3+...+...=\frac{1}{1-x}$$
$$f(x)=\int f'(x)dx=\int \frac{1}{1-x} dx=-\ln(1-x)+C$$
$$f(0)=1 \Longrightarrow C=1 $$
$$S=1-\ln(1-x)$$
And here is my problem:
I calculated this sum for only $|x|<1$.
Then, I checked in Wolfram Alpha and I saw that, this sum $f(x)$ converges for $x=-1$. But, this creating a contradiction with my solution. Because, the series $$f'(x)=1+x+x^2+x^3+...+...=\frac{1}{1-x}$$ for $x=-1$ doesn't converge, diverges. Therefore, there is a problem in my solution. But I can not find the source of the problem.
How can I prove the formula $f(x)=1-\ln(1-x)$ is also correct at the point $x=-1$ ?
Thank you very much.
I don't know how familiar your are with power series, but this has to do with the notion of radius of convergence.
$\sum \left(\frac{x^n}{n}\right)_{n\in\mathbb{N^*}}$ is a power series with a radius of convergence $R=1$ (which can be proved by the ratio test), so indeed, it does converge for $|x|<1$, and does diverge for $|x|>1$.
As for $x=1$, the only case with $x=-1$ were we can't conclude right away, it could naively be anything, but it happens to converge.
The power series $\sum \left(x^n\right)_{n\in\mathbb{N^*}}$ is indeed the derivative of the previous one : we know it has the same radius of convergence, so for $x=1$, here again it could be anything ; and it happens to diverge.
The convergence circle is the only place were the convergence of a power series and its derivatives aren't always equivalent : it could be anything, and you can't deduce the convergence of the derivative from the convergence of the power series there.
As to show that the power series and $f(x)=1-\ln(1-x)$ are equal also for $x=-1$ (that is to say, to prove that $f(-1)$ is the sum of the series) :
$\cdot$ The power series and f both exist for $x$ in $[-1,1)$ (for the power series, you can prove it with the ratio test)
$\cdot$ They are both continuous on $[-1,1)$ : it is obvious for $f$, and for the power series, we know that the sum of the power series is continious strictly inside the convergence disk $(-1,1)$. We extend the continuity to -1 by the uniform convergence on $[-1,0]$.
$\cdot$ Are equal to one another on $(-1,1)$ which is dense in $[-1,1]$.
We can conclude that the power series and f are equal also at $x=1$, so $f(-1)$ is indeed the sum of the series.
If you are not familiar with this density theorem :
Since the power series is continuous on -1, by definition, $\lim\limits_{x\rightarrow\ -1}\sum\limits_{n=1}^{\infty}\frac{x^n}{n}=\sum\limits_{n=1}^{\infty}\frac{(-1)^n}{n}$, the limits being taken by approaching from the right ($x>-1$).
But, since the power series and f are equal for $x>-1$, we can put $f$ instead of the power series inside the limit :
$$\lim\limits_{x\rightarrow\ -1}f(x)=\sum\limits_{n=1}^{\infty}\frac{(-1)^n}{n}$$
Or $f$ is continuous on -1, so $\lim\limits_{x\rightarrow\ -1}f(x)=f(-1)$
Hence $\sum\limits_{n=1}^{\infty}\frac{(-1)^n}{n}=f(-1)$.