---
title: Power series
heading: Polynomials that never end
eyebrow: A6 · Lesson 34 · Power series
xp: 40
---

::: hook
A polynomial is the easiest kind of function there is: a processor computes one with nothing but multiplies and adds. A **power series** is a polynomial that goes on forever, $c_0 + c_1x + c_2x^2 + \cdots$, and almost every function you know, $e^x$, $\sin x$, $\ln(1 + x)$, can be written as one. That's how calculators and math libraries compute them. The catch is that the series may only add up for some values of $x$. This lesson finds where.
:::

::: play
- The blue curve is $\frac{1}{1 - x}$. The other curve adds up the first $N + 1$ terms of $1 + x + x^2 + \cdots$.
- Raise $N$. Inside $-1 < x < 1$ the partial sums hug the function. What happens outside?
- Move the point $x_0$ and compare the readouts. Try $x_0$ = 0.9 and $x_0$ = −1.2.
:::
:::

```sim plot
view: graph
x: x = -1.5..1.5
y: y = -3..6
slider: N = 1..30 step 1 = 5
slider: x0 = -1.4..0.95 step 0.05 = 0.5
plot: 1/(1 - x) | label: 1/(1 − x) | samples: 1500
plot: (1 - x^(N + 1))/(1 - x) | label: N + 1 terms | color: ch2 | samples: 1500
marker: x = x0 | label: x₀
readout: partial sum at x0 = (1 - x0^(N + 1))/(1 - x0) | digits: 5
readout: function at x0 = 1/(1 - x0) | digits: 5
```

::: predict
## The series $1 + x + x^2 + \cdots$ equals $\frac{1}{1 - x}$, which is perfectly well defined at $x = -2$ (it's $\frac{1}{3}$). Does the series add up to $\frac{1}{3}$ there?

- [ ] Yes, with enough terms
- [x] No: at $x = -2$ the terms grow and the partial sums swing wildly
- [ ] Yes, if you group the terms in pairs
- [ ] It converges, but to a different number

::: reveal
No. At $x = -2$ the terms are $1, -2, 4, -8, \ldots$, and the partial sums are $1, -1, 3, -5, 11, \ldots$. A power series only represents its function inside its **interval of convergence**, here $-1 < x < 1$. Outside it, the function is fine but the series isn't.
:::
:::

::: nameit
## Power series

A power series centered at $a$ is

$$\sum_{n=0}^\infty c_n(x - a)^n = c_0 + c_1(x - a) + c_2(x - a)^2 + \cdots$$

For each $x$ it's an ordinary series that converges or doesn't.

## Radius of convergence

Every power series has a **radius of convergence** $R$:

- it converges (absolutely) for $|x - a| < R$;
- it diverges for $|x - a| > R$;
- at the two endpoints $x = a \pm R$ anything can happen, so check each one separately.

$R$ can be 0 (converges only at the center) or $\infty$ (converges everywhere).

## Finding R with the ratio test

Apply the ratio test to the terms: $\left|\frac{c_{n+1}(x - a)^{n+1}}{c_n(x - a)^n}\right| \to |x - a|\,L$, where $L = \lim\left|\frac{c_{n+1}}{c_n}\right|$. The series converges when $|x - a|L < 1$, so

$$R = \frac{1}{L} = \lim_{n\to\infty}\left|\frac{c_n}{c_{n+1}}\right|$$

## Why the interval is symmetric

The radius comes from how fast $|c_n|$ grows, which doesn't care about the sign of $x - a$. In A12 you'll see the deeper reason: $R$ is the distance from the center to the nearest point in the complex plane where the function misbehaves. For $\frac{1}{1 + x^2}$, which is smooth on the whole real line, $R = 1$ at center 0, because of the trouble at $x = \pm j$.
:::

::: example
## Find the interval of convergence of $\displaystyle\sum_{n=1}^\infty\frac{x^n}{n\,3^n}$.

::: solution
1. **Ratio test.**
   $$\begin{aligned} &\frac{|x|^{n+1}/((n + 1)3^{n+1})}{|x|^n/(n\,3^n)} \\ &= \frac{|x|}{3}\cdot\frac{n}{n + 1} \\ &\to \frac{|x|}{3} \end{aligned}$$
   It converges for $|x| < 3$, so $R = 3$.
2. **Check $x = 3$.** The series is $\sum\frac{1}{n}$, which diverges.
3. **Check $x = -3$.** It's $\sum\frac{(-1)^n}{n}$, which converges.

**Answer:** the interval of convergence is $[-3, 3)$.
:::
:::

::: example
## Find the radius of convergence of $\sum n!\,x^n$ and of $\sum\frac{x^n}{n!}$.

::: solution
1. **Ratio for $\sum n!\,x^n$.**
   $$(n + 1)|x| \to \infty \quad (x \ne 0)$$
   so $R = 0$: it converges only at $x = 0$, which makes it useless.
2. **Ratio for $\sum\frac{x^n}{n!}$.**
   $$\frac{|x|}{n + 1} \to 0$$
   for every $x$, so $R = \infty$. This is the series for $e^x$, which converges everywhere.

**Answer:** $\sum n!\,x^n$ has $R = 0$, and $\sum\frac{x^n}{n!}$ has $R = \infty$.
:::
:::

::: example
## Find the interval of convergence of $\displaystyle\sum_{n=1}^\infty\frac{(x - 2)^n}{n\,2^n}$.

::: solution
1. **Ratio test.**
   $$\left|\frac{x - 2}{2}\right|\frac{n}{n + 1} \to \frac{|x - 2|}{2}$$
   so it converges for $|x - 2| < 2$, between 0 and 4.
2. **Check $x = 4$.** It's $\sum\frac1n$, which diverges.
3. **Check $x = 0$.** It's $\sum\frac{(-1)^n}{n}$, which converges.

**Answer:** the interval of convergence is $[0, 4)$.
:::
:::

::: check
given: c = 2 | 5 | 10
answer: c

## What is the radius of convergence of $\displaystyle\sum_{n=0}^\infty\frac{x^n}{\given{c}^n}$?

::: right
Right. It's geometric with ratio $x/c$, which needs $|x| < c$: $R$ = {answer}.
:::

::: misses
- [1/c] Upside down: the terms are $(x/c)^n$, so $|x|$ can reach $c$.
- [1] That's the radius for $\sum x^n$. Dividing by $c^n$ widens it.
- [any] Not yet. It's a geometric series with ratio $x/\given{c}$.
:::
:::

::: check
given: a = 1 | 2; c = 3 | 4
answer: a + c

## The series $\displaystyle\sum_{n=0}^\infty\frac{(x - \given{a})^n}{\given{c}^n}$ converges on $(a - c, a + c)$. What is the right end of that interval?

::: right
Right. Centered at {a} with radius {c}: the right end is {answer}.
:::

::: misses
- [c] That's the radius. The interval is centered at {a}, not 0.
- [a - c] That's the left end.
- [any] Not yet. Center plus radius.
:::
:::

::: check
given: c = 4 | 9 | 2
answer: sqrt(c)
tolerance: 0.5%

## What is the radius of convergence of $\displaystyle\sum_{n=0}^\infty\frac{x^{2n}}{\given{c}^n}$?

::: right
Right. It's geometric with ratio $x^2/c$, which needs $x^2 < c$: $R = \sqrt{c}$ = {answer}.
:::

::: misses
- [c] The power is $x^{2n}$: you need $x^2 < c$, not $|x| < c$.
- [any] Not yet. Write the terms as $(x^2/c)^n$.
:::
:::

::: check
given: c = 2 | 3 | 4
answer: 1/c
tolerance: 0.5%

## What is the radius of convergence of $\displaystyle\sum_{n=0}^\infty\frac{\given{c}^nx^n}{n + 1}$?

::: right
Right. The ratio tends to $c|x|$, so $R = \frac{1}{c}$ = {answer}.
:::

::: misses
- [c] Upside down: the coefficients grow like $c^n$, which shrinks the radius.
- [any] Not yet. Ratio test: $\frac{c^{n+1}|x|^{n+1}/(n + 2)}{c^n|x|^n/(n + 1)}$.
:::
:::

::: check
kind: choice

## What is the interval of convergence of $\displaystyle\sum_{n=1}^\infty\frac{x^n}{n}$?

- [ ] $(-1, 1)$
- [x] $[-1, 1)$
- [ ] $(-1, 1]$
- [ ] $[-1, 1]$

::: right
Right. $R = 1$. At $x = 1$ it's the harmonic series (diverges); at $x = -1$ it's the alternating harmonic series (converges).
:::

::: misses
- [1] Check the endpoints: one of them converges.
- [3] At $x = 1$ the series is $\sum\frac{1}{n}$, which diverges.
- [4] At $x = 1$ it's the harmonic series.
- [any] Find $R$, then test each endpoint.
:::
:::

::: check
given: c = 4 | 5; x = 1 | 2
answer: c/(c - x)
tolerance: 0.5%

## What is $\displaystyle\sum_{n=0}^\infty\left(\frac{\given{x}}{\given{c}}\right)^n$?

::: right
Right. $\frac{1}{1 - x/c} = \frac{c}{c - x}$ = {answer}.
:::

::: misses
- [c/(c + x)] The ratio is $+\frac{x}{c}$.
- [any] Not yet. A geometric series with ratio {x}/{c}.
:::
:::

::: check
kind: parts
given: c = 1 | 2 | 3; b = 2 | 4

## $\displaystyle\sum_{n=1}^\infty\frac{(x - \given{c})^n}{n\,\given{b}^n}$.

::: part
answer: b
tolerance: 0.5%

### What is its radius of convergence?

::: misses
- [any] Ratio test: $\frac{|x - c|}{b} < 1$.
:::
:::

::: part
answer: c - b
tolerance: 0.5%

### Its interval of convergence includes one end. Which end, as a value of $x$?

::: misses
- [c + b] At $x = c + b$ the series is $\sum\frac1n$, which diverges.
- [any] At the left end the series alternates.
:::
:::
:::

::: check
kind: derivation
vars: x = -1..5, c = 1..3, b = 2..4, n = 1..30

## Apply the ratio test to $\sum\frac{(x - c)^n}{n\,b^n}$.

::: step
answer: abs(x - c)/b*n/(n + 1)

### Simplify $\left|\frac{a_{n+1}}{a_n}\right|$.
:::

::: step
answer: abs(x - c)/b

### What does it approach as $n \to \infty$?
:::

::: right
Right. The series converges when $|x - c| < b$: a radius of $b$ about the center $c$.
:::
:::

::: explain
## Why can a power series converge for some values of $x$ and not others?

::: model
For each $x$, the power series is an ordinary series whose terms are $c_n(x - a)^n$. Far out, those terms behave roughly like a geometric series with ratio $|x - a|/R$, where $R$ is set by how fast the coefficients shrink. Close to the center the ratio is below 1 and the terms die away; far from the center the powers of $(x - a)$ win and the terms grow. The boundary between the two is the radius of convergence.
:::
:::

::: practice

::: check
given: c = 2..9 int
answer: c

## What is the radius of convergence of $\displaystyle\sum\frac{n\,x^n}{\given{c}^n}$?

::: misses
- [1/c] Upside down.
- [any] The factor $n$ doesn't change the radius.
:::
:::

::: check
given: a = -1 | 3; c = 2 | 5
answer: a - c

## The series $\displaystyle\sum\frac{(x - \given{a})^n}{\given{c}^n}$ converges on an open interval. What is its left end?

::: misses
- [a + c] That's the right end.
- [any] Center minus radius.
:::
:::

::: check
given: k = 2..9 int
answer: 1/k
tolerance: 0.5%

## What is the radius of convergence of $\displaystyle\sum (\given{k}x)^n$?

::: misses
- [k] The terms are $(kx)^n$: you need $|kx| < 1$.
- [any] Geometric with ratio $kx$.
:::
:::
:::
