8.7. Sequences and Series#

Tip

Below is the list of topics that are covered in this section:

  • Sequences

  • Series

  • Convergence and Divergence of Series

  • Convergence Tests

  • Power Series

import matplotlib.pyplot as plt
import math

8.7.1. Sequences#

In this module, we define a sequence as an arrangement of an infinite number of numbers written in a specific order.
The common notations used for a sequence are \(\left\lbrace a_n\right\rbrace = \left\lbrace a_n\right\rbrace_{n=1}^{\infty} = \left\lbrace a_1, a_2, \ldots \right\rbrace\), where \(a_i\) denote the \(i^{\text{th}}\) term of the sequence.

Example

Write the first 5 terms of the following sequences:

  • \(\left\lbrace \dfrac{1}{n} \right\rbrace = \dfrac{1}{1}, \dfrac{1}{2}, \dfrac{1}{3}, \dfrac{1}{4}, \dfrac{1}{5}, \ldots\)

  • \(\big\lbrace (-1)^n \big\rbrace_{n=0}^{\infty} = 1, -1, 1, -1, 1, \ldots \)

Some common sequences:

  • Arithmetic sequence: created by adding a certain constant \(d\) to the preceding term.
    Using \(a_1=a\), the sequence is written explicitly: \(\left\lbrace a, a+d, a+2d, a+3d, \ldots \right\rbrace\)
    Or, written recursively: \(\lbrace a_n \rbrace\) where \(a_1=a\) and \(a_{i} = a_{i-1} + d\) for \(i=2,3,\ldots\).

  • Geometric sequence: created by multiplying a certain constant ratio \(r\) to the preciding term.
    Using \(a_1=a\), the sequence is written explicitly: \(\left\lbrace a, ar, ar^2, ar^3, \ldots \right\rbrace\)
    Or, written recursively: \(\lbrace a_n \rbrace\) where \(a_1=a\) and \(a_i = a_{i-1}\cdot r\) for \(i=2,3,\ldots\).

  • Harmonic sequence: created by taking the reciprocal of an arithmetic sequence.
    Using \(a_1=\dfrac{1}{a}\), the sequence is written explicitly: \(\left\lbrace \dfrac{1}{a}, \dfrac{1}{a+d}, \dfrac{1}{a+2d}, \dfrac{1}{a+3d}, \dots \right\rbrace\)

  • Fibonacci sequence: created by taking each term as the sum of the two preceding terms.
    Written recursively: \(\lbrace a_n \rbrace\) where \(a_1=0, a_2=1\), and \(a_i = a_{i-1} + a_{i-2}\) for \(i=3, 4, \ldots\)

Properties of Sequences#

Given a sequence \(\lbrace a_n \rbrace\).

  • \(\lbrace a_n \rbrace\) is increasing if \(a_n < a_{n+1}\) for every \(n\), also called monotonic increasing.

  • \(\lbrace a_n \rbrace\) is decreasing if \(a_n > a_{n+1}\) for every \(n\), also called monotonic decreasing.

  • \(\lbrace a_n \rbrace\) is monotonic nonincreasing (or monotonic nondecreasing) if \(\lbrace a_n \rbrace\) never increase (or decrease).

  • \(\lbrace a_n \rbrace\) is bounded below if there exist a number \(m\) such that \(m\leq a_n\) for every \(n\). Here \(m\) is called a lower bound.

  • \(\lbrace a_n \rbrace\) is bounded above if there exist a number \(M\) such that \(M\geq a_n\) for every \(n\). Here \(M\) is called a upper bound.

  • \(\lbrace a_n \rbrace\) is bounded if it is both bounded below and bounded above.

Example

Determine if the given sequence is monotonic and/or bounded.

  • \(\lbrace a_n \rbrace=\left\lbrace \dfrac{1}{n} \right\rbrace\)
    \(\lbrace a_n \rbrace\) is monotonic (decreasing) as \(\dfrac{1}{n} > \dfrac{1}{n+1}\) for every \(n\).
    \(\lbrace a_n \rbrace\) is bounded since \(0 \leq a_n \leq 1\) for every \(n\). The first term is \(1\), value kept decreasing, but no matter how big \(n\) is, \(\dfrac{1}{n}\) is never negative.

  • \(\lbrace a_n \rbrace=\big\lbrace (-1)^n \big\rbrace_{n=0}^{\infty}\)
    \(\lbrace a_n \rbrace\) is NOT monotonic since the sequence terms alternate between \(1\) and \(-1\) so neither an increasing nor a decreasing sequence.
    \(\lbrace a_n \rbrace\) is bounded since \(-1 \leq a_n \leq 1\) for every \(n\).
    Note that the lower bound and upper bound are not unique. We can also said \(\lbrace a_n \rbrace\) is bounded since \(-35 \leq a_n \leq 708\) for every \(n\).

Below is an example code that plot the first 100 terms of the sequence \(\lbrace a_n\rbrace\).

Hide code cell source
# Ask the user for the sequence
sequence = input("Enter the sequence {a_n}: ")

# Evaluate the sequence for the first 100 terms (can change the range as needed)
terms = []
for n in range(1, 101):
    term = eval(sequence, {'n': n})
    terms.append(term)

# Create the plot with dots
plt.scatter(range(1, 101), terms)
plt.xlabel("n")
plt.ylabel("a_n")
plt.title("Plot of the Sequence {a_n}")
plt.grid(True)

# Display the plot
plt.show()
../../_images/de3d46752af9d9141071515c2063f53ac139de5532f8486a8291671480edd94b.png

Limit of Sequences#

Recall limit notation from the Limit Section.

  • We say that \(\lim\limits_{n\to \infty} a_n = L\) if for every number \(\varepsilon >0\) there is an integer \(N\) such that \(\vert a_n - L\vert <\varepsilon\) whenever \(n>N\).

  • We say that \(\lim\limits_{n\to \infty} a_n = \infty\) if for every number \(M>0\) there is an integer \(N\) such that \(a_n > M\) whenever \(n>N\).

  • We say that \(\lim\limits_{n\to \infty} a_n = -\infty\) if for every number \(M<0\) there is an integer \(N\) such that \(a_n < M\) whenever \(n>N\).

If \(\lim\limits_{n\to \infty} a_n\) exists and is finite, we say \(\lbrace a_n \rbrace\) is convergent.
If \(\lim\limits_{n\to \infty} a_n\) DNE or is infinite, we say \(\lbrace a_n \rbrace\) is divergent. If \(\lim\limits_{n\to \infty} a_n = \pm\infty\) then we say \(\lbrace a_n \rbrace\) diverges to \(\pm \infty\).

Note that these limit definitions are not the same with monotonicity, which is stricter.
The use of an integer \(N\) whenever \(n>N\) emphasizes how limits only consider the end part of a sequence, not necessarily for every \(n\) like in monotonicity.
For example:

  • The sequence \(\lbrace a_n\rbrace = \lbrace 2,5, 60, 700,8000,43,521,1,-70,-500, -2,1,1,1,1,1,1,1,\ldots\rbrace\) (the rest of the terms are all \(1\)).
    \(\lbrace a_n \rbrace\) is not monotonic, but \(\lim\limits_{n\to \infty} a_n = 1\) since at some point, all the term goes to \(1\).

  • The sequence \(\lbrace a_n\rbrace = \lbrace 35,75,42,21,-12,-1,-2,-3,-4,-5,-6,\ldots\rbrace\) (the rest of the terms keep going down by \(1\)).
    \(\lbrace a_n \rbrace\) is not monotonic decreasing, but \(\lim\limits_{n\to \infty} a_n = -\infty\) since at some point the term kept going down.

Properties of limits of sequences follow from the properties of limits, so will not be relisted in this section.

Theorems#

Below are some useful theorems on sequences. Motivated students are encouraged to prove them.

Theorems

Theorem 1: If \(\lbrace a_n \rbrace\) is monotonic and bounded, then \(\lbrace a_n \rbrace\) is convergent.

Theorem 2: If \(\lim\limits_{n\to \infty} \vert a_n\vert = 0\) then \(\lim\limits_{n\to \infty} a_n= 0\).

Theorem 3: The sequence \(\left\lbrace r^n\right\rbrace_{n=0}^{\infty}\) converges to \(0\) if \(-1<r <1\), converges to \(1\) if \(r=1\), and diverges for all other values of \(r\).

Theorem (Squeeze Theorem for Sequences): If \(a_n\leq c_n \leq b_n\) for all \(n>N\) for some integer \(N\) and \(\lim\limits_{n\to \infty} a_n= \lim\limits_{n\to \infty} b_n = L\), then \(\lim\limits_{n\to \infty} c_n=L\).

While the theorems are useful, it is also useful to be able to check the convergence or divergence of a sequence using Python code.
Below is a code that checked the first 100 terms of \(\lbrace a_n \rbrace\) to determine whether \(\lbrace a_n \rbrace\) converges or diverges. It is easy to change the number of terms to check if needed.

Hide code cell source
# Ask the user for the sequence
sequence = input("Enter the sequence a_n: ")

# Evaluate the first 100 terms of the sequence
terms = []
for n in range(1, 101):
    term = eval(sequence, {'n': n, 'math': math})
    terms.append(term)

# Check if the sequence converges or diverges
converges = all(term == terms[0] for term in terms)
if converges:
    print("The sequence converges.")
else:
    print("The sequence diverges.")
The sequence diverges.

8.7.2. Series#

(Infinite) series are an infinite sum of terms \(a_1+a_2+a_3+\ldots\), typically written using sigma notation \(\sum\limits_{i=1}^{\infty} a_i\).

Example

  • \(\sum\limits_{i=1}^{\infty} i = 1+2+3+4+\ldots\)

  • \(\sum\limits_{i=1}^{\infty} 2^i = 2^1+2^2+2^3+2^4+\ldots\)

  • \(\sum\limits_{i=1}^{\infty} \dfrac{3^i}{4i} = \dfrac{3^1}{4\cdot 1}+\dfrac{3^2}{4\cdot 2}+\dfrac{3^3}{4\cdot 3}+\dfrac{3^4}{4\cdot 4}+\ldots\)

The \(i\) in \(\sum\limits_{i=1}^{\infty} a_i\) is called the index (of summation), not to be confused with the notation of imaginary numbers.

  • What letter used to represent the index does not matter: \(\sum\limits_{i=1}^{\infty} a_i=\sum\limits_{k=1}^{\infty} a_k=\sum\limits_{n=1}^{\infty} a_n\), etc.

  • For convenience, index shift can be applied to series: \(\sum\limits_{i=1}^{\infty} a_i = \sum\limits_{i=2}^{\infty} a_{(i-1)} = \sum\limits_{i=0}^{\infty} a_{(i+1)}\), etc.
    With this in mind, it is normal for different resources and math literatures to define series with index started with \(i\neq 1\).

Example

  • \(\sum\limits_{i=1}^{\infty} \dfrac{1}{i^2} = \dfrac{1}{1^2}+\dfrac{1}{2^2}+\dfrac{1}{3^2}+\ldots = \sum\limits_{k=1}^{\infty} \dfrac{1}{k^2}\)

  • \(\sum\limits_{i=1}^{\infty} \dfrac{1}{i^2} = \dfrac{1}{1^2}+\dfrac{1}{2^2}+\dfrac{1}{3^2}+\ldots = \sum\limits_{i=5}^{\infty} \dfrac{1}{(i-4)^2}\)

8.7.3. Convergence and Divergence of Series#

The \(\boldsymbol{n^{\text{th}}}\) partial sums of \(\sum\limits_{i=1}^{\infty} a_i\) is the finite sum \(S_n=\sum\limits_{i=1}^{n} a_i = a_i+a_2+\ldots +a_n\).

The series \(\sum\limits_{i=1}^{\infty} a_i\) is convergent if the sequence of partial sums \(\left\lbrace S_n \right\rbrace_{n=1}^{\infty}\) is convergent to a finite limit.
The series \(\sum\limits_{i=1}^{\infty} a_i\) is divergent if the sequence of partial sums \(\left\lbrace S_n \right\rbrace_{n=1}^{\infty}\) is divergent.

Example

  • \(\sum\limits_{i=1}^{\infty} \dfrac{1}{i^2+i}\) is convergent since \(\lim\limits_{n\to \infty} S_n = \lim\limits_{n\to \infty} \left(\sum\limits_{i=1}^{n} \dfrac{1}{i^2+i}\right)=\lim\limits_{n\to \infty} \left(\sum\limits_{i=1}^{n} \dfrac{1}{i(i+1)}\right) = \lim\limits_{n\to \infty} \left(\sum\limits_{i=1}^{n} \dfrac{1}{i}-\dfrac{1}{i+1}\right) = \lim\limits_{n\to \infty} \left(1-\dfrac{1}{n}\right)=1\).

  • \(\sum\limits_{i=1}^{\infty} i\) is divergent since \(\lim\limits_{n\to \infty} S_n = \lim\limits_{n\to \infty} \left(\sum\limits_{i=1}^{n} i\right)= \lim\limits_{n\to \infty} \left(\dfrac{n(n+1)}{2}\right)=\infty\).

Properties of Convergent Series#

If \(\sum\limits_{i=k}^{\infty} a_i\) and \(\sum\limits_{i=k}^{\infty} b_i\) are both convergent, then

  • \(\sum\limits_{i=k}^{\infty} ca_i = c\sum\limits_{i=k}^{\infty} a_i\) is also convergent for any constant \(c\).

  • \(\sum\limits_{i=k}^{\infty} a_i \pm \sum\limits_{i=k}^{\infty} b_i = \sum\limits_{i=k}^{\infty} \left(a_i \pm b_i\right)\) is also convergent.

Recall distributive property to note that \(\left(\sum\limits_{i=1}^{\infty} a_i\right)\left(\sum\limits_{i=1}^{\infty} b_i\right) \neq \sum\limits_{i=1}^{\infty} \left(a_ib_i\right)\).
In fact, \(\left(\sum\limits_{i=1}^{\infty} a_i\right)\left(\sum\limits_{i=1}^{\infty} b_i\right)= \sum\limits_{i=1}^{\infty} c_i\) where \(c_i=\sum\limits_{k=1}^{i} a_kb_{(i-k)}\).
No conclusions can be drawn about the convergence or multiplication of series.
Moreover, given how complicated the multiplication of infinite series is, people would rather avoid doing it.

Theorems

Theorem: If \(\sum\limits_{n=1}^{\infty} a_n\) converges then \(\lim\limits_{n\to \infty} a_n=0\).

Theorem (Divergence Test): If \(\lim\limits_{n\to \infty} a_n\neq 0\) then \(\sum\limits_{n=1}^{\infty} a_n\) diverges.

Example
The series \(\sum\limits_{i=1}^{\infty} \dfrac{3i^2+5}{7i-i^2}\) diverges since \(\lim\limits_{n\to \infty} \dfrac{3n^2+5}{7n-n^2}=-3 \neq 0\).

Geometric Series#

A geometric series is a series that can be written in the form \(\sum\limits_{i=1}^{\infty} ar^{i-1}\), or, with index shift, \(\sum\limits_{i=0}^{\infty} ar^{i}\).

The \(n^{\text{th}}\) partial sum \(S_n\) of a geometric series can be found as follows:

\[\begin{align*} S_n - rS_n &= \left(a + ar + ar^2 + ar^3 + \ldots + ar^{n-1}\right)-\left(ar + ar^2 + ar^3 + \ldots + ar^{n-1} + ar^n\right) \\ (1-r)S_n &= a- ar^n \\ S_n &= \dfrac{a\left(1-r^n\right)}{1-r} \end{align*}\]

Taking the limit of the sequence of partial sums:

\[\begin{align*} \lim\limits_{n\to \infty} S_n &= \lim\limits_{n\to \infty} \dfrac{a\left(1-r^n\right)}{1-r} \\ &= \lim\limits_{n\to \infty} \left(\dfrac{a}{1-r} - \dfrac{ar^n}{1-r} \right) \\ &= \lim\limits_{n\to \infty} \dfrac{a}{1-r} - \lim\limits_{n\to \infty} \dfrac{ar^n}{1-r}\\ &= \dfrac{a}{1-r} - \dfrac{a}{1-r}\lim\limits_{n\to \infty} r^n \end{align*}\]

The only term depending on \(n\) is \(r^n\), which only provides finite answers \(-1<r \leq 1\).
However, \(r=1\) gives division by zero on the \(\dfrac{a}{1-r}\), and the limit only exists (and equals zero) when \(-1<r<1\) (or, \(|r|<1\)).
Thus, the limit of the partial sums, as well as the sum of the geometric series, is \(\sum\limits_{i=1}^{\infty} ar^{i-1}=\lim\limits_{n\to \infty} S_n = \dfrac{a}{1-r} - \dfrac{a}{1-r} \cdot 0 = \dfrac{a}{1-r}\).

Example

Determine if \(\sum\limits_{n=1}^{\infty} \dfrac{2^{n+2}}{3^{n-1}}\) converge or diverge. If it converges, give the value of the series.
The convergence of this series can be seen by rewriting it in geometric series form and calculating:

\[\begin{equation*} \sum\limits_{n=1}^{\infty} \dfrac{2^{n+2}}{3^{n-1}} =\sum\limits_{n=1}^{\infty} \dfrac{2^3\cdot 2^{n-1}}{3^{n-1}} = \sum\limits_{n=1}^{\infty} 8\left(\dfrac{2}{3}\right)^{n-1} = \dfrac{8}{1-\frac{2}{3}} = \dfrac{8}{\frac{1}{3}}=24. \end{equation*}\]

Harmonic Series#

A harmonic series is the series \(\sum\limits_{i=1}^{\infty} \dfrac{1}{i}\).
Remember that if \(\sum\limits_{n=1}^{\infty} a_n\) converges then \(\lim\limits_{n\to \infty} a_n=0\), but not the other way around.
While \(\lim\limits_{n\to \infty} \dfrac{1}{n}=0\), the Harmonic series is divergent. This will be shown with the Integral Test below.


8.7.4. Convergence Tests#

Integral Test#

If \(f(x)\) is a continuous, positive, and decreasing function on the interval \([k,\infty)\) and that \(f(i)=a_i\), then,

  • if \(\displaystyle\int_k^{\infty} f(x) \,dx\) is convergent then \(\sum\limits_{i=k}^{\infty} a_i\) is also convergent.

  • if \(\displaystyle\int_k^{\infty} f(x) \,dx\) is divergent then \(\sum\limits_{i=k}^{\infty} a_i\) is also divergent.

Example: Harmonic Series

Note that \(f(x)=\dfrac{1}{x}\) is a continuous, positive and decreasing function on \([1,\infty)\).
Since \(\displaystyle\int_1^{\infty} \dfrac{1}{x} \,dx=\infty\) and hence is divergent, then by the Integral test, the Harmonic series \(\sum\limits_{i=1}^{\infty} \dfrac{1}{i}\) also divergent.

The \(p\)-series Test#

If \(k>0\) then then \(\sum\limits_{i=k}^{\infty} \dfrac{1}{i^p}\) converges if \(p>1\) and diverges if \(p\leq 1\).

Example

\(\sum\limits_{i=2}^{\infty} \dfrac{1}{i^5}\) converges as it is a \(p\)-series with \(p=5>1\), while \(\sum\limits_{i=2}^{\infty} \dfrac{1}{\sqrt{i}}\) diverges as it is a \(p\)-series with \(p=0.5<1\).

Comparison Test#

Given two series \(\sum a_i\) and \(\sum b_i\) with nonnegative \(a_i\) and \(b_i\) for all \(i\). If \(a_i\leq b_i\) for all \(i\), then:

  • If \(\sum b_i\) is convergent then \(\sum a_i\) is also convergent

  • If \(\sum a_i\) is divergent then \(\sum b_i\) is also divergent

Example

  • \(\sum\limits_{i=1}^{\infty} \dfrac{i^3+2}{i^7-5}\) is convergent, because \(\dfrac{i^3+2}{i^7-5} > \dfrac{i^3+2}{i^7} > \dfrac{i^3}{i^7}=\dfrac{1}{i^4}\) and \(\sum\limits_{i=1}^{\infty} \dfrac{1}{i^4}\) is convergent as it is a \(p\)-series with \(p=4>1\).

  • \(\sum\limits_{i=1}^{\infty} \dfrac{i}{i^2+7}\) is divergent, because \(\dfrac{i}{i^2+7} <\dfrac{i}{i^2} =\dfrac{1}{i}\) and \(\sum\limits_{i=1}^{\infty} \dfrac{1}{i}\) is divergent as it is a \(p\)-series with \(p=1\).

Limit Comparison Test#

Given two series \(\sum a_i\) and \(\sum b_i\) with \(a_i\geq 0\) and \(b_i>0\) for all \(i\). Define \(c=\lim\limits_{i\to\infty} \dfrac{a_i}{b_i}\).
If \(0<c<\infty\), then either both \(\sum a_i\) and \(\sum b_i\) converge or both \(\sum a_i\) and \(\sum b_i\) diverge.

Limit Comparison Test (LCT) is similar to the Comparison Test (CT) in the sense that we want to compare the series with a series that we know or easily recognize as converging or diverging.

Example

Is \(\sum\limits_{i=1}^{\infty} \dfrac{1}{i+2^i}\) convergent or divergent?
Take \(\dfrac{1}{i+2^i}\) as \(b_i\) and \(\dfrac{1}{2^i}\) as \(a_i\) so that \(c=\lim\limits_{i\to\infty} \dfrac{\frac{1}{2^i}}{\frac{1}{i+2^i}}=\lim\limits_{i\to\infty} \dfrac{i+2^i}{2^i} = \lim\limits_{i\to\infty} \dfrac{i}{2^i} + \lim\limits_{i\to\infty} 1 = \lim\limits_{i\to\infty} \dfrac{1}{2^i \ln(2)} +1 = 1\).
As \(c=1\) is finite positive and \(\sum\limits_{i=1}^{\infty} \dfrac{1}{2^i}\) is convergent for being a geometric series with \(|r|=\Bigg\vert \dfrac{1}{2} \Bigg\vert <1\), then by LCT, \(\sum\limits_{i=1}^{\infty} \dfrac{1}{i+2^i}\) is also convergent.

Alternating Series Test#

Suppose \(\sum a_i\) is a series with \(a_i=(-1)^ib_i\) or \(a_i=(-1)^{i+1}b_i\) where \(b_i\geq 0\) for all \(i\).
If \(\lim\limits_{i\to\infty} b_i=0\) and \(\lbrace b_i \rbrace\) is a decreasing sequence, then \(\sum a_i\) is convergent.

Example

Determine if \(\sum\limits_{i=3}^{\infty} \dfrac{\sin(i\pi)}{\sqrt{i}}\) is convergent or divergent.
Note that \(\sin(i\pi)=(-1)^i\) hence we can rewrite the series into \(\sum\limits_{i=3}^{\infty} \dfrac{(-1)^i}{\sqrt{i}}\), which is in the alternating form with \(b_i=\dfrac{1}{\sqrt{i}}\).
Since \(\lim\limits_{i\to\infty} b_i=\lim\limits_{i\to\infty} \dfrac{1}{\sqrt{i}}=0\) and \(\dfrac{1}{\sqrt{i}}>\dfrac{1}{\sqrt{i+1}}\) for all \(i\geq 3\), then the Alternating Series Test conditions are satisfied and hence \(\sum\limits_{i=3}^{\infty} \dfrac{\sin(i\pi)}{\sqrt{i}}\) is convergent.

Absolute and Conditional Convergence#

The series \(\sum\limits_{i=1}^{\infty} a_i\) is absolutely convergent if \(\sum\limits_{i=1}^{\infty} a_i\) converges and \(\sum\limits_{n=i}^{\infty} |a_i|\) converges.
The series \(\sum\limits_{i=1}^{\infty} a_i\) is conditionally convergent if \(\sum\limits_{i=1}^{\infty} a_i\) converges but \(\sum\limits_{n=i}^{\infty} |a_i|\) diverges.

It immediately follows that absolute convergence implies convergence, but not vice versa.

Example

\(\sum\limits_{i=1}^{\infty} \dfrac{(-1)^n}{n}\) is conditionally convergent:

  • \(\sum\limits_{i=1}^{\infty} \dfrac{(-1)^n}{n}\) is convergent by the Alternating Series Test

  • \(\sum\limits_{i=1}^{\infty} \Bigg\vert \dfrac{(-1)^n}{n}\Bigg\vert = \sum\limits_{i=1}^{\infty} \dfrac{1}{n}\) since it’s a Harmonic series (by the Integral Test).

Ratio Test#

Given the series \(\sum a_i\). Define \(L=\lim\limits_{i\to \infty} \Bigg\vert \dfrac{a_{i+1}}{a_i} \Bigg\vert=\lim\limits_{i\to \infty} \Bigg\vert a_{i+1}\cdot\dfrac{1}{a_i} \Bigg\vert\).

  • If \(L<1\) then the series is absolutely convergent, and hence convergent

  • If \(L>1\) then the series is divergent

  • If \(L=1\) then the test is inconclusive

Example

  • \(\sum\limits_{i=1}^{\infty} \dfrac{i^2}{(2i)!}\) is absolutely convergent since

\[\begin{align*} L=\lim\limits_{i\to \infty} \Bigg\vert \dfrac{(i+1)^2}{(2(i+1))!} \cdot \dfrac{(2i)!}{i^2} \Bigg\vert &=\lim\limits_{i\to \infty} \Bigg\vert \dfrac{(i+1)^2(2i)!}{i^2(2i+2)!} \Bigg\vert \\ &=\lim\limits_{i\to \infty} \dfrac{(i+1)^2(2i)!}{i^2(2i+2)(2i+1)(2i!)}\\ &=\lim\limits_{i\to \infty} \dfrac{(i+1)^2}{i^2(2i+2)(2i+1)} =0<1. \end{align*}\]
  • \(\sum\limits_{i=1}^{\infty} \dfrac{i!}{2^i}\) is divergent since \(L=\lim\limits_{i\to \infty} \Bigg\vert \dfrac{(i+1)!}{2^{i+1}} \cdot \dfrac{2^i}{i!} \Bigg\vert = \lim\limits_{i\to \infty} \dfrac{i+1}{2}=\infty>1\).

  • Ratio Test fails for determining convergence of \(\sum\limits_{i=1}^{\infty} \dfrac{1}{i^2}\) since \(L=\lim\limits_{i\to \infty} \Bigg\vert \dfrac{(i+1)^2}{i^2} \Bigg\vert =\lim\limits_{i\to \infty} \dfrac{i^2+2i+1}{i^2} =\lim\limits_{i\to \infty} 1+\dfrac{2}{i}+\dfrac{1}{i^2}=1\).
    However, we knew from \(p\)-test that \(\sum\limits_{i=1}^{\infty} \dfrac{1}{i^2}\) is convergent.

Root Test#

Given the series \(\sum a_i\). Define \(L=\lim\limits_{i\to \infty} \sqrt[i]{\vert a_i \vert} =\lim\limits_{i\to \infty} \vert a_i \vert^{1/i} \).

  • If \(L<1\) then the series is absolutely convergent, and hence convergent

  • If \(L>1\) then the series is divergent

  • If \(L=1\) then the series is inconclusive

In using the Root Test, we often use the fact that \(\lim\limits_{n\to\infty} n^{1/n}=1\).

Example

  • \(\sum\limits_{i=1}^{\infty} \left(\dfrac{3-4i^2}{5i^2+6}\right)^i\) is absolutely convergent since \(L=\lim\limits_{i\to \infty} \Bigg\vert \left(\dfrac{3-4i^2}{5i^2+6}\right)^i \Bigg\vert^{\frac{1}{i}}= \lim\limits_{i\to \infty} \Bigg\vert \dfrac{3-4i^2}{5i^2+6}\Bigg\vert =\Bigg\vert \dfrac{-4}{5} \Bigg\vert =\dfrac{4}{5}<1\).

  • \(\sum\limits_{i=1}^{\infty} \dfrac{2^i}{i}\) is divergent since \(L=\lim\limits_{i\to \infty} \Bigg\vert \dfrac{2^i}{i} \Bigg\vert^{\frac{1}{i}} = \lim\limits_{i\to \infty} \dfrac{2}{i^{1/i}}=\dfrac{2}{1}>1\).

  • The Root Test fails for determining convergence of \(\sum\limits_{i=1}^{\infty} \dfrac{1}{i}\) since \(L=\lim\limits_{i\to \infty} \Bigg\vert \dfrac{1}{i} \Bigg\vert^{\frac{1}{i}} =\lim\limits_{i\to \infty} \dfrac{1}{i^{1/i}} =\dfrac{1}{1} = 1\).
    However, we already know that this Harmonic series is divergent.

Convergence Test with Python#

While multiple tests can be used to manually determine the convergence of a series with steps that can become complicated, in Python, testing the convergence of a series is built in.
Below is a code that ask for \(a_n\) and return the convergence of \(\sum\limits_{n=1}^{\infty}\). The lower bound \(n=1\) can be changed as needed.

Hide code cell source
# Ask the user for the sequence
sequence = input("Enter the sequence a_n: ")

# Define the symbol n
n = sp.Symbol('n')

# Define the series sum(a_n) from n=1 to infinity
series = sp.Sum(eval(sequence), (n, 1, sp.oo))

# Check if the series is convergent or divergent
if series.is_convergent():
    print("The series is convergent.")
else:
    print("The series is divergent.")
The series is convergent.

8.7.5. Power Series#

A power series (about \(\boldsymbol{a}\)) is a series that can be written in the form \(\sum\limits_{i=0}^{\infty} c_i(x-a)^i\) where \(a\) and \(c_i\) are constants. The \(c_i\)’s are called the coefficient of the power series.

Since power series are a function of \(x\), the convergence of the series depends on the values of \(x\).
The radius of convergence of a power series is the number \(R\) such that the series will converge for \(|x-a|<R\) and diverge for \(|x-a|>R\). The series may or may not converge if \(|x-a|=R\).
The interval of convergence is the interval containing all values of \(x\) in which a power series converges, hence it’s the interval \((a-R,a+R)\) possibly combined with the endpoint \(a-R\) and/or \(a+R\).

Example

Determine the radius and interval of convergence for \(\sum\limits_{i=0}^{\infty} \dfrac{2^i(x-2)^i}{i}\).
Using Ratio Test: \(L=\lim\limits_{i\to\infty} \Bigg\vert \dfrac{2^{i+1}(x-2)^{i+1}}{i+1} \cdot \dfrac{i}{2^i(x-2)^i} \Bigg\vert=\lim\limits_{i\to\infty} \Bigg\vert \dfrac{2 i (x-2)}{i+1} \Bigg\vert = 2|x-2| \lim\limits_{i\to\infty} \dfrac{i}{i+1}= 2|x-2|\).
By Ratio Test, \(\sum\limits_{i=0}^{\infty} \dfrac{2^i(x-2)^i}{i}\) converges when \(2|x-2|<1 \Rightarrow |x-2|<0.5\).
Hence the radius of convergence is 0.5.

For the interval of convergence, solving for \(x\) from \(|x-2|<0.5 \Rightarrow 1.5<x<2.5\), so we are left to check for the endpoints:

  • at \(x=1.5\), the sum is \(\sum\limits_{i=0}^{\infty} \dfrac{2^i(1.5-2)^i}{i} = \sum\limits_{i=0}^{\infty} \dfrac{2^i}{i}\left(\dfrac{-1}{2}\right)^i = \sum\limits_{i=0}^{\infty} \dfrac{(-1)^i}{i}\), which converges by the Alternating Series Test.

  • at \(x=2.5\), the sum is \(\sum\limits_{i=0}^{\infty} \dfrac{2^i(2.5-2)^i}{i} = \sum\limits_{i=0}^{\infty} \dfrac{2^i}{i}\left(\dfrac{1}{2}\right)^i = \sum\limits_{i=0}^{\infty} \dfrac{1}{i}\), which diverges since it is a Harmonic series.

Thus, the interval of convergence is \(\boldsymbol{1.5\leq x<2.5}\).


8.7.6. Exercises#

Exercises

  1. List the first 5 terms of each given sequence, then determine whether each sequence is monotonic and/or bounded.

    • \(\left\lbrace \dfrac{n}{n+1} \right\rbrace_{n=1}^{\infty}\)

    • \(\left\lbrace \dfrac{2n^2-1}{n} \right\rbrace_{n=2}^{\infty}\)

  2. Determine whether the following sequences converge or diverge. Determine the limit if it exists.

    • \(\left\lbrace \dfrac{(-1)^n\cdot n^3}{5-n^4} \right\rbrace_{n=0}^{\infty}\)

    • \(\left\lbrace \dfrac{e^{3n}}{2+e^n} \right\rbrace_{n=1}^{\infty}\)

    • \(\left\lbrace \dfrac{\ln(n+6)}{\ln(3+3n)} \right\rbrace_{n=1}^{\infty}\)

  3. Index shift and rename exercise:

    • Write \(\sum\limits_{i=1}^{\infty} \dfrac{5-i}{i^3}\) as a series that starts at \(n=3\).

    • Write \(\sum\limits_{i=5}^{\infty} (-1)^{i+2}2^i\) as a series that starts at \(k=1\).

  4. Determine the convergence of the following series:

    • \(\sum\limits_{i=1}^{\infty} \dfrac{1}{i^{\pi/4}}\)

    • \(\sum\limits_{i=1}^{\infty} \dfrac{i-1}{\sqrt{i^4+2}}\)

    • \(\sum\limits_{i=1}^{\infty} \dfrac{(-1)^{i+2}}{i^3+2i+2}\)

  5. Determine the interval and radius of convergence of the following series:

    • \(\sum\limits_{i=1}^{\infty} \dfrac{4^{2i+1}}{5^{1+i}} (x+3)^i\)

    • \(\sum\limits_{i=1}^{\infty} \dfrac{(i+1)}{(2i+1)!} (x-2)^i\)