Practice / Calculus

Series convergence tests: geometric, divergence, integral, comparison and alternating

Ten problems on infinite series: a geometric series that starts at n = 1, a telescoping sum, the divergence test and what it cannot say about 1/√n, the integral test on 1/(n ln² n) with bounds on the sum, a direct comparison for (2 + cos n)/n², a limit comparison, the alternating harmonic series and conditional convergence, how many terms an alternating error bound needs, the ratio test on n!/nⁿ, and the step-size conditions behind stochastic gradient descent, with worked solutions and the mistakes of starting a geometric sum at the wrong term, reading terms that go to 0 as convergence and comparing with a bigger divergent series.

Before you start

An infinite series adds up infinitely many numbers, and the first question is whether the total is a finite number at all. Taylor series, the geometric sums behind an exponential moving average, and the step-size conditions in proofs that stochastic gradient descent converges all depend on the answer. A handful of tests settle most series: compare with a geometric series or a pp-series, compare with an integral, or use the alternating signs. The work goes wrong in a few places: a geometric sum started at the wrong term, terms that go to 00 read as proof of convergence, a comparison made in the direction that proves nothing, the alternating series test used on terms that do not shrink, and a ratio limit of 11 treated as a verdict. These ten problems cover each of them.

  • Convergence. ∑n=1∞an\displaystyle\sum_{n=1}^\infty a_n converges to SS if the partial sums SN=a1+⋯+aNS_N = a_1 + \dots + a_N tend to SS. Otherwise it diverges.
  • Geometric series. ∑n=0∞arn=a1−r\displaystyle\sum_{n=0}^\infty ar^n = \frac{a}{1 - r} for ∣r∣<1\lvert r\rvert < 1, and it diverges for ∣r∣≥1\lvert r\rvert \ge 1. In general the sum is first term1−r\dfrac{\text{first term}}{1 - r}.
  • Divergence test. If an↛0a_n \not\to 0, the series diverges. If an→0a_n \to 0, this test says nothing.
  • Integral test and pp-series. If ff is positive and decreasing with f(n)=anf(n) = a_n, then ∑an\sum a_n and ∫1∞f(x) dx\int_1^\infty f(x)\,dx converge or diverge together, and ∫N∞f≤∑n=N∞an≤aN+∫N∞f\displaystyle\int_N^\infty f \le \sum_{n=N}^\infty a_n \le a_N + \int_N^\infty f. So ∑1np\displaystyle\sum\frac1{n^p} converges exactly when p>1p > 1.
  • Comparison. For 0≤an≤bn0 \le a_n \le b_n: if ∑bn\sum b_n converges so does ∑an\sum a_n; if ∑an\sum a_n diverges so does ∑bn\sum b_n. Limit comparison: if an,bn>0a_n, b_n > 0 and an/bn→La_n/b_n \to L with 0<L<∞0 < L < \infty, both converge or both diverge.
  • Alternating series. If bnb_n decreases to 00, ∑(−1)n+1bn\sum(-1)^{n+1}b_n converges, and stopping after NN terms leaves an error of at most bN+1b_{N+1}. A series is absolutely convergent if ∑∣an∣\sum\lvert a_n\rvert converges, and conditionally convergent if it converges but ∑∣an∣\sum\lvert a_n\rvert does not.
  • Ratio test. If ∣an+1/an∣→ℓ\lvert a_{n+1}/a_n\rvert \to \ell, the series converges absolutely for ℓ<1\ell < 1 and diverges for ℓ>1\ell > 1. At ℓ=1\ell = 1 it says nothing.

Builds on: Improper integrals: infinite limits, infinite integrands and comparison, Evaluating limits: factoring, conjugates and limits at infinity

Problems

  1. ·

    Find ∑n=1∞5(23)n\displaystyle\sum_{n=1}^\infty 5\Big(\frac23\Big)^n.

  2. ·

    Find ∑n=1∞1n(n+1)\displaystyle\sum_{n=1}^\infty \frac{1}{n(n + 1)} from its partial sums.

  3. ·

    What does the divergence test say about ∑n=1∞n2n+1\displaystyle\sum_{n=1}^\infty\frac{n}{2n + 1}, and about ∑n=1∞1n\displaystyle\sum_{n=1}^\infty\frac1{\sqrt n}?

  4. ··

    Use the integral test to show that ∑n=2∞1n(ln⁡n)2\displaystyle\sum_{n=2}^\infty\frac{1}{n(\ln n)^2} converges, and bound its sum.

  5. ··

    Show that ∑n=1∞2+cos⁡nn2\displaystyle\sum_{n=1}^\infty\frac{2 + \cos n}{n^2} converges, and give bounds for its sum.

  6. ··

    Does ∑n=1∞3n+1n3+2\displaystyle\sum_{n=1}^\infty\frac{3n + 1}{n^3 + 2} converge?

  7. ··

    Show that ∑n=1∞(−1)n+1n=1−12+13−…\displaystyle\sum_{n=1}^\infty\frac{(-1)^{n+1}}{n} = 1 - \frac12 + \frac13 - \dots converges, decide whether it converges absolutely, and bound the error of S4S_4.

  8. ··

    How many terms of ∑n=1∞(−1)n+1n3\displaystyle\sum_{n=1}^\infty\frac{(-1)^{n+1}}{n^3} guarantee an error less than 0.0010.001?

  9. ···

    Use the ratio test on ∑n=1∞n!nn\displaystyle\sum_{n=1}^\infty\frac{n!}{n^n}.

  10. ···

    Proofs that stochastic gradient descent converges usually ask for step sizes αn>0\alpha_n > 0 with ∑αn=∞\sum\alpha_n = \infty and ∑αn2<∞\sum\alpha_n^2 < \infty. For which pp does αn=cnp\alpha_n = \dfrac{c}{n^p} (with c>0c > 0) qualify? Does αn=0.1⋅0.99n\alpha_n = 0.1\cdot0.99^n?

Worked solutions

Problem 1

Find ∑n=1∞5(23)n\displaystyle\sum_{n=1}^\infty 5\Big(\frac23\Big)^n.

  1. r=23r = \tfrac23, and ∣r∣<1\lvert r\rvert < 1, so the series convergesA geometric series: each term is 23\tfrac23 of the one before.
  2. The first term, at n=1n = 1, is 5⋅23=1035\cdot\tfrac23 = \tfrac{10}3The sum starts at n=1n = 1, not n=0n = 0.
  3. 10/31−2/3=10/31/3\dfrac{10/3}{1 - 2/3} = \dfrac{10/3}{1/3}First term over 1−r1 - r.
  4. 1010The partial sums 103\tfrac{10}3, 509\tfrac{50}9, 19027,…\tfrac{190}{27}, \dots climb toward 1010.

Problem 2

Find ∑n=1∞1n(n+1)\displaystyle\sum_{n=1}^\infty \frac{1}{n(n + 1)} from its partial sums.

  1. 1n(n+1)=1n−1n+1\dfrac{1}{n(n + 1)} = \dfrac1n - \dfrac1{n + 1}Partial fractions.
  2. SN=(1−12)+(12−13)+⋯+(1N−1N+1)=1−1N+1S_N = \big(1 - \tfrac12\big) + \big(\tfrac12 - \tfrac13\big) + \dots + \big(\tfrac1N - \tfrac1{N + 1}\big) = 1 - \dfrac1{N + 1}Every middle term cancels with the next one: the sum telescopes.
  3. 1−1N+1→11 - \dfrac1{N + 1} \to 1Take the limit of the partial sums.
  4. 11For example S99=0.99S_{99} = 0.99. Telescoping sums are one of the few kinds, with geometric series, whose exact value is easy to find.

Problem 3

What does the divergence test say about ∑n=1∞n2n+1\displaystyle\sum_{n=1}^\infty\frac{n}{2n + 1}, and about ∑n=1∞1n\displaystyle\sum_{n=1}^\infty\frac1{\sqrt n}?

  1. n2n+1→12≠0\dfrac{n}{2n + 1} \to \dfrac12 \ne 0Divide top and bottom by nn.
  2. So ∑n2n+1\displaystyle\sum\frac{n}{2n + 1} divergesAdding terms near 12\tfrac12 forever gives partial sums that grow like N2\tfrac N2.
  3. 1n→0\dfrac1{\sqrt n} \to 0, so the divergence test says nothing about ∑1n\sum\frac1{\sqrt n}Terms going to 00 are needed for convergence, but they are not enough.
  4. The first diverges; for the second the test is silent, and it diverges anywayIt is a pp-series with p=12≤1p = \tfrac12 \le 1. Directly: each of the first NN terms is at least 1N\tfrac1{\sqrt N}, so SN≥NS_N \ge \sqrt N. S100≈18.59S_{100} \approx 18.59.

Problem 4

Use the integral test to show that ∑n=2∞1n(ln⁡n)2\displaystyle\sum_{n=2}^\infty\frac{1}{n(\ln n)^2} converges, and bound its sum.

  1. f(x)=1x(ln⁡x)2f(x) = \dfrac{1}{x(\ln x)^2} is positive and decreasing for x≥2x \ge 2Both xx and ln⁡x\ln x increase, so the denominator does.
  2. ∫2bdxx(ln⁡x)2=[−1ln⁡x]2b=1ln⁡2−1ln⁡b\displaystyle\int_2^b\frac{dx}{x(\ln x)^2} = \Big[-\frac1{\ln x}\Big]_2^b = \frac1{\ln2} - \frac1{\ln b}Substitute u=ln⁡xu = \ln x, du=dxxdu = \tfrac{dx}x: the integral of u−2u^{-2}.
  3. 1ln⁡b→0\dfrac1{\ln b} \to 0, so the integral is 1ln⁡2≈1.4427\dfrac1{\ln2} \approx 1.4427 and the series convergesThe integral test.
  4. 1ln⁡2≤S≤12(ln⁡2)2+1ln⁡2\dfrac1{\ln2} \le S \le \dfrac{1}{2(\ln2)^2} + \dfrac1{\ln2}The bounds with N=2N = 2: the integral alone, and the integral plus the first term.
  5. It converges, with 1.443≤S≤2.4831.443 \le S \le 2.483The sum is about 2.1102.110. Without the square, ∑1nln⁡n\sum\frac{1}{n\ln n} diverges: its integral is ln⁡(ln⁡b)→∞\ln(\ln b) \to \infty.

Problem 5

Show that ∑n=1∞2+cos⁡nn2\displaystyle\sum_{n=1}^\infty\frac{2 + \cos n}{n^2} converges, and give bounds for its sum.

  1. 1≤2+cos⁡n≤31 \le 2 + \cos n \le 3, so 1n2≤2+cos⁡nn2≤3n2\dfrac1{n^2} \le \dfrac{2 + \cos n}{n^2} \le \dfrac3{n^2}cos⁡n\cos n is between −1-1 and 11. Every term is positive.
  2. ∑3n2\displaystyle\sum\frac3{n^2} convergesA pp-series with p=2>1p = 2 > 1, times 33.
  3. So the series converges by direct comparisonSmaller than a convergent series, term by term.
  4. ∑1n2=π26≈1.645\displaystyle\sum\frac1{n^2} = \frac{\pi^2}6 \approx 1.645 and ∑3n2=π22≈4.935\displaystyle\sum\frac3{n^2} = \frac{\pi^2}2 \approx 4.935The known value of ∑1n2\sum\frac1{n^2}.
  5. It converges, to a sum between 1.6451.645 and 4.9354.935The sum is about 3.6143.614. The integral test can't be used here, because the terms are not decreasing.

Problem 6

Does ∑n=1∞3n+1n3+2\displaystyle\sum_{n=1}^\infty\frac{3n + 1}{n^3 + 2} converge?

  1. For large nn, 3n+1n3+2\dfrac{3n + 1}{n^3 + 2} behaves like 3nn3=3n2\dfrac{3n}{n^3} = \dfrac3{n^2}Keep the highest power on top and bottom.
  2. (3n+1)/(n3+2)1/n2=3n3+n2n3+2→3\dfrac{(3n + 1)/(n^3 + 2)}{1/n^2} = \dfrac{3n^3 + n^2}{n^3 + 2} \to 3Limit comparison with bn=1n2b_n = \tfrac1{n^2}.
  3. 0<3<∞0 < 3 < \infty and ∑1n2\sum\frac1{n^2} convergesBoth series do the same thing.
  4. Yes, it convergesA direct comparison works too: 3n+1≤4n3n + 1 \le 4n and n3+2>n3n^3 + 2 > n^3, so the terms are below 4n2\tfrac4{n^2}. The sum is about 3.2603.260.

Problem 7

Show that ∑n=1∞(−1)n+1n=1−12+13−…\displaystyle\sum_{n=1}^\infty\frac{(-1)^{n+1}}{n} = 1 - \frac12 + \frac13 - \dots converges, decide whether it converges absolutely, and bound the error of S4S_4.

  1. bn=1nb_n = \tfrac1n decreases and tends to 00The conditions of the alternating series test.
  2. So the series convergesEach partial sum overshoots the last in the other direction, by less each time.
  3. ∑∣(−1)n+1n∣=∑1n\displaystyle\sum\Big\lvert\frac{(-1)^{n+1}}{n}\Big\rvert = \sum\frac1n divergesThe harmonic series, a pp-series with p=1p = 1.
  4. S4=1−12+13−14=712≈0.5833S_4 = 1 - \tfrac12 + \tfrac13 - \tfrac14 = \tfrac7{12} \approx 0.5833, with error at most b5=15b_5 = \tfrac15The first omitted term.
  5. It converges conditionally, not absolutely; ∣S−S4∣≤0.2\lvert S - S_4\rvert \le 0.2The sum is ln⁡2≈0.6931\ln2 \approx 0.6931, so the actual error is about 0.1100.110, inside the bound.

Problem 8

How many terms of ∑n=1∞(−1)n+1n3\displaystyle\sum_{n=1}^\infty\frac{(-1)^{n+1}}{n^3} guarantee an error less than 0.0010.001?

  1. bn=1n3b_n = \tfrac1{n^3} decreases to 00, so the error after NN terms is at most 1(N+1)3\dfrac1{(N + 1)^3}The alternating series error bound.
  2. 1(N+1)3<0.001\dfrac1{(N + 1)^3} < 0.001 needs (N+1)3>1000(N + 1)^3 > 1000, so N+1>10N + 1 > 10103=100010^3 = 1000 exactly, which is not enough for a strict inequality.
  3. N=10N = 10: the bound is 11331≈0.00075\tfrac1{1331} \approx 0.00075N=9N = 9 gives a bound of exactly 0.0010.001.
  4. 1010 termsS10≈0.90112S_{10} \approx 0.90112, and the sum is 34ζ(3)≈0.90154\tfrac34\zeta(3) \approx 0.90154: the actual error is about 0.000430.00043.

Problem 9

Use the ratio test on ∑n=1∞n!nn\displaystyle\sum_{n=1}^\infty\frac{n!}{n^n}.

  1. an+1an=(n+1)!(n+1)n+1⋅nnn!\dfrac{a_{n+1}}{a_n} = \dfrac{(n + 1)!}{(n + 1)^{n+1}}\cdot\dfrac{n^n}{n!}Write out the ratio of consecutive terms.
  2. =(n+1) nn(n+1)n+1=nn(n+1)n=(nn+1)n= \dfrac{(n + 1)\,n^n}{(n + 1)^{n+1}} = \dfrac{n^n}{(n + 1)^n} = \Big(\dfrac{n}{n + 1}\Big)^n(n+1)!/n!=n+1(n + 1)!/n! = n + 1, which cancels one factor of n+1n + 1.
  3. (nn+1)n=1(1+1/n)n→1e\Big(\dfrac{n}{n + 1}\Big)^n = \dfrac{1}{(1 + 1/n)^n} \to \dfrac1eThe limit that defines ee.
  4. ℓ=1e≈0.368<1\ell = \tfrac1e \approx 0.368 < 1, so the series convergesThe sum is about 1.8801.880. Factorials and powers in the same term are what the ratio test is for: the comparison tests have nothing simple to compare with.

Problem 10

Proofs that stochastic gradient descent converges usually ask for step sizes αn>0\alpha_n > 0 with ∑αn=∞\sum\alpha_n = \infty and ∑αn2<∞\sum\alpha_n^2 < \infty. For which pp does αn=cnp\alpha_n = \dfrac{c}{n^p} (with c>0c > 0) qualify? Does αn=0.1⋅0.99n\alpha_n = 0.1\cdot0.99^n?

  1. ∑cnp=∞\displaystyle\sum\frac{c}{n^p} = \infty exactly when p≤1p \le 1The pp-series test.
  2. ∑(cnp)2=c2∑1n2p<∞\displaystyle\sum\Big(\frac{c}{n^p}\Big)^2 = c^2\sum\frac1{n^{2p}} < \infty exactly when 2p>12p > 1Again the pp-series test, now with exponent 2p2p.
  3. Both hold when 12<p≤1\tfrac12 < p \le 1So cn\tfrac cn qualifies, and cn\tfrac{c}{\sqrt n} (whose squares form the harmonic series) and cn2\tfrac{c}{n^2} (whose sum is finite) do not.
  4. ∑n=1∞0.1⋅0.99n=0.1⋅0.991−0.99=9.9\displaystyle\sum_{n=1}^\infty 0.1\cdot0.99^n = \frac{0.1\cdot0.99}{1 - 0.99} = 9.9Geometric, with first term 0.0990.099.
  5. 12<p≤1\tfrac12 < p \le 1; the geometric schedule fails, because ∑αn=9.9\sum\alpha_n = 9.9 is finiteThe first condition lets the steps reach a minimum however far away it starts; with steps adding to 9.99.9, the iterates can only travel 9.99.9 times the largest gradient. The second condition makes the noise in the gradients average out.

Where this goes wrong

1. Starting the geometric sum at the wrong term

a1−r\dfrac{a}{1 - r} is memorized with aa as the number in front of rnr^n.

  1. ∑n=1∞5(23)n\displaystyle\sum_{n=1}^\infty 5\Big(\frac23\Big)^n, geometric with r=23r = \tfrac23Right so far: Problem 1, step 1.
  2. “a=5a = 5.”The habit that causes the mistake: 55 is the term at n=0n = 0, and this sum starts at n=1n = 1.
  3. 51−2/3=15\dfrac{5}{1 - 2/3} = 15That includes a term of 55 that is not in the series. The formula needs the first term actually in the sum, 5⋅23=1035\cdot\tfrac23 = \tfrac{10}3, and the sum is 1010.

2. Reading terms that go to 0 as convergence

The divergence test gets used backwards.

  1. 1n→0\dfrac1{\sqrt n} \to 0Right so far: Problem 3, step 3.
  2. “The terms go to 00, so the series converges.”The habit that causes the mistake: the divergence test turned around.
  3. ∑1n\displaystyle\sum\frac1{\sqrt n} convergesIt diverges: SN≥NS_N \ge \sqrt N, and S10000≈198.5S_{10000} \approx 198.5. Terms that go to 00 are necessary for convergence, not sufficient, and the harmonic series ∑1n\sum\frac1n is the standard example.

3. Comparing with a bigger divergent series

Any true inequality looks like a comparison.

  1. an=3n+1n3+2>0a_n = \dfrac{3n + 1}{n^3 + 2} > 0Right so far: Problem 6.
  2. “an≤4na_n \le \tfrac4n for every n≥1n \ge 1, and ∑4n\sum\frac4n diverges.”The inequality is true: (3n+1)n≤4(n3+2)(3n + 1)n \le 4(n^3 + 2) for every n≥1n \ge 1.
  3. So ∑an\sum a_n divergesBeing smaller than a divergent series proves nothing; a series of zeros is smaller too. To prove divergence, ana_n must be at least the terms of a divergent series; to prove convergence, at most those of a convergent one. Here an≤4n2a_n \le \tfrac4{n^2}, and the series converges.

4. Using the alternating series test on terms that don't shrink to 0

The signs alternate, so the test seems to apply.

  1. ∑n=1∞(−1)n+1nn+1\displaystyle\sum_{n=1}^\infty(-1)^{n+1}\frac{n}{n + 1}, with bn=nn+1b_n = \dfrac{n}{n + 1}The setup of Problem 7, on a different series.
  2. “It alternates, so it converges.”The habit that causes the mistake: the test has two conditions, and only the alternation was checked.
  3. The series convergesbn→1b_n \to 1, not 00, so the terms do not go to 00 and the series diverges by the divergence test: its partial sums keep jumping by nearly 11. The alternating series test needs bnb_n to decrease to 00.

5. Taking a ratio limit of 1 as an answer

The ratio test is applied to every series, and its answer is read even at the boundary.

  1. For ∑1n\sum\frac1n: an+1an=nn+1→1\dfrac{a_{n+1}}{a_n} = \dfrac{n}{n + 1} \to 1Right so far: the same step as Problem 9, step 1.
  2. “ℓ≤1\ell \le 1, so it converges.”The habit that causes the mistake: the boundary case lumped in with ℓ<1\ell < 1.
  3. ∑1n\sum\frac1n convergesIt diverges. At ℓ=1\ell = 1 the ratio test gives no answer: ∑1n2\sum\frac1{n^2} also has ratio (nn+1)2→1\big(\tfrac{n}{n + 1}\big)^2 \to 1 and converges. Any pp-series has ratio limit 11, so for these, use the integral test or a comparison instead.

Print this set: series-convergence-tests.pdf (problems, answers, and worked solutions on separate pages).

Read the guide: Series convergence tests: which test to use, and what each one can't tell you