<s>[INST] Sum of the alternating harmonic series $\sum_{k=1}^{\infty}\frac{(-1)^{k+1}}{k} = \frac{1}{1} - \frac{1}{2} + \cdots $ I know that the harmonic series $$\sum_{k=1}^{\infty}\frac{1}{k}  = \frac{1}{1} + \frac{1}{2} + \frac{1}{3} + \frac{1}{4} + \frac{1}{5} + \frac{1}{6} + \cdots + \frac{1}{n} + \cdots \tag{I}$$ diverges, but what about the alternating harmonic series 
$$\sum_{k=1}^{\infty}\frac{(-1)^{k+1}}{k}  = \frac{1}{1} - \frac{1}{2} + \frac{1}{3} - \frac{1}{4} + \frac{1}{5} - \frac{1}{6} + \cdots + \frac{(-1)^{n+1}}{n} + \cdots \text{?} \tag{II}$$
Does it converge?   If so, what is its sum?
 [/INST] I want to use the infinite series expansion of the integral of a function to compute the sum. If you repeat the process of integration by parts over and over again:
$$\int f(x) dx = xf(x)-\int xf'(x)dx = xf(x) - \frac{x^2}{2}f'(x)+\int \frac{x^2}{2}f''(x)dx$$
$$\Rightarrow \int f(x) dx = xf(x) - \frac{x^2}{2}f'(x) + \frac{x^3}{6}f''(x)-\int \frac{x^3}{6}f''(x)dx$$
$$\Rightarrow \int f(x) dx = xf(x) - \frac{x^2}{2}f'(x) + \frac{x^3}{6}f''(x)-\frac{x^4}{24}f'''(x)+ \int \frac{x^4}{24}f'''(x)dx$$
Continuing this pattern we can prove using Mathematical Induction (for all $n\ \epsilon\ \mathbb{Z}^+$)that:
$$\int f(x)dx = \sum_{k=0}^{n}\left[\frac{(-1)^kf^{(k)}(x)x^{k+1}}{(k+1)!}\right]+\frac{(-1)^n}{n!}\int x^n f^{(n)}(x)dx \rightarrow (1)$$
Limiting both sides of equation (1) as $n \rightarrow \infty$ we can write the infinite series expansion:
$$\int f(x)dx = \sum_{k=0}^{\infty}\left[\frac{(-1)^kf^{(k)}(x)x^{k+1}}{(k+1)!}\right] + C=C+xf(x) - \frac{x^2}{2}f'(x) + \frac{x^3}{6}f''(x)-+...\rightarrow (2)$$
We can certainly remove the integration constant $C$ from both sides by taking the definite integral:
$$\int_{0}^{x} f(t)dt =xf(x) - \frac{x^2}{2}f'(x) + \frac{x^3}{6}f''(x)-\frac{x^4}{24}f'''(x)+-...\rightarrow (3)$$
We can prove the Taylor series expansion for functions using this idea. Now let $f(x)=\frac{1}{1+x}$ and we get:
$$\ln(1+x)=\frac{1}{1+\frac{1}{x}}+\frac{1/2}{(1+\frac{1}{x})^2}+\frac{1/3}{(1+\frac{1}{x})^3}+\frac{1/4}{(1+\frac{1}{x})^4}+\frac{1/5}{(1+\frac{1}{x})^5}+...\rightarrow (4)$$
$$y=\frac{x}{x+1} \Rightarrow \ln (\frac{1}{1-y})=y+\frac{y^2}{2}+\frac{y^3}{3}+\frac{y^4}{4}+\frac{y^5}{5}+...\rightarrow (5)$$
By letting $y=-1$ and multiplying both sides of equation $(5)$ by $-1$ we get the sum we desired:
$$\ln 2 = 1 - \frac{1}{2} + \frac{1}{3} - \frac{1}{4} + \frac{1}{5}-\frac{1}{6}+-...$$
P.S. You can also use $(4)$ to get another interesting expansion for $\ln 2$ by putting $x=1$:
$$\ln 2 = \frac{1}{1 \cdot 2^1}+\frac{1}{2 \cdot 2^2}+\frac{1}{3 \cdot 2^3}+\frac{1}{4 \cdot 2^4}+\frac{1}{5 \cdot 2^5}+...$$
</s>