---
title: Sequences and series
heading: Adding up infinitely many terms, and getting a finite answer
eyebrow: A6 · Lesson 23 · Sequences and series
xp: 40
---

::: hook
A ball bounces back to half its previous height each time. It bounces infinitely many times in principle, so does it travel an infinite distance? Add 1 + ½ + ¼ + ⅛ + ... and the running total creeps toward 2 without ever passing it. Infinite sums that settle on a finite value are behind the decaying exponentials of A5, the Taylor series later in this course, and the Fourier series in A10.

::: play
- The staircase is the running total (the partial sum) of $1 + r + r^2 + r^3 + \cdots$, after $n$ terms. The dashed line is $1/(1 - r)$.
- Set $r = 0.5$ and watch the steps shrink toward the line. Try $r = 0.9$: slower. Try $r = -0.5$: the total overshoots and undershoots.
- Push $r$ up to 1 or past it. What happens to the staircase?
:::
:::

```sim plot
view: graph
x: n = 0..20
y: S = -1..8
slider: r = -0.9..1.2 step 0.05 = 0.5
plot: (1 - r^(floor(n) + 1))/(1 - r) | samples: 2000 | label: partial sum
plot: 1/(1 - r) | dashed | color: ch2 | label: 1/(1 − r)
readout: sum of 20 terms = (1 - r^21)/(1 - r)
readout: 1/(1 − r) = 1/(1 - r)
```

::: predict
## With $r = 0.9$, the terms are 1, 0.9, 0.81, ... What does the infinite sum come to?

- [ ] Infinity, because there are infinitely many terms
- [x] 10
- [ ] 1.9
- [ ] 0.9

::: reveal
10, which is $1/(1 - 0.9)$. The terms shrink by a factor of 0.9 each time, so the sum converges, though slowly: after 20 terms it's only at about 8.8. What decides whether an infinite sum has a finite value isn't how many terms there are, but how fast they shrink.
:::
:::

::: nameit
## Sequences, series and convergence

A **sequence** is an ordered list of numbers $a_0, a_1, a_2, \ldots$, often given by a formula: $a_n = r^n$, or $a_n = 1/n!$. It **converges** to a limit $L$ if its terms get and stay as close to $L$ as you like: $r^n \to 0$ whenever $|r| < 1$.

A **series** is the sum of a sequence's terms. Its value is the limit of its **partial sums** $S_N = a_0 + a_1 + \cdots + a_N$, if that limit exists:

$$\sum_{n=0}^{\infty} a_n = \lim_{N \to \infty} S_N$$

**The geometric series** is the one to know by heart. Multiply $S_N = 1 + r + \cdots + r^N$ by $r$ and subtract: everything cancels except the ends, $S_N - rS_N = 1 - r^{N+1}$, so

$$S_N = \frac{1 - r^{N+1}}{1 - r} \qquad\text{and, for } |r| < 1, \qquad \sum_{n=0}^{\infty} r^n = \frac{1}{1 - r}$$

For $|r| \ge 1$ the terms don't shrink and the series **diverges**.

**Shrinking terms aren't enough.** The terms must go to zero, but that alone doesn't guarantee a finite sum: $1 + \tfrac12 + \tfrac13 + \tfrac14 + \cdots$ grows without limit (slowly, like $\ln N$). What helps is shrinking fast. A useful test: if the ratio of each term to the one before approaches some $\rho < 1$, the series converges, like a geometric series with ratio $\rho$. That **ratio test** shows, for example, that $\sum x^n/n!$ converges for every $x$, since the ratio $x/(n + 1)$ goes to zero.
:::

::: example
## Sum $3 + 3(0.4) + 3(0.4)^2 + \cdots$, and compare it with the first six terms.

::: solution
1. **Sum the whole series.** It's geometric with first term 3 and ratio 0.4:
   $$\frac{3}{1 - 0.4} = 5$$
2. **Sum the first six terms.**
   $$\begin{aligned} &\frac{3(1 - 0.4^6)}{1 - 0.4} \\ &= 5(1 - 0.004096) \\ &= 4.97952 \end{aligned}$$
3. **Compare.** Six terms already get within 0.05 of the total, because $0.4^6$ is small.

**Answer:** the series sums to 5, and its first six terms add to 4.97952.
:::
:::

::: example
## Write the repeating decimal $0.272727\ldots$ as a fraction.

::: solution
1. **Write it as a series.**
   $$0.272727\ldots = \frac{27}{100} + \frac{27}{100^2} + \cdots$$
   which is geometric with ratio $\frac{1}{100}$.
2. **Sum it.**
   $$\begin{aligned} \frac{27/100}{1 - 1/100} &= \frac{27}{99} \\ &= \frac{3}{11} \end{aligned}$$

**Answer:** $0.272727\ldots = \frac{3}{11}$.
:::
:::

::: example
## Sum $\displaystyle\sum_{n=1}^\infty\frac{1}{n(n + 1)}$.

::: solution
1. **Split each term.**
   $$\frac{1}{n(n + 1)} = \frac1n - \frac{1}{n + 1}$$
2. **Let the partial sum collapse.** Each term cancels part of the next:
   $$\begin{aligned} S_N &= \left(1 - \tfrac12\right) + \left(\tfrac12 - \tfrac13\right) \\ &\quad + \cdots + \left(\tfrac1N - \tfrac{1}{N + 1}\right) \\ &= 1 - \frac{1}{N + 1} \end{aligned}$$
3. **Let $N \to \infty$.** The partial sums go to exactly 1. This is a telescoping series.

**Answer:** the series sums to exactly 1.
:::
:::

::: check
given: a = 2..9 int; r = 0.2 | 0.25 | 0.5 | 0.6 | 0.8
answer: a/(1 - r)
tolerance: 0.5%

## What is $\given{a} + \given{a}(\given{r}) + \given{a}(\given{r})^2 + \cdots$, continuing forever?

::: right
Right. A geometric series with first term {a} and ratio {r}: $\given{a}/(1 - \given{r})$ = {answer}.
:::

::: misses
- [a/(1 + r)] The ratio is +{r}, so the formula is $a/(1 - r)$.
- [a*r/(1 - r)] That sum starts from $ar$. This one starts from {a} itself.
- [1/(1 - r)] Multiply by the first term, {a}.
- [any] Not yet. Use $\sum ar^n = a/(1 - r)$.
:::
:::

::: check
given: r = 0.8 | 0.9; N = 3..10 int
answer: (1 - r^(N + 1))/(1 - r)
tolerance: 0.5%

## What is the partial sum $1 + \given{r} + \given{r}^2 + \cdots + \given{r}^{\given{N}}$?

::: right
Right. $(1 - r^{N+1})/(1 - r)$ = {answer}.
:::

::: misses
- [1/(1 - r)] That's the infinite sum. Stop after the $r^{\given{N}}$ term.
- [(1 - r^N)/(1 - r)] That's one term short: there are N + 1 terms, from $r^0$ to $r^N$.
- [any] Not yet. Use $S_N = (1 - r^{N+1})/(1 - r)$.
:::
:::

::: check
kind: choice

## Which series converges?

- [ ] $1 + 1 + 1 + \cdots$
- [ ] $1 + \tfrac12 + \tfrac13 + \tfrac14 + \cdots$
- [x] $1 + \tfrac14 + \tfrac19 + \tfrac1{16} + \cdots$
- [ ] $1 - 1 + 1 - 1 + \cdots$

::: right
Right. $\sum 1/n^2$ converges (to $\pi^2/6$, as it happens), because its terms shrink fast enough. The harmonic series $\sum 1/n$ doesn't.
:::

::: misses
- [1] Constant terms add up without limit.
- [2] That's the harmonic series. Its terms do shrink, but too slowly: its partial sums grow like $\ln N$, forever.
- [4] Its partial sums jump between 1 and 0 forever, never settling.
:::
:::

::: check
given: h = 1..4 int
answer: h + 2*h
tolerance: 0.5%

## A ball dropped from {h} m bounces back to half its previous height each time. What total distance does it travel, up and down, before coming to rest?

::: right
Right. Down {h}, then up and down $2 \times (h/2 + h/4 + \cdots) = 2h$: in total $3h$ = {answer} m.
:::

::: misses
- [2*h] That counts each bounce once. Each bounce goes up and comes back down.
- [h*2*2] The first drop isn't repeated: {h} m down, then the bounces add $2h$.
- [any] Not yet. Add the first drop to twice the sum of the bounce heights, $h/2 + h/4 + \cdots = h$.
:::
:::

::: check
kind: parts
given: a = 1 | 2; N = 10 | 100

## Telescope $\displaystyle\sum_{n=1}^\infty\frac{1}{(n + \given{a} - 1)(n + \given{a})}$.

::: part
answer: 1/a - 1/(N + a)
tolerance: 0.5%

### What is the partial sum of the first {N} terms?

::: misses
- [any] $\frac{1}{(n + a - 1)(n + a)} = \frac{1}{n + a - 1} - \frac{1}{n + a}$.
:::
:::

::: part
answer: 1/a
tolerance: 0.5%

### What is the full sum?

::: misses
- [any] Let $N \to \infty$.
:::
:::
:::

::: check
kind: derivation
vars: n = 1..50

## Split $\dfrac{1}{n(n + 1)}$ for telescoping.

::: step
answer: 1/n - 1/(n + 1)

### Write it as a difference of two simple fractions.
:::

::: step
answer: 1 - 1/(n + 1)

### Summing from 1 to $N$, everything cancels but the first and last pieces. With $N$ written as $n$, what is the partial sum?
:::

::: right
Right. $S_N = 1 - \frac{1}{N + 1} \to 1$.
:::
:::

::: explain
## How can infinitely many positive numbers add up to a finite total?

::: model
If the numbers shrink fast enough, each new one adds less than the one before, and the running total gets closer and closer to some value without passing it. For the geometric series with ratio ½, each term is half the remaining gap to 2, so the total creeps toward 2 forever but never exceeds it. The sum of the infinite series is defined as that limiting value.
:::
:::

::: practice

::: check
given: a = 1..9 int; r = 0.1 | 0.3 | 0.4 | 0.7
answer: a/(1 - r)
tolerance: 0.5%

## Sum $\given{a}\sum_{n=0}^{\infty}\given{r}^n$.

::: misses
- [a/(1 + r)] The ratio is positive.
- [any] $a/(1 - r)$.
:::
:::

::: check
given: r = 0.2 | 0.3 | 0.5 | 0.6
answer: 1/(1 + r)
tolerance: 0.5%

## Sum $1 - \given{r} + \given{r}^2 - \given{r}^3 + \cdots$.

::: misses
- [1/(1 - r)] The ratio here is $-\given{r}$.
- [any] A geometric series with ratio $-r$: $1/(1 - (-r))$.
:::
:::

::: check
given: d = 2..9 int
answer: 1/(d - 1)
tolerance: 0.5%

## Sum $\dfrac1{\given{d}} + \dfrac1{\given{d}^2} + \dfrac1{\given{d}^3} + \cdots$.

::: misses
- [d/(d - 1)] That includes a first term of 1. This series starts at $1/\given{d}$.
- [any] First term $1/\given{d}$, ratio $1/\given{d}$: $\frac{1/d}{1 - 1/d}$.
:::
:::

::: check
given: n = 3..8 int
answer: 1/(n + 1)
tolerance: 0.5%

## For $\sum x^n/n!$, the ratio of the term after $x^{\given{n}}/\given{n}!$ to that term is $x/(\given{n} + 1)$. What is it at $x = 1$?

::: misses
- [n + 1] It's $x$ divided by $n + 1$.
- [any] Put $x = 1$ into $x/(n + 1)$.
:::
:::
:::
