TExcelTAD
Home › Calculus in Depth › Strategy for Testing Series

Strategy for Testing Series

You now have seven or eight convergence tests. The hard part is choosing one: this lesson turns them into a decision procedure, works through mixed examples, and shows where a computer helps and where it misleads.

The tests themselves are proved in The Integral Test, The Comparison Tests, Alternating Series and Absolute Convergence and the Ratio and Root Tests. A quick summary table is in Convergence Tests.

Classify by the form of the term

Look at ana_n before computing anything. The shape of the formula usually names the test.

What ana_n looks like First test to try Why
ana_n clearly does not go to 0 Test for Divergence one limit settles it
1/np1/n^p, or arn−1a r^{n-1} pp-series / geometric known answers
rational or algebraic in nn (powers and roots) limit comparison with 1/ndeg bottom−deg top1/n^{\text{deg bottom} - \text{deg top}} only leading terms matter
bounded factor times a known series (sin⁡n\sin n, cos⁡n\cos n, arctan⁡n\arctan n) direct comparison bound the factor by its maximum
(−1)nbn(-1)^n b_n absolute convergence first, then AST absolute is the stronger conclusion
factorials, or knk^n with polynomials ratio test ratios of factorials simplify
(something)n(\text{something})^n as a whole root test the nn-th root removes the power
f(n)f(n) with an easy antiderivative, e.g. 1nln⁡n\frac{1}{n \ln n} integral test logs defeat comparisons

The decision procedure

text
1. Does aₙ → 0?  If not (or the limit does not exist): DIVERGES.
2. Is it a geometric or p-series in disguise?  Read off the answer.
3. Positive terms?
     algebraic in n      → limit comparison with the leading-term ratio
     factorials / cⁿ     → ratio test
     whole n-th power    → root test
     f(n), f integrable  → integral test (check positive, decreasing)
4. Mixed signs?
     test ∑|aₙ| with step 3; if it converges: ABSOLUTELY CONVERGENT
     otherwise, if alternating with |aₙ| ↓ 0: CONDITIONALLY CONVERGENT

Two traps to remember:

  • Step 1 only proves divergence. an→0a_n \to 0 is necessary, never sufficient (harmonic series).
  • Ratio and root tests are useless on algebraic terms: they always return L=1L = 1 there. Do not waste time on them for ∑n+1n3+2\sum \frac{n + 1}{n^3 + 2}.

Worked mixed examples

a) ∑2n2+1n4−n+3leading terms 2n2/n4=2/n2→LCT with 1/n2: L=2→convergesb) ∑n3e−nratio (n+1n)3⋅e−1→1/e<1→convergesc) ∑(1−2n)n2root (1−2n)n→e−2<1→convergesd) ∑1n(ln⁡n)2, n≥2∫dxxln⁡2x=−1ln⁡x, finite on [2,∞)→convergese) ∑(−1)nn+1n2∣an∣≈1/n diverges; ∣an∣↓0→conditionallyf) ∑cos⁡(1/n)an→cos⁡0=1→divergesg) ∑sin⁡(1/n)sin⁡(1/n)1/n→1, LCT with 1/n→diverges\begin{aligned} &\text{a) } \sum \frac{2n^2 + 1}{n^4 - n + 3} && \text{leading terms } 2n^2/n^4 = 2/n^2 \to \text{LCT with } 1/n^2{:}\ L = 2 && \to \text{converges} \\ &\text{b) } \sum n^3 e^{-n} && \text{ratio } \left(\tfrac{n+1}{n}\right)^3 \cdot e^{-1} \to 1/e < 1 && \to \text{converges} \\ &\text{c) } \sum \left(1 - \tfrac{2}{n}\right)^{n^2} && \text{root } \left(1 - \tfrac{2}{n}\right)^n \to e^{-2} < 1 && \to \text{converges} \\ &\text{d) } \sum \frac{1}{n (\ln n)^2},\ n \ge 2 && \int \frac{dx}{x \ln^2 x} = -\frac{1}{\ln x}, \text{ finite on } [2, \infty) && \to \text{converges} \\ &\text{e) } \sum (-1)^n \frac{n + 1}{n^2} && \lvert a_n \rvert \approx 1/n \text{ diverges; } \lvert a_n \rvert \downarrow 0 && \to \text{conditionally} \\ &\text{f) } \sum \cos(1/n) && a_n \to \cos 0 = 1 && \to \text{diverges} \\ &\text{g) } \sum \sin(1/n) && \frac{\sin(1/n)}{1/n} \to 1, \text{ LCT with } 1/n && \to \text{diverges} \end{aligned}

Example (g) shows why "an→0a_n \to 0" proves nothing: sin⁡(1/n)→0\sin(1/n) \to 0, but it is about as large as 1/n1/n.

A computer as an assistant

SymPy can decide many textbook series, and partial sums can suggest an answer. Neither replaces the argument.

python · try it yourself
import sympy as sp

n = sp.symbols("n", integer=True, positive=True)
cases = {
    "(2n²+1)/(n⁴−n+3)": (2 * n**2 + 1) / (n**4 - n + 3),
    "n³ e^(−n)":         n**3 * sp.exp(-n),
    "(−1)ⁿ (n+1)/n²":    (-1) ** n * (n + 1) / n**2,
    "sin(1/n)":          sp.sin(1 / n),
    "1/(n ln(n)²), n≥2": None,
}
for name, a in cases.items():
    if a is None:
        a, lo = 1 / (n * sp.log(n) ** 2), 2
    else:
        lo = 1
    print(f"{name:20s} converges? {sp.Sum(a, (n, lo, sp.oo)).is_convergent()}")
(2n²+1)/(n⁴−n+3)     converges? True
n³ e^(−n)            converges? True
(−1)ⁿ (n+1)/n²       converges? True
sin(1/n)             converges? False
1/(n ln(n)²), n≥2    converges? True

is_convergent answers plain convergence: the third series gets True even though it is only conditionally convergent, so the absolute-value check is still yours to do.

Partial sums are much less trustworthy. The series ∑1nln⁡n\sum \frac{1}{n \ln n} diverges, but it grows like ln⁡(ln⁡N)\ln(\ln N): after a billion terms its partial sum is still below 4.

python · try it yourself
import math

def partial(N):
    s = 0.0
    for k in range(2, N + 1):
        s += 1 / (k * math.log(k))
    return s

for N in (10, 1_000, 100_000):
    print(f"N={N:>7,}  S_N={partial(N):.4f}  ln(ln N)={math.log(math.log(N)):.4f}")
print(f"predicted at N=10⁹: about {partial(100_000) + math.log(math.log(1e9)) - math.log(math.log(1e5)):.2f}")
N=     10  S_N=1.6499  ln(ln N)=0.8340
N=  1,000  S_N=2.7274  ln(ln N)=1.9326
N=100,000  S_N=3.2381  ln(ln N)=2.4435
predicted at N=10⁹: about 3.83

A table of partial sums would look like it is levelling off. The integral test (∫dxxln⁡x=ln⁡ln⁡x→∞\int \frac{dx}{x \ln x} = \ln \ln x \to \infty) shows it is not.

Tip: Convergence-test results feed straight into numerical code. If a library routine evaluates a series by adding terms until they are small, it is implicitly assuming convergence. For series like ∑1nln⁡n\sum \frac{1}{n \ln n} the stopping rule "term<10−12\text{term} < 10^{-12}" would stop at a finite, meaningless value.

In software

  • Stopping rules. while abs(term) > tol is safe only when you can bound the tail: geometric tails (ratio test), integral bounds, or the alternating bound. Otherwise the loop either never stops or stops at a wrong answer.
  • Complexity sums. Recognising ∑1/k\sum 1/k (harmonic, ≈ln⁡n\approx \ln n), ∑k/2k\sum k/2^k (converges to 2) or ∑1/k2\sum 1/k^2 (converges) is exactly the step that gives O(nlog⁡n)O(n \log n) quicksort, O(n)O(n) heap construction and O(1)O(1) amortised doubling arrays in Time Complexity.
  • Symbolic tools such as SymPy's is_convergent encode the same procedure; when they return None or time out, you are back to choosing the test yourself.

Exercises

Exercise 1: Name the test

For each series, name the most efficient test and give the verdict: a) ∑n/en\sum n/e^n, b) ∑n+2n2n\sum \frac{n + 2}{n^2 \sqrt{n}}, c) ∑(2n5n+1)n\sum \left(\frac{2n}{5n + 1}\right)^n.

Answer

a) ratio test, converges (L=1/eL = 1/e). b) limit comparison with 1/n3/21/n^{3/2}, converges. c) root test, converges (L=2/5L = 2/5).

Solution
a) n+1en+1⋅enn=n+1ne→1e<1b) n+2n5/2≈nn5/2=1n3/2;ratio with 1/n3/2 is n+2n→1;p=3/2>1c) ∣an∣1/n=2n5n+1→25<1\begin{aligned} &\text{a) } \frac{n+1}{e^{n+1}} \cdot \frac{e^n}{n} = \frac{n+1}{ne} \to \frac{1}{e} < 1 \\ &\text{b) } \frac{n + 2}{n^{5/2}} \approx \frac{n}{n^{5/2}} = \frac{1}{n^{3/2}}; \quad \text{ratio with } 1/n^{3/2} \text{ is } \frac{n+2}{n} \to 1; \quad p = 3/2 > 1 \\ &\text{c) } \lvert a_n \rvert^{1/n} = \frac{2n}{5n + 1} \to \frac{2}{5} < 1 \end{aligned}

Exercise 2: Sign matters

Classify ∑(−1)n−1nn2+1\sum (-1)^{n-1} \frac{n}{n^2 + 1} and ∑(−1)n−1nn3+1\sum (-1)^{n-1} \frac{n}{n^3 + 1}.

Answer

The first is conditionally convergent; the second is absolutely convergent.

Solution
First: ∣an∣≈1/n, LCT⇒∑∣an∣ diverges.f(x)=xx2+1 has f′=1−x2(x2+1)2<0 for x>1,First: and an→0⇒AST gives convergence⇒conditional.Second: ∣an∣≤n/n3=1/n2, ∑1/n2 converges⇒absolute.\begin{aligned} &\text{First: } \lvert a_n \rvert \approx 1/n, \text{ LCT} \Rightarrow \textstyle\sum \lvert a_n \rvert \text{ diverges.} \quad f(x) = \frac{x}{x^2+1} \text{ has } f' = \frac{1 - x^2}{(x^2+1)^2} < 0 \text{ for } x > 1, \\ &\phantom{\text{First: }} \text{and } a_n \to 0 \Rightarrow \text{AST gives convergence} \Rightarrow \text{conditional.} \\ &\text{Second: } \lvert a_n \rvert \le n/n^3 = 1/n^2,\ \textstyle\sum 1/n^2 \text{ converges} \Rightarrow \text{absolute.} \end{aligned}

Exercise 3: A log in the exponent

Decide ∑n=2∞1(ln⁡n)ln⁡n\sum_{n=2}^{\infty} \frac{1}{(\ln n)^{\ln n}}. (Hint: rewrite (ln⁡n)ln⁡n(\ln n)^{\ln n} as nln⁡ln⁡nn^{\ln \ln n}.)

Answer

It converges.

Solution
(ln⁡n)ln⁡n=eln⁡n⋅ln⁡ln⁡n=nln⁡ln⁡n.For n≥ee2≈1618, ln⁡ln⁡n≥2, so an≤1/n2.Comparison with ∑1/n2 (dropping finitely many terms)⇒converges.\begin{aligned} &(\ln n)^{\ln n} = e^{\ln n \cdot \ln \ln n} = n^{\ln \ln n}. \\ &\text{For } n \ge e^{e^2} \approx 1618,\ \ln \ln n \ge 2, \text{ so } a_n \le 1/n^2. \quad \text{Comparison with } \textstyle\sum 1/n^2 \text{ (dropping finitely many terms)} \Rightarrow \text{converges.} \end{aligned}

Exercise 4: Write a classifier

Write first_test(expr) that inspects a SymPy expression and returns "ratio" if it contains a factorial, "root" if it is a power whose exponent contains nn, and "limit comparison" otherwise. Try it on n!/3nn!/3^n, (nn+1)n2\left(\frac{n}{n+1}\right)^{n^2} and n+1n3+2\frac{n+1}{n^3+2}.

Answer

ratio, root, limit comparison.

Solution

expr.has(sp.factorial) detects a factorial; isinstance(expr, sp.Pow) and expr.exp.has(n) detects an nn-dependent exponent.

python · try it yourself
import sympy as sp

n = sp.symbols("n", integer=True, positive=True)

def first_test(expr):
    if expr.has(sp.factorial):
        return "ratio"
    if isinstance(expr, sp.Pow) and expr.exp.has(n):
        return "root"
    return "limit comparison"

for e in (sp.factorial(n) / 3**n, (n / (n + 1)) ** (n**2), (n + 1) / (n**3 + 2)):
    print(f"{str(e):22s} -> {first_test(e)}")
factorial(n)/3**n      -> ratio
(n/(n + 1))**(n**2)    -> root
(n + 1)/(n**3 + 2)     -> limit comparison

SymPy prints expressions in Python syntax: factorial(n)/3**n is n!/3nn!/3^n.

Test yourself

Which test should you NOT bother with for ∑3n+1n3−2\sum \frac{3n + 1}{n^3 - 2}?

  1. Limit comparison with 1/n21/n^2
  2. Direct comparison
  3. Ratio test
  4. Test for Divergence

∑sin⁡(1/n)\sum \sin(1/n): an→0a_n \to 0. What is the verdict?

  1. Converges, because the terms go to 0
  2. Diverges, by limit comparison with 1/n1/n
  3. Converges absolutely
  4. Cannot be decided

Partial sums of ∑1nln⁡n\sum \frac{1}{n \ln n} barely change after a million terms. What does that show?

  1. Nothing: it diverges like ln⁡ln⁡N\ln \ln N
  2. It converges to about 3
  3. It converges conditionally
  4. The terms do not go to 0