Chapter IX · The logarithmic, exponential and circular functions of a real variable

Logarithmic tests of convergence

§218 35 min

Series such as ∑1/(nlog⁡n)\sum 1/(n\log n) that comparison with ∑n−s\sum n^{-s} cannot decide, settled by the integral test with log⁡\log and log⁡log⁡\log\log; and Euler's constant γ\gamma.

Why this matters

Chapter VIII decided every series ∑n−s\sum n^{-s}: convergent for s>1s > 1, divergent for s≤1s \le 1. But the scale of infinity has room between 1/n1/n and every 1/n1+α1/n^{1+\alpha}: for example 1/(nlog⁡n)1/(n\log n) and 1/(n(log⁡n)2)1/(n(\log n)^2) tend to 00 faster than 1/n1/n and more slowly than every n−1−αn^{-1-\alpha}. Comparison with powers of nn is powerless on them. §218 settles them with the integral test of §180 and the integrals of the scale-of-infinity lesson, and shows that the dividing line reappears, at exponent 11, on every rung of the logarithmic scale.

The idea

The integral test says that, for a positive decreasing ff, the series ∑f(n)\sum f(n) and the integral ∫∞f(x) dx\int^\infty f(x)\,dx converge or diverge together, and their difference stays bounded. And the integrals we need are easy, because dxx\frac{dx}{x} is d(log⁡x)d(\log x):

∫aξdxx(log⁡x)s=∫log⁡alog⁡ξduus.\int_a^{\xi} \frac{dx}{x(\log x)^s} = \int_{\log a}^{\log\xi} \frac{du}{u^s}.

So the question for ∑1/(n(log⁡n)s)\sum 1/(n(\log n)^s) is the same as the question for ∫du/us\int du/u^s, the continuous version of ∑1/ns\sum 1/n^s, with u=log⁡xu = \log x in place of xx. The answer is the same: convergence exactly when s>1s > 1. What changes is the speed. Where ∑1/n\sum 1/n grows like log⁡N\log N, the series ∑1/(nlog⁡n)\sum 1/(n\log n) grows like log⁡log⁡N\log\log N.

Explore Watch a divergent series that never seems to diverge

Try this. Start with s=1s = 1: the dots are exact partial sums of ∑1/(nlog⁡n)\sum 1/(n\log n) up to N=106N = 10^6. Widen the view to N=101000N = 10^{1000} and beyond, and read how large NN must be for the sum to pass 1010. Then set s=1.5s = 1.5 and s=0.8s = 0.8, and try the second family.

∑n≥21n(log⁡n)1\sum_{n\ge 2} \frac{1}{n(\log n)^{1}}
log₁₀ Nsum up to N
  • exact partial sums (N ≤ 10⁶)
  • the integral from the first term to N
  • integral + constant (beyond 10⁶)
series
Divergent (s ≤ 1). At N=1030N = 10^{30} the sum is about 5.035.03. To push the sum past 10 you need N≈104.32e+3N \approx 10^{4.32e+3}.
What to notice

With s=1s = 1 the sum after a million terms is only 3.43.4, and after 103010^{30} terms about 55; to pass 1010 you need about 10432110^{4321} terms. Yet it diverges: the dashed curve log⁡log⁡N+0.79\log\log N + 0.79 is unbounded. With s>1s > 1 it levels off at a finite sum. For the log⁡log⁡\log\log family at s=1s = 1, the growth is like log⁡log⁡log⁡N\log\log\log N, slower still.

Precise statements

Theorem The logarithmic test Hardy: §218

Let n0>1n_0 > 1 and a>1a > 1. The series and the integral

∑n=n0∞1n(log⁡n)s,∫a∞dxx(log⁡x)s\sum_{n = n_0}^{\infty} \frac{1}{n(\log n)^{s}}, \qquad \int_a^\infty \frac{dx}{x(\log x)^{s}}

are convergent if s>1s > 1 and divergent if s≤1s \le 1.

Corollary Comparison form Hardy: §218

Let ϕ(n)≥0\phi(n) \ge 0. If ϕ(n)≤Kn(log⁡n)s\phi(n) \le \dfrac{K}{n(\log n)^{s}} for large nn, with a constant KK and some s>1s > 1, then ∑ϕ(n)\sum\phi(n) converges. If ϕ(n)≥Knlog⁡n\phi(n) \ge \dfrac{K}{n\log n} for large nn, with K>0K > 0, then ∑ϕ(n)\sum\phi(n) diverges.

Theorem The finer logarithmic tests Hardy: Examples LXXXIX, 2

Write log⁡2x=log⁡log⁡x\log_2 x = \log\log x, log⁡3x=log⁡log⁡log⁡x\log_3 x = \log\log\log x, and so on. For each k≥1k \ge 1, the series and integral

∑n≥n01nlog⁡n log⁡2n⋯log⁡k−1n (log⁡kn)s,∫a∞dxxlog⁡x log⁡2x⋯log⁡k−1x (log⁡kx)s\sum_{n \ge n_0}\frac{1}{n\log n\,\log_2 n\cdots\log_{k-1} n\,(\log_k n)^{s}}, \qquad \int_a^\infty \frac{dx}{x\log x\,\log_2 x\cdots\log_{k-1}x\,(\log_k x)^{s}}

converge if s>1s > 1 and diverge if s≤1s \le 1; here n0n_0 and aa must be large enough that all the logarithms involved are positive.

How large is “large enough”? log⁡x>0\log x > 0 needs x>1x > 1; log⁡log⁡x>0\log\log x > 0 needs x>ex > e; log⁡log⁡log⁡x>0\log\log\log x > 0 needs x>ee≈15.2x > e^e \approx 15.2; the next needs x>eee≈3.8×106x > e^{e^e} \approx 3.8 \times 10^{6}.

Proofs

Proof The logarithmic test
Strategy

Apply the integral test to f(x)=1x(log⁡x)sf(x) = \dfrac{1}{x(\log x)^s}. Compute the integral exactly by the substitution u=log⁡xu = \log x, and read off when it stays bounded.

ff is positive and eventually decreasing

For x>1x > 1, f(x)>0f(x) > 0. Writing f=e−log⁡x−slog⁡log⁡xf = e^{-\log x - s\log\log x}, the exponent has derivative −1x−sxlog⁡x=−log⁡x+sxlog⁡x-\dfrac{1}{x} - \dfrac{s}{x\log x} = -\dfrac{\log x + s}{x\log x}, negative once log⁡x>−s\log x > -s. So ff decreases for large xx, which is all the integral test needs.

Compute the integral up to ξ\xi

With u=log⁡xu = \log x, du=dx/xdu = dx/x:

∫aξdxx(log⁡x)s={(log⁡ξ)1−s−(log⁡a)1−s1−s,s≠1,log⁡log⁡ξ−log⁡log⁡a,s=1.\int_a^{\xi}\frac{dx}{x(\log x)^{s}} = \begin{cases} \dfrac{(\log\xi)^{1-s} - (\log a)^{1-s}}{1 - s}, & s \ne 1,\\[2ex] \log\log\xi - \log\log a, & s = 1. \end{cases}

Let ξ→∞\xi \to \infty

If s>1s > 1, (log⁡ξ)1−s→0(\log\xi)^{1-s} \to 0 and the integral tends to (log⁡a)1−s/(s−1)(\log a)^{1-s}/(s - 1): convergent. If s<1s < 1, (log⁡ξ)1−s→∞(\log\xi)^{1-s} \to \infty; if s=1s = 1, log⁡log⁡ξ→∞\log\log\xi \to \infty: divergent.

Transfer to the series

By the integral test (§180), ∑f(n)\sum f(n) converges exactly when the integral does. (The first few terms, before ff starts to decrease, do not affect convergence.)

Proof The comparison form
Strategy

Compare term by term with the series just decided.

Convergence

If 0≤ϕ(n)≤K/(n(log⁡n)s)0 \le \phi(n) \le K/(n(\log n)^s) for n≥Nn \ge N with s>1s > 1, then the partial sums of ∑ϕ(n)\sum\phi(n) are bounded by those of a convergent series, so they converge (Chapter VIII).

Divergence

If ϕ(n)≥K/(nlog⁡n)\phi(n) \ge K/(n\log n) for n≥Nn \ge N and K>0K > 0, the partial sums of ∑ϕ(n)\sum\phi(n) exceed KK times those of the divergent ∑1/(nlog⁡n)\sum 1/(n\log n).

Proof The finer tests
Strategy

The same substitution, one level deeper each time: the derivative of log⁡kx\log_k x is exactly 1xlog⁡x⋯log⁡k−1x\dfrac{1}{x\log x\cdots\log_{k-1}x}.

Differentiate log⁡kx\log_k x

By the chain rule (and induction on kk), ddxlog⁡kx=1log⁡k−1x⋅ddxlog⁡k−1x=1xlog⁡x log⁡2x⋯log⁡k−1x\dfrac{d}{dx}\log_k x = \dfrac{1}{\log_{k-1} x}\cdot\dfrac{d}{dx}\log_{k-1}x = \dfrac{1}{x\log x\,\log_2 x\cdots\log_{k-1}x}.

Substitute u=log⁡kxu = \log_k x

The integral becomes ∫du/us\int du/u^s between log⁡ka\log_k a and log⁡kξ\log_k\xi. Since log⁡kξ→∞\log_k\xi \to \infty, it converges exactly when s>1s > 1.

Series

The integrand is positive and eventually decreasing (each factor in the denominator eventually increases), so the integral test applies as before.

Explore Two series that look alike

Try this. Compare ∑1/(nlog⁡n)\sum 1/(n\log n) (blue) with ∑1/(n(log⁡n)2)\sum 1/(n(\log n)^2) (ochre) over 200200 terms, then look at the terms instead of the sums.

∑n=2∞1nlog⁡n\sum_{n=2}^{\infty} \frac{1}{n\log n} compared with ∑n=2∞1n(log⁡n)2\sum_{n=2}^{\infty} \frac{1}{n(\log n)^2}
nsₙ
  • sₙ for 1nlog⁡n\frac{1}{n\log n}
  • sₙ for 1n(log⁡n)2\frac{1}{n(\log n)^2}
Plot
After 200 terms s201=2.463477436s_{201} = 2.463477436. The series diverges. The comparison series converges; its 200-th partial sum is 1.92127.
What to notice

Term by term the two series are hard to tell apart, and after 200200 terms the divergent one is not even far ahead. One converges (to about 2.112.11) and the other diverges, but no finite number of terms can show it: only the theorem can.

Worked examples and exercises

Exercise ●○○ Hardy: Examples LXXXIX, 1

Let s>0s > 0. Show that ∑(log⁡n)pn1+s\sum \dfrac{(\log n)^p}{n^{1+s}} converges and ∑1n1−s(log⁡n)p\sum \dfrac{1}{n^{1-s}(\log n)^p} diverges, whatever the value of pp.

Hint
A power of log⁡n\log n is smaller than any power nδn^{\delta} for large nn. Steal half of ss.

Solution

Convergence. By the scale of infinity, (log⁡n)p/ns/2→0(\log n)^p / n^{s/2} \to 0, so (log⁡n)p<ns/2(\log n)^p < n^{s/2} for large nn. Then (log⁡n)pn1+s<1n1+s/2\dfrac{(\log n)^p}{n^{1+s}} < \dfrac{1}{n^{1 + s/2}}, the term of a convergent series.

Divergence. Likewise (log⁡n)p<ns/2(\log n)^p < n^{s/2} for large nn, so 1n1−s(log⁡n)p>1n1−s/2≥1n\dfrac{1}{n^{1-s}(\log n)^p} > \dfrac{1}{n^{1 - s/2}} \ge \dfrac1n for large nn (as 1−s/2<11 - s/2 < 1), and ∑1/n\sum 1/n diverges.

Logarithmic factors matter only when the power of nn is exactly 11; that is why a finer test is needed there.

Exercise ●●○ Hardy: Examples LXXXIX, 2

Decide whether ∑n≥31nlog⁡n log⁡log⁡n\displaystyle\sum_{n \ge 3}\frac{1}{n\log n\,\log\log n} and ∑n≥16log⁡log⁡log⁡nnlog⁡nlog⁡log⁡n\displaystyle\sum_{n \ge 16}\frac{\log\log\log n}{n\log n\sqrt{\log\log n}} converge.

Hint
Both sit at the level k=2k = 2 of the finer test. For the second, the numerator tends to infinity: does that help or hurt convergence?

Solution

The first is the case k=2k = 2, s=1s = 1 of the finer test: divergent. (Its partial sums grow like log⁡log⁡log⁡N\log\log\log N.)

For the second, log⁡log⁡log⁡n≥1\log\log\log n \ge 1 once n≥eee≈3.8×106n \ge e^{e^e} \approx 3.8\times10^6, so from there on the term is at least 1nlog⁡n (log⁡log⁡n)1/2\dfrac{1}{n\log n\,(\log\log n)^{1/2}}, the case k=2k = 2, s=12s = \tfrac12: divergent by comparison. (Hardy notes that neither series can be decided by the test with log⁡n\log n alone, since their terms lie between 1/(n(log⁡n)1+α)1/(n(\log n)^{1+\alpha}) and 1/(nlog⁡n)1/(n\log n).)

Exercise Euler's constant ●●○ Hardy: Examples XC, 1

Show that ϕ(n)=1+12+⋯+1n−1−log⁡n\phi(n) = 1 + \dfrac12 + \dots + \dfrac{1}{n - 1} - \log n increases and tends to a limit γ\gamma with 0<γ≤10 < \gamma \le 1.

Hint
Write log⁡n=∑k=1n−1∫kk+1dt/t\log n = \sum_{k=1}^{n-1}\int_k^{k+1}dt/t and pair each 1/k1/k with the integral over [k,k+1][k, k+1].

Solution
ϕ(n)=∑k=1n−1(1k−∫kk+1dtt).\phi(n) = \sum_{k=1}^{n-1}\left(\frac1k - \int_k^{k+1}\frac{dt}{t}\right).

On (k,k+1)(k, k+1), 1/(k+1)<1/t<1/k1/(k+1) < 1/t < 1/k, so each bracket dkd_k satisfies 0<dk<1k−1k+10 < d_k < \frac1k - \frac1{k+1}. Hence ϕ(n)\phi(n) is a sum of positive terms, increasing in nn, and ϕ(n)<∑k=1n−1(1k−1k+1)=1−1n<1\phi(n) < \sum_{k=1}^{n-1}\left(\frac1k - \frac1{k+1}\right) = 1 - \frac1n < 1 (the sum telescopes). An increasing bounded sequence has a limit γ\gamma, and 0<d1≤γ≤10 < d_1 \le \gamma \le 1. Its value is γ=0.5772…\gamma = 0.5772\ldots, Euler’s constant; whether it is rational is a famous open problem. Equivalently, 1+12+⋯+1n=log⁡n+γ+o(1)1 + \frac12 + \dots + \frac1n = \log n + \gamma + o(1).

Exercise ●●○ Hardy: Examples XC, 7

Show that 1−12+13−14+⋯=log⁡21 - \dfrac12 + \dfrac13 - \dfrac14 + \dots = \log 2.

Hint
Let Hm=1+12+⋯+1mH_m = 1 + \frac12 + \dots + \frac1m. The partial sum s2ns_{2n} equals H2n−HnH_{2n} - H_n.

Solution

s2n=(1+12+⋯+12n)−2(12+14+⋯+12n)=H2n−Hns_{2n} = \left(1 + \frac12 + \dots + \frac1{2n}\right) - 2\left(\frac12 + \frac14 + \dots + \frac1{2n}\right) = H_{2n} - H_n. By Euler’s limit, Hm=log⁡m+γ+εmH_m = \log m + \gamma + \varepsilon_m with εm→0\varepsilon_m \to 0, so s2n=log⁡2n−log⁡n+ε2n−εn→log⁡2s_{2n} = \log 2n - \log n + \varepsilon_{2n} - \varepsilon_n \to \log 2. Since s2n+1=s2n+12n+1s_{2n+1} = s_{2n} + \frac{1}{2n+1} has the same limit, the series converges to log⁡2\log 2. (The constant γ\gamma cancels: we never need its value.)

Exercise ●○○ Hardy: Examples XC, 4

Show that 11+12(1+12)+13(1+12+13)+…\displaystyle\frac{1}{1} + \frac{1}{2(1 + \frac12)} + \frac{1}{3(1 + \frac12 + \frac13)} + \dots diverges.

Hint
Compare the general term 1nHn\dfrac{1}{nH_n} with 1nlog⁡n\dfrac{1}{n\log n}.

Solution

Hn≤1+log⁡nH_n \le 1 + \log n (from Euler’s limit, or from 12+⋯+1n<∫1ndt/t\frac12 + \dots + \frac1n < \int_1^n dt/t). For n≥3n \ge 3, log⁡n>1\log n > 1, so Hn<2log⁡nH_n < 2\log n and 1nHn>12nlog⁡n\dfrac{1}{nH_n} > \dfrac{1}{2n\log n}. The comparison form of the test gives divergence. This is a special case of Examples XC, 6: if ∑un\sum u_n diverges, so does ∑un/sn−1\sum u_n/s_{n-1}.

Check yourself

Check yourself Choose one

Which of these series converges?

Why

At the level of 1/n1/n, the exponent of log⁡n\log n decides: convergence exactly when it is greater than 11 in the denominator. 1/(nlog⁡n)1/(n\log n) (s=1s = 1) and 1/(nlog⁡n)1/(n\sqrt{\log n}) (s=12s = \frac12) diverge; (log⁡n)100/n(\log n)^{100}/n is even larger than 1/n1/n. Only s=1.01s = 1.01 converges, though extremely slowly.

Check yourself True or false?

After 10610^{6} terms the partial sums of ∑1/(nlog⁡n)\sum 1/(n\log n) have reached only about 3.43.4 and are growing very slowly, so the series converges to about 44.

Why

False. The series diverges by the logarithmic test: its partial sums behave like log⁡log⁡N+0.79\log\log N + 0.79, which is unbounded. It passes 55 near N=1029N = 10^{29} and 1010 near N=104321N = 10^{4321}. Numerical evidence cannot distinguish such slow divergence from convergence.

Check yourself Enter a number

Euler’s constant γ=lim⁡ (1+12+⋯+1n−log⁡n)\gamma = \lim\,(1 + \frac12 + \dots + \frac1n - \log n), to four decimal places.

Why

γ=0.57721…\gamma = 0.57721\ldots. With n=106n = 10^6 the difference Hn−log⁡nH_n - \log n is 0.57721620.5772162, already correct to six places, because the error is about 1/(2n)1/(2n).

Check yourself Choose one

Which substitution turns ∫3∞dxxlog⁡x (log⁡log⁡x)2\displaystyle\int_3^\infty\frac{dx}{x\log x\,(\log\log x)^2} into ∫duu2\displaystyle\int\frac{du}{u^2}?

Why

ddxlog⁡log⁡x=1xlog⁡x\dfrac{d}{dx}\log\log x = \dfrac{1}{x\log x}, so du=dxxlog⁡xdu = \dfrac{dx}{x\log x} and the integral becomes ∫log⁡log⁡3∞du/u2\int_{\log\log 3}^\infty du/u^2, which converges. With u=log⁡xu = \log x one gets ∫du/(u(log⁡u)2)\int du/(u(\log u)^2), the same problem one level up.

Hardy’s language

Conversely, the rate of increase of the higher logarithmic functions is extremely slow.

— G. H. Hardy, §218

Summary

Summary
  • ∑1/(n(log⁡n)s)\sum 1/(n(\log n)^s) and ∫∞dx/(x(log⁡x)s)\int^\infty dx/(x(\log x)^s) converge iff s>1s > 1: the substitution u=log⁡xu = \log x turns them into ∫du/us\int du/u^s.
  • The same holds one level down for every iterated logarithm: ∑1/(nlog⁡n⋯log⁡k−1n (log⁡kn)s)\sum 1/(n\log n\cdots\log_{k-1}n\,(\log_k n)^s) converges iff s>1s > 1.
  • Divergence at s=1s = 1 is extremely slow: ∑1/(nlog⁡n)\sum 1/(n\log n) needs about 10432110^{4321} terms to pass 1010.
  • Euler’s constant: 1+12+⋯+1n−log⁡n→γ=0.5772…1 + \frac12 + \dots + \frac1n - \log n \to \gamma = 0.5772\ldots; hence 1−12+13−⋯=log⁡21 - \frac12 + \frac13 - \dots = \log 2.