Error Estimation for Approximating Alternating Series Exampl

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)
\begin{align} \quad \mid s - s_n \mid ≤ \mid a_{n+1} \mid = \mid s_{n+1} - s_n \mid \end{align}

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)
\begin{align} \quad \mid s - s_n \mid ≤ \mid a_{n+1} \mid = \biggr \rvert \frac{(-1)^{n+1}}{n + 1} \biggr \rvert < E = 0.000001 \end{align}

So we want $n$ such that:

(3)
\begin{align} \quad \frac{1}{n + 1} < 0.000001 \Leftrightarrow n + 1 > 1000000 \Leftrightarrow n > 999999 \end{align}

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)
\begin{align} \quad \mid s - s_n \mid ≤ \mid a_{n+1} \mid = \biggr \rvert \frac{(-1)^{n+1}}{e^{n+1}} \biggr \rvert < E = 0.00001 \end{align}

So we solve for $n$ as follows:

(5)
\begin{align} \quad \frac{1}{e^{n+1}} < 0.00001 \Leftrightarrow e^{n+1} > 100000 \Leftrightarrow n+1 > \ln (100000) \Leftrightarrow n > \ln (100000) - 1 \approx 10.512... \end{align}

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}$.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License