# Error Estimation for Approximating Alternating Series Examples 1

Recall from the Error Estimation for Approximating Alternating Series page that if $\sum_{n=1}^{\infty} a_n$ is an alternating series that satisfies The Alternating Series Test, that is $a_na_{n+1} < 0$, $\mid a_{n+1} \mid ≤ \mid a_n \mid$ and $\lim_{n \to \infty} a_n = 0$, then $\sum_{n=1}^{\infty} a_n = s$ for some $s \in \mathbb{R}$ and the error estimation between the actual sum $s$ and the $n^{\mathrm{th}}$ partial sum is bounded:

(1)We will now look at some more examples of determining how many terms, $n$ are needed in order to ensure that the $n^{\mathrm{th}}$ partial sum has error from the actual sum $s$ of less than some prescribe error tolerance $E$.

## Example 1

**Determine the number of terms of the series $\sum_{n=1}^{\infty} \frac{(-1)^n}{n}$ that are needed to be computed in order for the sum of the series to have an error less than $E = 10^{-6}$.**

We first note that $\sum_{n=1}^{\infty} \frac{(-1)^n}{n}$ does indeed satisfy the conditions of the alternating series test since $a_na_{n+1} < 0$, $\mid a_{n+1} \mid ≤ \mid a_n \mid$ and $\lim_{n \to \infty} \frac{(-1)^n}{n} = 0$. Now we have that our error tolerance $E = 0.000001$. Thus we want to find the number of terms $n$ such that:

(2)So we want $n$ such that:

(3)Thus if $n > 999999$ we have that the $n^{\mathrm{th}}$ partial sum $s_n$ has error less than $E = 10^{-6}$ from the actual sum $s$.

## Example 2

**Determine the number of terms of the series $\sum_{n=1}^{\infty} \frac{(-1)^n}{e^n}$ that are needed to be computed in order for the sum of the series to have an error less than $E = 10^{-5}$.**

Once again, we will first verify that $\sum_{n=1}^{\infty} \frac{(-1)^n}{e^n}$ is an alternating series. Note that $a_na_{n+1} < 0$, $\mid a_{n+1} \mid ≤ \mid a_n \mid$, and $\lim_{n \to \infty} \frac{(-1)^n}{e^n} = 0$.

Now $E = 10^{-5} = 0.00001$, so we want to find the number of terms $n$ for such that:

(4)So we solve for $n$ as follows:

(5)Thus if $n ≥ 11$ we have that the $n^{\mathrm{th}}$ partial sum $s_n$ has error from the actual sum $s$ of less than $E = 10^{-5}$.