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 before computing anything. The shape of the formula usually names the test.
| What looks like | First test to try | Why |
|---|---|---|
| clearly does not go to 0 | Test for Divergence | one limit settles it |
| , or | -series / geometric | known answers |
| rational or algebraic in (powers and roots) | limit comparison with | only leading terms matter |
| bounded factor times a known series (, , ) | direct comparison | bound the factor by its maximum |
| absolute convergence first, then AST | absolute is the stronger conclusion | |
| factorials, or with polynomials | ratio test | ratios of factorials simplify |
| as a whole | root test | the -th root removes the power |
| with an easy antiderivative, e.g. | integral test | logs defeat comparisons |
The decision procedure
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 CONVERGENTTwo traps to remember:
- Step 1 only proves divergence. is necessary, never sufficient (harmonic series).
- Ratio and root tests are useless on algebraic terms: they always return there. Do not waste time on them for .
Worked mixed examples
Example (g) shows why "" proves nothing: , but it is about as large as .
A computer as an assistant
SymPy can decide many textbook series, and partial sums can suggest an answer. Neither replaces the argument.
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 diverges, but it grows like : after a billion terms its partial sum is still below 4.
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 () 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 the stopping rule "" would stop at a finite, meaningless value.
In software
- Stopping rules.
while abs(term) > tolis 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 (harmonic, ), (converges to 2) or (converges) is exactly the step that gives quicksort, heap construction and amortised doubling arrays in Time Complexity.
- Symbolic tools such as SymPy's
is_convergentencode the same procedure; when they returnNoneor 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) , b) , c) .
Answer
a) ratio test, converges (). b) limit comparison with , converges. c) root test, converges ().
Solution
Exercise 2: Sign matters
Classify and .
Answer
The first is conditionally convergent; the second is absolutely convergent.
Solution
Exercise 3: A log in the exponent
Decide . (Hint: rewrite as .)
Answer
It converges.
Solution
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 , and "limit comparison" otherwise. Try it on , and .
Answer
ratio, root, limit comparison.
Solution
expr.has(sp.factorial) detects a factorial; isinstance(expr, sp.Pow) and expr.exp.has(n) detects an -dependent exponent.
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 .
Test yourself
Which test should you NOT bother with for ?
- Limit comparison with
- Direct comparison
- Ratio test
- Test for Divergence
: . What is the verdict?
- Converges, because the terms go to 0
- Diverges, by limit comparison with
- Converges absolutely
- Cannot be decided
Partial sums of barely change after a million terms. What does that show?
- Nothing: it diverges like
- It converges to about 3
- It converges conditionally
- The terms do not go to 0