# Sequences and Series

## Worked Examples

## Series

If you try to add up all the terms of a sequence, you get an object called a series. In order to discuss series, it's useful to use**sigma notation,**so we will begin with a review of that.

**Part 1: Sigma Notation**

When adding many terms, it's often useful to use some shorthand notation. Let $a_{n}$ be a sequence of real numbers. We set
$$\sum_{i=1}^{k} a_{i} = a_{1} + a_{2} + \cdots + a_{k}$$
Here we add up the first terms $a_{1}, a_{2}, \ldots a_{k}$ of the sequence. We can also start the sum at a different integer.
$$\sum_{i=j}^{k} a_{i} = a_{j} + a_{j+1} + \cdots a_{k}$$
### Example. Let $a_{n} = \frac{1}{2^{n}}$. Express the sum of the first 100 terms of the corresponding series, using sigma notation.

**Solution:**$$ \sum_{i=1}^{100} \frac{1}{2^i} $$

**Part 2: Basics**

A series is an infinite sum $a_{1} + a_{2} + a_{3} + \cdots$. We typically write such an object using sigma notation
$$\sum_{i=1}^{\infty} a_{i}.$$
If you do not use sigma notation to express a series, it's very important to include the ``$+ \cdots$" to make sure the person reading understands that the sum goes on forever.
If you have an explicit expression for the term $a_{i}$ you usually replacen $a_{i}$ with this expression when using sigma notation. For example if $a_{i} = \frac{1}{2^{i}}$, then the corresponding series is usually written $ \sum_{i=1}^{\infty} \frac{1}{2^{i}}$.

### Example. Consider the series $\frac{2}{3} + \frac{4}{9} + \frac{6}{27} +\frac{8}{81} + \cdots$. Find an expression for the ith term $a_{i}$, and use it to write the series in sigma notation.

**Solution:**If you look at this series carefully you see that each term is given by a fraction: $a_{i} = \frac{b_{i}}{c_{i}}$. Let's look at $b_{i}$ and $c_{i}$ separately. The $b_{i}$'s give the list $2, 4, 6, 8, \ldots$, or the even natural numbers. So $b_{i} = 2i$. The $c_{i}$ give the list $3, 9, 27, 81, \ldots$ which is the geometric sequence $c_{i} = 3^{i}$.

Putting this together gives $a_{i} =\frac{2i}{3^{i}}$.

So the series $\frac{2}{3} + \frac{4}{9} + \frac{6}{27} +\frac{8}{81} + \cdots$ can be written in sigma notation as: $$\sum_{i=1}^{\infty} \frac{2i}{3^{i}}$$

#### Mini-Lecture.

Below is a mini lecture about series.

**Part 3: Partial Sums**

Given a series $a_{1} + a_{2} + a_{3} + \cdots = \sum_{i=1}^{\infty}$ we can form the ``$n$th partial sum," usually denoted $S_{n}$.
As the name might suggest, the $n$th partial sum is obtained by taking the first $n$ terms and adding them up.
More concretely $ S_{n} = \sum_{i=1}^{n} a_{i} = a_{1} + a_{2} + \cdots a_{n} $.
### Example. Consider the series $\sum_{i=1}^{\infty} \frac{1}{2^{i}}$. Find the first 5 partial sums. (I.e. find the partial sums $S_{1}, S_{2}, S_{3}, S_{4}, S_{5}$.)

**Solution:**For $S_{1}$ we get: $S_{1} = a_{1} = \frac{1}{2}$.

For $S_{2}$ we get: $S_{2} = a_{1} + a_{2} = \frac{1}{2} + \frac{1}{4} = \frac{3}{4}$.

For $S_{3}$ we get: $S_{3} = a_{1} + a_{2} + a_{3} = \frac{1}{2} + \frac{1}{4} + \frac{1}{8} = \frac{7}{8}$.

For $S_{4}$ we get: $S_{4} = a_{1} + a_{2} + a_{3} + a_{4} = \frac{1}{2} + \frac{1}{4} + \frac{1}{8} + \frac{1}{16} = \frac{15}{16}$.

For $S_{5}$ we get: $S_{5} = a_{1} + a_{2} + a_{3} + a_{4} + a_{5} = \frac{1}{2} + \frac{1}{4} + \frac{1}{8} + \frac{1}{16} + \frac{1}{32} = \frac{31}{32}$.

**Part 4: Geometric Series**

A series of the for $ \sum_{i}^{\infty} ar^{i} = ar + ar^{2} + ar^{3} + \cdots$ is called a geometric series. (This is a series where the terms $a_{i}$ that we are summing, form a geometric sequence.)
Let's consider the $n$th partial sum of a geometric sequence; $S_{n} = ar + ar^{2} + \cdots + ar^{n}$, as well as $rS_{n} = r(ar + ar^{2} + \cdots + ar^{n}) = ar^{2} + ar^{3} + \cdots + ar^{n+1}$.

The difference between these two expressions is $S_{n} - rS_{n} = ar - ar^{n+1}$. We can rearrange this and solve for $S_{n}$: \begin{align*} (1-r) S_{n} &= ar( 1-r^{n}) \\ S_{n} &= ar \frac{1-r^{n}}{1-r} \end{align*} So for a geometric series we get the formula: $$S_{n} = ar \frac{1-r^{n}}{1-r}$$

### Example. Consider the series $\sum_{i=1}^{\infty} \frac{1}{2^{i}}$. Find the 100th partial sum, using the formula. Find a formula for the $n$th partial sum. What happens to this expression as $n$ gets larger and larger?

**Solution:**For the 100th partial sum, using the formula above we get $$ S_{100} = \frac{1}{2} \frac{1-(\frac{1}{2})^{100}} {1-\frac{1}{2}} = 2\frac{1}{2} (1-\frac{1}{2^{100}}) = 1-\frac{1}{2^{100}}.$$ For the $n$th partial sum, we get $$ S_{n} = \frac{1 - (\frac{1}{2})^{n}} {1-\frac{1}{2}} = 2\frac{1}{2} (1-\frac{1}{2^{n}}) = 1-\frac{1}{2^{n}} = 1-\frac{1}{2^{n}} .$$ As $n$ gets larger and larger, we see that the partial sum is getting closer and closer to $1.$

As the previous example suggest, we can use the following formula to evaluate a geometric series, when the ratio $r$ satisfies $|r| <1$. $$\sum_{i=1}^{\infty} ar^{i} = \frac{ar}{1-r} \text{ for } |r|<1$$

### Example. Evaluate the series $\sum_{i=1}^{\infty} \frac{1}{5^{i+2} }$.

**Solution:**This series is geometric, but if we look carefully at the definition, we see that the indexing is doesn't quite match the form we're used to seeing. To fix this, let's rewrite the series: $$ \sum_{i=1}^{\infty} \frac{1}{5^{i+2} } = \sum_{i=1}^{\infty} \frac{1}{5^{2}} \frac{1}{5^{i}} = \frac{1}{5^{2}} \sum_{i=1}^{\infty} \frac{1}{5^{i}}. $$ Now we can use the formula above to get: \begin{align*} \sum_{i=1}^{\infty} \frac{1}{5^{i+2} } &= \frac{1}{5^{2}} \sum_{i=1}^{\infty} \frac{1}{5^{i}} \\ &= \frac{1}{25} \cdot \frac{\frac{1}{5}}{1-\frac{1}{5}} \\ &= \frac{1}{25} \cdot \frac{1}{5} \cdot \frac{5}{4} \\ &= \frac{1}{100} \end{align*}