Inside its interval of convergence, a power series behaves like a polynomial: you can differentiate it and integrate it one term at a time. Starting from the geometric series, that produces series for $\ln(1 + x)$, $\arctan x$ and more.
Why it works
Here is the idea. Differentiating $\sum c_n x^{n}$ term by term gives $\sum nc_nx^{n-1}$. The extra factor $n$ does not change the radius, because $\sqrt[n]{n} \to 1$, so the root test gives the same limit; integration divides by $n + 1$, which also leaves the radius alone. A theorem then guarantees that, for $|x| < R$, the new series really equals the derivative (or integral) of the function. Endpoints can change, so check them again.
Key idea
If $f(x) = \sum c_n(x - a)^{n}$ for $|x - a| < R$, then on the same interval
$$f'(x) = \sum_{n=1}^{\infty} nc_n(x - a)^{n-1},$$ $$\int f(x)\,dx = C + \sum_{n=0}^{\infty}\frac{c_n}{n + 1}(x - a)^{n+1}.$$
Worked example: A logarithm
Find a power series for $\ln(1 + x)$.
- $\frac{1}{1 + x} = 1 - x + x^{2} - x^{3} + \cdots$ for $|x| < 1$.
- Integrate term by term: $\ln(1 + x) = C + x - \frac{x^{2}}{2} + \frac{x^{3}}{3} - \cdots$.
- At $x = 0$ both sides are 0, so $C = 0$: $\ln(1 + x) = \sum_{n=1}^{\infty}\frac{(-1)^{n+1}x^{n}}{n}$, for $-1 < x \le 1$ (the endpoint $x = 1$ now converges).
Answer: $x - \frac{x^{2}}{2} + \frac{x^{3}}{3} - \cdots$
Worked example: Arctangent
Find a power series for $\arctan x$.
- $\frac{1}{1 + x^{2}} = 1 - x^{2} + x^{4} - \cdots$ for $|x| < 1$.
- Integrate: $\arctan x = C + x - \frac{x^{3}}{3} + \frac{x^{5}}{5} - \cdots$, and $\arctan 0 = 0$ gives $C = 0$.
- At $x = 1$: $\frac{\pi}{4} = 1 - \frac{1}{3} + \frac{1}{5} - \cdots$, a famous (and very slowly converging) series for $\pi$.
Answer: $\sum\frac{(-1)^{n}x^{2n+1}}{2n + 1}$
Worked example: Summing a series by differentiating
Find $\sum_{n=1}^{\infty}\frac{n}{2^{n}}$.
- Differentiate $\sum_{n=0}^{\infty}x^{n} = \frac{1}{1 - x}$: $\sum_{n=1}^{\infty}nx^{n-1} = \frac{1}{(1 - x)^{2}}$.
- Multiply by $x$: $\sum_{n=1}^{\infty}nx^{n} = \frac{x}{(1 - x)^{2}}$, for $|x| < 1$.
- At $x = \frac{1}{2}$: $\frac{1/2}{1/4} = 2$.
Answer: $2$
Common mistake
Dropping the constant of integration. Integrating $\frac{1}{1 - x} = \sum x^{n}$ gives $-\ln(1 - x) = C + \sum\frac{x^{n+1}}{n + 1}$, and you find $C$ by plugging in the center: at $x = 0$, $-\ln 1 = 0 = C$. For other functions $C$ is not 0; for example, starting from $\int\frac{dx}{1 + x}$ to get $\ln(2 + x)$ would need $C = \ln 2$. Always evaluate both sides at the center.