How can I 'prove' the derivative of this function? Consider the function
$$
f: (-1, 1) \rightarrow \mathbb{R}, \hspace{15px} f(x) = \sum_{n=1}^{\infty}(-1)^{n+1} \cdot \frac{x^n}{n}
$$
I am required to show that the derivative of this function is
$$
f'(x) = \frac{1}{1+x}
$$
I have attempted to do this using the elementary definition of a limit, as follows:
$$
f'(x) = \lim_{a \rightarrow x} \left( \frac{f(a)-f(x)}{a-x} \right) = \lim_{a \rightarrow x} \left( \frac{ \sum_{n=1}^{\infty} \left[ (-1)^{n+1} \cdot \frac{a^n}{n} \right]- \sum_{n=1}^{\infty}\left[ (-1)^{n+1} \cdot \frac{x^n}{n} \right]}{a-x} \right) \\
= \lim_{a \rightarrow x} \left( \frac{ \sum_{n=1}^{\infty} \left[ (-1)^{n+1} \cdot \frac{a^n - x^n}{n} \right]}{a-x} \right)
$$
but I am unsure of how to proceed from here (assuming my approach is correct. Can someone help me to show this?
 A: HINT: if you knows that
$$\int_0^x\frac{\mathrm dt}{1+t}=\ln(1+x),\quad x\in (-1,1)$$
then the question is equivalent to prove that
$$\sum_{k=1}^\infty(-1)^{k+1}\frac{x^k}k=\ln(1+x),\quad x\in(-1,1)$$
A: You could observe that this is the taylor expansion for $\ln(x+1)$ and take its first derivative, if you already know about the derivatives for $\ln(x+1)$.
Otherwise, you could note that the sequence of functions converges uniformly in its radius of convergence, and the derivative is a continuous and linear function, so
$\begin{align*}\frac{d}{dx} \lim_{k \to \infty} \sum_{n=1}^{k} (-1)^{n+1} \frac{x^n}{n}&=\lim_{k \to \infty} \sum_{n=1}^{k} (-1)^{n+1} \frac{d}{dx}\frac{x^{n}}{n}\\&=\lim_{k \to \infty}\sum_{n=1}^{k}(-1)^{n-1} n\cdot \frac{x^{n-1}}{n}\\&=\sum_{n=0}^{\infty}(-x)^n \end{align*}$
where the penultimate equality comes from the fact that $(-1)^{n+1}=(-1)^{n-1}$. This has the well known geometric series formula in the interval $(-1,1)$, and is precisely $\frac{1}{1+x}$.
A: Use the fact that $a^n-x^n=(a-x)\sum_{i=1}^na^{n-i}x^{i-1}$, canceling with the denominator and taking the limit as $a\to x$ we get $(-1)^{n+1}nx^{n-1}$ in the numerator. Cancel the $n$ and now prove that the resulting sum converges to $\frac{1}{1+x}$ using alternating series.
A: No need to argue straight from the definition of the derivative. If you could show uniform convergence, you could simply differentiate term by term, which gives a nice geometric series.
So how do you show uniform convergence? Use the Weierstrass M test. On any closed interval $[-a,a]\subset(-1,1)$, the absolute values of the terms of your series are bounded by $a^n$, and because $|a|<1$, the series $\sum a^n$ converges. So your series converges uniformly on $[-a,a]$. This is all you need to get the derivative at any point $x_0\in(-1,1)$, for you can simply pick $a$ so that $|x_0|<a<1$.
