Skip to main content
Logo image

APEX Calculus: for University of Lethbridge

Section 9.5 Alternating Series and Absolute Convergence

All of the series convergence tests we have used require that the underlying sequence \(\{a_n\}\) be a positive sequence. (We can relax this with Theorem 9.2.24 and state that there must be an \(N \gt 0\) such that \(a_n \gt 0\) for all \(n \gt N\text{;}\) that is, \(\{a_n\}\) is positive for all but a finite number of values of \(n\text{.}\))
In this section we explore series whose summation includes negative terms. We start with a very specific form of series, where the terms of the summation alternate between being positive and negative.

Definition 9.5.1. Alternating Series.

Let \(\{a_n\}\) be a positive sequence. An alternating series is a series of either the form
\begin{equation*} \infser (-1)^na_n\qquad \text{ or } \qquad \infser (-1)^{n+1}a_n\text{.} \end{equation*}
Recall the terms of Harmonic Series come from the Harmonic Sequence \(\{a_n\} = \{1/n\}\text{.}\) An important alternating series is the Alternating Harmonic Series:
\begin{equation*} \infser (-1)^{n+1}\frac1n = 1-\frac12+\frac13-\frac14+\frac15-\frac16+\cdots \end{equation*}
Geometric Series can also be alternating series when \(r\lt 0\text{.}\) For instance, if \(r=-1/2\text{,}\) the geometric series is
\begin{equation*} \infser[0] \left(\frac{-1}{2}\right)^n = 1-\frac12+\frac14-\frac18+\frac1{16}-\frac1{32}+\cdots \end{equation*}
Theorem 9.2.7 states that geometric series converge when \(\abs{r}\lt 1\) and gives the sum: \(\ds \infser[0] r^n = \frac1{1-r}\text{.}\) When \(r=-1/2\) as above, we find
\begin{equation*} \infser[0] \left(\frac{-1}{2}\right)^n = \frac1{1-(-1/2)} = \frac 1{3/2} = \frac23\text{.} \end{equation*}
A powerful convergence theorem exists for other alternating series that meet a few conditions.
Figure 9.5.3. Video presentation of Definition 9.5.1 and Theorem 9.5.2
The basic idea behind Theorem 9.5.2 is illustrated in Figure 9.5.4–9.5.5. A positive, decreasing sequence \(\{a_n\}\) is shown along with the partial sums
\begin{equation*} S_n = \sum_{i=1}^n(-1)^{i+1}a_i =a_1-a_2+a_3-a_4+\cdots+(-1)^{n+1}a_n\text{.} \end{equation*}
Because \(\{a_n\}\) is decreasing, the amount by which \(S_n\) bounces up/down decreases. Moreover, the odd terms of \(S_n\) form a decreasing, bounded sequence, while the even terms of \(S_n\) form an increasing, bounded sequence. Since bounded, monotonic sequences converge (see Theorem 9.1.32) and the terms of \(\{a_n\}\) approach 0, one can show the odd and even terms of \(S_n\) converge to the same common limit \(L\text{,}\) the sum of the series.
Scatter plots of a positive, decreasing sequence and its alternating sequence of partial sums.
On one set of coordinate axes, two scatter plots are shown. The first is the plot of a positive, decreasing sequence \(a_n\text{;}\) the second is the plot of the sequence of partial sums for the corresponding alternating sequence \((-1)^na_n\text{.}\)
The scatter plots illustrate why an alternating series converges: as \(n\) increases, the partial sums oscillate back and forth across a horizontal line marked \(L\) (the limiting value). Since \(a_n\) is a decreasing sequence, the oscillations get smaller as \(n\) increases, and the points in the scatter plot for \(S_n\) get closer and closer to the line \(y=L\text{.}\)
Figure 9.5.4. Illustrating convergence with the Alternating Series Test
An illustration of the partial sums in an alternating series, using line segments to demonstrate convergence.
On a set of coordinate axes, a sequence of horizontal line segments is shown. At the top of the image is a line segment indicating in increase from \(0\) to \(a_1\text{.}\) An arrow pointing to the right is at the end of the segment.
Below this segment is a shorter segment with an arrow pointing to the left. The right end of this segment aligns with the right end of the first segment, indicating that we obtain \(a_1-a_2\) by starting at \(a_1\) and then moving to the left by a distance \(a_2\text{.}\)
The third segment is below the second. Its left end aligns with the left end of the second segment, and it points to the right, indicating the act of adding \(a_3\) to the partial sum. The length of this segment is shorter than that of the second, indicating the fact that the sequence \(a_n\) is decreasing.
As we move down, additional segments are drawn, alternating between pointing left and right, and getting shorter with each step. Below the segments is a horizontal axis, on which the values \(S_1, S_2, \ldots\) of the partial sums are shown, as well as the limit \(L\text{.}\) The illustration overall is intended to convey the idea that the line segments will shrink toward the limiting value \(L\) as \(n\) increases.
Figure 9.5.5. A visual representation of adding terms of an alternating series. The arrows represent the length and direction of each term of the sequence.

Example 9.5.6. Applying the Alternating Series Test.

Determine if the Alternating Series Test applies to each of the following series.
  1. \(\displaystyle \ds \infser (-1)^{n+1}\frac1n\)
  2. \(\displaystyle \ds \infser (-1)^n\frac{\ln(n) }{n}\)
  3. \(\displaystyle \ds \infser (-1)^{n+1}\frac{\abs{\sin(n) }}{n^2}\)
Solution 1.
  1. This is the Alternating Harmonic Series as seen previously. The underlying sequence is \(\{a_n\} = \{1/n\}\text{,}\) which is positive, decreasing, and approaches 0 as \(n\to\infty\text{.}\) Therefore we can apply the Alternating Series Test and conclude this series converges. While the test does not state what the series converges to, we will see later that \(\ds \infser (-1)^{n+1}\frac1n=\ln(2)\text{.}\)
  2. The underlying sequence is \(\{a_n\} = \{\ln(n) /n\}\text{.}\) This is positive and approaches 0 as \(n\to\infty\) (use L’Hospital’s Rule). However, the sequence is not decreasing for all \(n\text{.}\) It is straightforward to compute \(a_1=0\text{,}\) \(a_2\approx0.347\text{,}\) \(a_3\approx 0.366\text{,}\) and \(a_4\approx 0.347\text{:}\) the sequence is increasing for at least the first 3 terms. We do not immediately conclude that we cannot apply the Alternating Series Test. Rather, consider the long-term behavior of \(\{a_n\}\text{.}\) Treating \(a_n=a(n)\) as a continuous function of \(n\) defined on \([1,\infty)\text{,}\) we can take its derivative:
    \begin{equation*} a'(n) = \frac{1-\ln(n) }{n^2}\text{.} \end{equation*}
    The derivative is negative for all \(n\geq 3\) (actually, for all \(n \gt e\)), meaning \(a(n)=a_n\) is decreasing on \([3,\infty)\text{.}\) We can apply the Alternating Series Test to the series when we start with \(n=3\) and conclude that \(\ds \sum_{n=3}^\infty(-1)^n\frac{\ln(n) }{n}\) converges; adding the terms with \(n=1\) and \(n=2\) do not change the convergence (i.e., we apply Theorem 9.2.24). The important lesson here is that as before, if a series fails to meet the criteria of the Alternating Series Test on only a finite number of terms, we can still apply the test.
  3. The underlying sequence is \(\{a_n\} = \abs{\sin(n) }/n\text{.}\) This sequence is positive and approaches \(0\) as \(n\to\infty\text{.}\) However, it is not a decreasing sequence; the value of \(\abs{\sin(n) }\) oscillates between \(0\) and \(1\) as \(n\to\infty\text{.}\) We cannot remove a finite number of terms to make \(\{a_n\}\) decreasing, therefore we cannot apply the Alternating Series Test. Keep in mind that this does not mean we conclude the series diverges; in fact, it does converge. We are just unable to conclude this based on Theorem 9.5.2. We will be able to show that this series converges shortly.
Solution 2. Video solution
Key Idea 9.2.20 gives the sum of some important series. Two of these are
\begin{equation*} \infser \frac1{n^2} =\frac{\pi^2}6 \approx 1.64493 \text{ and } \infser \frac{(-1)^{n+1}}{n^2} = \frac{\pi^2}{12}\approx 0.82247\text{.} \end{equation*}
These two series converge to their sums at different rates. To be accurate to two places after the decimal, we need 202 terms of the first series though only 13 of the second. To get 3 places of accuracy, we need 1069 terms of the first series though only 33 of the second. Why is it that the second series converges so much faster than the first?
While there are many factors involved when studying rates of convergence, the alternating structure of an alternating series gives us a powerful tool when approximating the sum of a convergent series.
Figure 9.5.8. Video presentation of Theorem 9.5.7
Part 1 of Theorem 9.5.7 states that the \(n\)th partial sum of a convergent alternating series will be within \(a_{n+1}\) of its total sum. You can see this visually in Figure 9.5.5. Look at the distance between \(S_6\) and \(L\text{.}\) Clearly this distance is less than the length of the arrow corresponding to \(a_7\text{.}\)
Also consider the alternating series we looked at before the statement of the theorem, \(\ds \infser \frac{(-1)^{n+1}}{n^2}\text{.}\) Since \(a_{14} = 1/14^2 \approx 0.0051\text{,}\) we know that \(S_{13}\) is within \(0.0051\) of the total sum.
Moreover, Part 2 of the theorem states that since \(S_{13} \approx 0.8252\) and \(S_{14}\approx 0.8201\text{,}\) we know the sum \(L\) lies between \(0.8201\) and \(0.8252\text{.}\) One use of this is the knowledge that \(S_{14}\) is accurate to two places after the decimal.
Some alternating series converge slowly. In Example 9.5.6 we determined the series \(\ds\infser (-1)^{n+1}\frac{\ln(n) }{n}\) converged. With \(n=1001\text{,}\) we find \(\ln(n) /n \approx 0.0069\text{,}\) meaning that \(S_{1000} \approx 0.1633\) is accurate to one, maybe two, places after the decimal. Since \(S_{1001} \approx 0.1564\text{,}\) we know the sum \(L\) is \(0.1564\leq L\leq0.1633\text{.}\)

Example 9.5.9. Approximating the sum of convergent alternating series.

Approximate the sum of the following series, accurate to within \(0.001\text{.}\)
  1. \(\displaystyle \ds \infser (-1)^{n+1}\frac{1}{n^3}\)
  2. \(\displaystyle \ds \infser (-1)^{n+1}\frac{\ln(n) }{n}\)
Solution 1.
  1. Using Theorem 9.5.7, we want to find \(n\) where \(1/n^3 \leq 0.001\text{.}\) That is, we want to find the the first time a term in the sequence \(a_n\) is smaller than the desired level of error:
    \begin{align*} \frac1{n^3} \amp \leq 0.001=\frac{1}{1000}\\ n^3 \amp \geq 1000\\ n \amp \geq \sqrt[3]{1000}\\ n \amp \geq 10\text{.} \end{align*}
    Let \(L\) be the sum of this series. By Part 1 of the theorem, \(\abs{S_9-L}\lt a_{10} = 1/1000\text{.}\) (We found \(a_{10}=a_{n+1}\lt 0.0001\text{,}\) so \(n=9\)). We can compute \(S_9=0.902116\text{,}\) which our theorem states is within \(0.001\) of the total sum. We can use Part 2 of the theorem to obtain an even more accurate result. As we know the \(10\)th term of the series is \((-1)^n/10^3=-1/1000\text{,}\) we can easily compute \(S_{10} = 0.901116\text{.}\) Part 2 of the theorem states that \(L\) is between \(S_9\) and \(S_{10}\text{,}\) so \(0.901116 \lt L\lt 0.902116\text{.}\)
  2. We want to find \(n\) where \(\ln(n)/n \lt 0.001\text{.}\) We start by solving \(\ln(n)/n = 0.001\) for \(n\text{.}\) This cannot be solved algebraically, so we will use Newton’s Method to approximate a solution. (Note: we can also use a “Brute Force” technique. That is, we can guess and check numerically until we find a solution.) Let \(f(x) = \ln(x)/x-0.001\text{;}\) we want to know where \(f(x) = 0\text{.}\) We make a guess that \(x\) must be “large,” so our initial guess will be \(x_1=1000\text{.}\) Recall how Newton’s Method works: given an approximate solution \(x_n\text{,}\) our next approximation \(x_{n+1}\) is given by
    \begin{equation*} x_{n+1} = x_n - \frac{f(x_n)}{\fp(x_n)}\text{.} \end{equation*}
    We find \(\fp(x) = \big(1-\ln(x)\big)/x^2\text{.}\) This gives
    \begin{align*} x_2 \amp = 1000 - \frac{\ln(1000)/1000-0.001}{\big(1-\ln(1000)\big)/1000^2}\\ \amp = 2000\text{.} \end{align*}
    Using a computer, we find that Newton’s Method seems to converge to a solution \(x=9118.01\) after 8 iterations. Taking the next integer higher, we have \(n=9119\text{,}\) where \(\ln(9119)/9119 =0.000999903\lt 0.001\text{.}\) Again using a computer, we find \(S_{9118} = -0.160369\text{.}\) Part 1 of the theorem states that this is within \(0.001\) of the actual sum \(L\text{.}\) Already knowing the \(9{,}119\)th term, we can compute \(S_{9119} = -0.159369\text{,}\) meaning \(-0.159369 \lt L \lt -0.160369\text{.}\)
Notice how the first series converged quite quickly, where we needed only 10 terms to reach the desired accuracy, whereas the second series took over 9,000 terms.
Solution 2. Video solution
One of the famous results of mathematics is that the Harmonic Series, \(\ds \infser \frac1n\) diverges, yet the Alternating Harmonic Series, \(\ds \infser (-1)^{n+1}\frac1n\text{,}\) converges. The notion that alternating the signs of the terms in a series can make a series converge leads us to the following definitions.

Definition 9.5.10. Absolute and Conditional Convergence.

  1. A series \(\ds \infser a_n\) converges absolutely if \(\ds \infser \abs{a_n}\) converges.
  2. A series \(\ds \infser a_n\) converges conditionally if \(\ds \infser a_n\) converges but \(\ds \infser \abs{a_n}\) diverges.
Thus we say the Alternating Harmonic Series converges conditionally.

Example 9.5.11. Determining absolute and conditional convergence.

Determine if the following series converge absolutely, conditionally, or diverge.
  1. \(\displaystyle \ds \infser (-1)^n\frac{n+3}{n^2+2n+5}\)
  2. \(\displaystyle \ds \infser (-1)^n\frac{n^2+2n+5}{2^n}\)
  3. \(\displaystyle \ds \sum_{n=3}^\infty (-1)^n\frac{3n-3}{5n-10}\)
Solution 1.
  1. We can show the series
    \begin{equation*} \ds \infser \abs{(-1)^n\frac{n+3}{n^2+2n+5}}= \infser \frac{n+3}{n^2+2n+5} \end{equation*}
    diverges using the Limit Comparison Test, comparing with \(1/n\text{.}\) The series \(\ds \infser (-1)^n\frac{n+3}{n^2+2n+5}\) converges using the Alternating Series Test; we conclude it converges conditionally.
  2. We can show the series
    \begin{equation*} \ds \infser \abs{(-1)^n\frac{n^2+2n+5}{2^n}}=\infser \frac{n^2+2n+5}{2^n} \end{equation*}
    converges using the Ratio Test. Therefore we conclude \(\ds \infser (-1)^n\frac{n^2+2n+5}{2^n}\) converges absolutely.
  3. The series
    \begin{equation*} \ds \sum_{n=3}^\infty \abs{(-1)^n\frac{3n-3}{5n-10}} = \sum_{n=3}^\infty \frac{3n-3}{5n-10} \end{equation*}
    diverges using the \(n\)th Term Test, so it does not converge absolutely. The series \(\ds \sum_{n=3}^\infty (-1)^n\frac{3n-3}{5n-10}\) fails the conditions of the Alternating Series Test as \((3n-3)/(5n-10)\) does not approach \(0\) as \(n\to\infty\text{.}\) We can state further that this series diverges; as \(n\to\infty\text{,}\) the series effectively adds and subtracts \(3/5\) over and over. This causes the sequence of partial sums to oscillate and not converge. Therefore the series \(\ds \infser (-1)^n\frac{3n-3}{5n-10}\) diverges.
Solution 2. Video solution
Knowing that a series converges absolutely allows us to make two important statements, given in Theorem 9.5.13 below. The first is that absolute convergence is “stronger” than regular convergence. That is, just because \(\infser a_n\) converges, we cannot conclude that \(\infser \abs{a_n}\) will converge, but knowing a series converges absolutely tells us that \(\infser a_n\) will converge.
One reason this is important is that our convergence tests all require that the underlying sequence of terms be positive. By taking the absolute value of the terms of a series where not all terms are positive, we are often able to apply an appropriate test and determine absolute convergence. This, in turn, determines that the series we are given also converges.
The second statement relates to rearrangements of series. When dealing with a finite set of numbers, the sum of the numbers does not depend on the order which they are added. (So \(1+2+3 = 3+1+2\text{.}\)) One may be surprised to find out that when dealing with an infinite set of numbers, the same statement does not always hold true: some infinite lists of numbers may be rearranged in different orders to achieve different sums. The theorem states that the terms of an absolutely convergent series can be rearranged in any way without affecting the sum.
Figure 9.5.12. Video presentation of Definition 9.5.10 and Theorem 9.5.13

Proof.

We will provide a proof for Part 1 of Absolute Convergence Theorem. Suppose that \(\infser \abs{a_n}\) converges. We start by noting that for any sequence \(a_n\text{,}\) we have
\begin{gather*} -\abs{a_n} \leq a_n \leq \abs{a_n}\\ \end{gather*}
If we add \(\abs{a_n}\) to all three sides:
\begin{gather*} 0\leq a_n +\abs{a_n} \leq 2\abs{a_n}\text{.} \end{gather*}
We are now in a position to apply the Direct Comparison Test to the series \(\infser \left(a_n+\abs{a_n}\right)\text{.}\) Since \(\infser \abs{a_n}\) converges by our supposition, so does \(\infser 2\abs{a_n}\) (the scalar multiple of a convergent series also converges by Theorem 9.2.19). Therefore \(\infser \left(a_n+\abs{a_n}\right)\) converges by the Direct Comparison Test.
Now we turn our attention to \(\infser a_n\text{.}\) We can say
\begin{align*} \infser a_n \amp =\infser \left(a_n+\abs{a_n}-\abs{a_n}\right)\\ \amp =\infser \left(a_n+\abs{a_n}\right)-\infser \abs{a_n}\text{.} \end{align*}
The last line is the difference between two convergent series, which is also convergent by Theorem 9.2.19. Therefore \(\infser a_n\) converges.
In Example 9.5.11, we determined the series in Part 2 converges absolutely. Theorem 9.5.13 tells us the series converges (which we could also determine using the Alternating Series Test).
The theorem states that rearranging the terms of an absolutely convergent series does not affect its sum. This implies that perhaps the sum of a conditionally convergent series can change based on the arrangement of terms. Indeed, it can. The Riemann Rearrangement Theorem (named after Bernhard Riemann) states that any conditionally convergent series can have its terms rearranged so that the sum is any desired value, including \(\infty\text{!}\)
As an example, consider the Alternating Harmonic Series once more. We have stated that
\begin{equation*} \infser (-1)^{n+1}\frac1n = 1-\frac12+\frac13-\frac14+\frac15-\frac16+\frac17\cdots = \ln(2)\text{,} \end{equation*}
Consider the rearrangement where every positive term is followed by two negative terms:
\begin{equation*} 1-\frac12-\frac14+\frac13-\frac16-\frac18+\frac15-\frac1{10}-\frac1{12}\cdots \end{equation*}
(Convince yourself that these are exactly the same numbers as appear in the Alternating Harmonic Series, just in a different order.) Now group some terms and simplify:
\begin{align*} \left(1-\frac12\right)-\frac14+\left(\frac13-\frac16\right)-\frac18+\left(\frac15-\frac1{10}\right)-\frac1{12}+\cdots \amp =\\ \frac12-\frac14+\frac16-\frac18+\frac1{10}-\frac{1}{12}+\cdots \amp =\\ \frac12\left(1-\frac12+\frac13-\frac14+\frac15-\frac16+\cdots\right) \amp = \frac12\ln(2) \text{.} \end{align*}
By rearranging the terms of the series, we have arrived at a different sum! (One could try to argue that the Alternating Harmonic Series does not actually converge to \(\ln(2)\text{,}\) because rearranging the terms of the series shouldn’t change the sum. However, the Alternating Series Test proves this series converges to \(L\text{,}\) for some number \(L\text{,}\) and if the rearrangement does not change the sum, then \(L = L/2\text{,}\) implying \(L=0\text{.}\) But the Alternating Series Approximation Theorem quickly shows that \(L \gt 0\text{.}\) The only conclusion is that the rearrangement did change the sum.) This is an incredible result.
We end here our study of tests to determine convergence. The end of this text contains a table summarizing the tests that one may find useful.
While series are worthy of study in and of themselves, our ultimate goal within calculus is the study of Power Series, which we will consider in the next section. We will use power series to create functions where the output is the result of an infinite summation.

Exercises Exercises

Terms and Concepts

1.
Why is \(\ds\infser \sin(n)\) not an alternating series?
2.
A series \(\ds\infser (-1)^na_n\) converges when \(\{a_n\}\) is ,  and \(\lim\limits_{n\to\infty}a_n\) =.
3.
Give an example of a series where \(\ds \infser[0] a_n\) converges but \(\ds \infser[0] \abs{a_n}\) does not.
4.
The sum of a  convergent series can be changed by rearranging the order of its terms.

Problems

Exercise Group.
In the following exercises, an alternating series \(\ds \sum_{n=i}^\infty a_n\) is given.
  1. Determine if the series converges or diverges.
  2. Determine if \(\ds \infser[0] \abs{a_n}\) converges or diverges.
  3. If \(\ds \infser[0] a_n\) converges, determine if the convergence is conditional or absolute.
5.
\(\ds \infser \frac{(-1)^{n+1}}{n^2}\)
6.
\(\ds \infser \frac{(-1)^{n+1}}{\sqrt{n!}}\)
7.
\(\ds \infser[0] (-1)^{n}\frac{n+5}{3n-5}\)
8.
\(\ds \infser (-1)^{n}\frac{2^n}{n^2}\)
9.
\(\ds \infser[0] (-1)^{n+1}\frac{3n+5}{n^2-3n+1}\)
10.
\(\ds \infser \frac{(-1)^{n}}{\ln(n) +1}\)
11.
\(\ds \sum_{n=2}^\infty (-1)^n\frac{n}{\ln(n) }\)
12.
\(\ds \infser \frac{(-1)^{n+1}}{1+3+5+\cdots+(2n-1) }\)
13.
\(\ds \infser \cos\big(\pi n\big)\)
14.
\(\ds \infser[2] \frac{\sin\big((n+1/2)\pi\big)}{n\ln(n) }\)
15.
\(\ds \infser[0] \left(-\frac23\right)^n\)
16.
\(\ds \infser[0] (-e)^{-n}\)
17.
\(\ds \infser[0] \frac{(-1)^nn^2}{n!}\)
18.
\(\ds \infser[0] (-1)^n2^{-n^2}\)
19.
\(\ds \infser \frac{(-1)^n}{\sqrt{n}}\)
20.
\(\ds \infser \frac{(-1000)^n}{n!}\)
Exercise Group.
Let \(S_n\) be the \(n^{ th }\) partial sum of a series. In the following exercises a convergent alternating series is given and a value of \(n\text{.}\) Compute \(S_n\) and \(S_{n+1}\) and use these values to find bounds on the sum of the series.
21.
\(\ds \infser \frac{(-1)^n}{\ln(n+1)}\text{,}\) \(n=5\)
22.
\(\ds \infser \frac{(-1)^{n+1}}{n^4}\text{,}\) \(n=4\)
23.
\(\ds \infser[0] \frac{(-1)^{n}}{n!}\text{,}\) \(n=6\)
24.
\(\ds \infser[0] \left(-\frac12\right)^n\text{,}\) \(n=9\)
Exercise Group.
In the following exercises, a convergent alternating series is given along with its sum and a value of \(\varepsilon\text{.}\) Use Theorem 9.5.7 to find \(n\) such that the \(n\)th partial sum of the series is within \(\varepsilon\) of the sum of the series.
25.
\(\ds \infser \frac{(-1)^{n+1}}{n^4} = \frac{7\pi^4}{720}\text{,}\) \(\varepsilon = 0.001\)
26.
\(\ds \infser[0] \frac{(-1)^{n}}{n!} = \frac1e\text{,}\) \(\varepsilon = 0.0001\)
27.
\(\ds \infser[0] \frac{(-1)^{n}}{2n+1}=\frac{\pi}4\text{,}\) \(\varepsilon = 0.001\)
28.
\(\ds \infser[0] \frac{(-1)^{n}}{(2n)!}=\cos(1)\text{,}\) \(\varepsilon = 10^{-8}\)