Mathematics · Book 4 · Bachelor Year 2

University Mathematics — Year 2

University Mathematics — Year 2 · Bachelor Year 2

6Comparison of Functions

Asymptotic analysis — the art of replacing a complicated quantity by a simple one plus a controlled error — was begun in the Year 1 volume with Taylor expansions. This chapter makes it a discipline of its own: expansions along general scales, the series–integral comparison with its full asymptotic force, Stirling’s formula (proved completely), and the systematic study of implicitly defined sequences. These techniques are the daily bread of asymptotic analysis, and every later chapter that estimates anything — series, integrals, probabilities — eats from this table.

6.1 Comparison relations and scales

Definition 6.1

Near a point aa (a∈Ra \in \R or ±∞\pm\infty), for functions (or sequences, with n→∞n \to \infty): f=o(g)f = o(g), f=O(g)f = O(g), f∼gf \sim g as in the Year 1 volume. A comparison scale at aa is a family of positive functions, pairwise comparable, totally ordered by o(⋅)o(\cdot) — the standard scale at +∞+\infty being

xα(ln⁡x)β(α,β∈R),x^{\alpha} (\ln x)^{\beta} \qquad (\alpha, \beta \in \R),

ordered lexicographically in (α,β)(\alpha, \beta), refined when needed by exponentials eγx\eu^{\gamma x}.

Definition 6.2 (Asymptotic expansion)

ff admits the asymptotic expansion

f=c1φ1+c2φ2+⋯+ckφk+o(φk)(φi+1=o(φi) in the scale)f = c_1 \varphi_1 + c_2\varphi_2 + \dots + c_k \varphi_k + o(\varphi_k) \qquad (\varphi_{i+1} = o(\varphi_i) \text{ in the scale})

when the successive remainders satisfy the displayed estimates. The coefficients are then unique: c1=lim⁡f/φ1c_1 = \lim f/\varphi_1, and inductively ci+1=lim⁡ (f−∑j≤icjφj)/φi+1c_{i+1} = \lim\,(f - \sum_{j \leq i} c_j\varphi_j)/\varphi_{i+1}.

Example 6.3

Taylor expansions are asymptotic expansions along the scale (x−a)k(x - a)^k at aa. But the notion is strictly wider: at +∞+\infty,

1x−ln⁡x=1x⋅11−ln⁡xx=1x+ln⁡xx2+o(ln⁡xx2),\frac{1}{x - \ln x} = \frac1x \cdot \frac{1}{1 - \frac{\ln x}{x}} = \frac1x + \frac{\ln x}{x^2} + o\Bigl(\frac{\ln x}{x^2}\Bigr),

an expansion along the mixed scale — no Taylor theorem applies, only the geometric expansion and the calculus of oo’s.

Example 6.4 (The standard scale is really ordered)

The lexicographic claim of Definition 6.1 needs one line of proof per case. Compare xα(ln⁡x)βx^{\alpha}(\ln x)^{\beta} and xα′(ln⁡x)β′x^{\alpha'}(\ln x)^{\beta'} at +∞+\infty. If α<α′\alpha < \alpha': the ratio is xα−α′(ln⁡x)β−β′→0x^{\alpha - \alpha'}(\ln x)^{\beta - \beta'} \to 0, because a negative power of xx crushes any power of ln⁡x\ln x (set x=etx = \eu^t: e(α−α′)t tβ−β′→0\eu^{(\alpha - \alpha')t}\,t^{\beta - \beta'} \to 0 by the exponential-beats-polynomial limit of the Year 1 volume). If α=α′\alpha = \alpha' and β<β′\beta < \beta': the ratio is (ln⁡x)β−β′→0(\ln x)^{\beta - \beta'} \to 0 directly. So the pairs (α,β)(\alpha, \beta), ordered lexicographically, order the scale by o(⋅)o(\cdot) — and the substitution x=etx = \eu^t is the one-size-fits-all trick for mixed power-log comparisons.

Example 6.5 (Ranking a menagerie)

Scales must be ordered; here is the standard drill. At +∞+\infty, compare n10n^{10}, eln⁡n ⋅ n\eu^{\sqrt{\ln n}\,\cdot\,\sqrt n}, 2n2^n and nln⁡nn^{\ln n} by taking logarithms:

10ln⁡n  ≪  (ln⁡n)2  ≪  nln⁡n  ≪  nln⁡2,10\ln n \;\ll\; (\ln n)^2 \;\ll\; \sqrt{n\ln n} \;\ll\; n\ln 2 ,

where an≪bna_n \ll b_n means an=o(bn)a_n = o(b_n); the second entry is ln⁡(nln⁡n)\ln(n^{\ln n}). Exponentials preserve these strict gaps (if ln⁡un−ln⁡vn→−∞\ln u_n - \ln v_n \to -\infty then un/vn→0u_n/v_n \to 0), so

n10=o(nln⁡n),nln⁡n=o(enln⁡n),enln⁡n=o(2n).n^{10} = o\bigl(n^{\ln n}\bigr), \qquad n^{\ln n} = o\bigl(\eu^{\sqrt{n\ln n}}\bigr), \qquad \eu^{\sqrt{n\ln n}} = o(2^n) .

The moral, twice over: always compare through logarithms (differences of logs, not ratios of logs), and never conclude un∼vnu_n \sim v_n from ln⁡un∼ln⁡vn\ln u_n \sim \ln v_n — the pair n10n^{10} and nln⁡nn^{\ln n} has ln⁡\ln-ratio tending to ∞\infty, but 2n2^n and 4n4^n have ln⁡\ln-ratio exactly 22 and are wildly inequivalent.

6.2 Series–integral comparison, asymptotically

Theorem 6.6

Let ff be continuous, positive, decreasing on [1, +∞)\intco{1}{+\infty}.

  1. If ∫1∞f\int_1^{\infty} f converges, the remainders satisfy

    ∫n+1∞f  ≤  ∑k>nf(k)  ≤  ∫n∞f.\int_{n+1}^{\infty} f \;\leq\; \sum_{k > n} f(k) \;\leq\; \int_{n}^{\infty} f .
  2. If ∫1∞f\int_1^\infty f diverges, the partial sums satisfy ∑k=1nf(k)=∫1nf+C+o(1)\sum_{k=1}^{n} f(k) = \int_1^n f + C + o(1) for some constant CC: the difference ∑k≤nf(k)−∫1nf\sum_{k \leq n} f(k) - \int_1^n f converges.

Proof. The bracketing f(k+1)≤∫kk+1f≤f(k)f(k+1) \leq \int_k^{k+1} f \leq f(k) (decrease) was the Year 1 device; summing over k≥n+1k \geq n+1, resp. k≥nk \geq n, gives (1). For (2), set uk=f(k)−∫kk+1fu_k = f(k) - \int_k^{k+1} f: by the bracketing, 0≤uk≤f(k)−f(k+1)0 \leq u_k \leq f(k) - f(k+1), so the partial sums of ∑uk\sum u_k are bounded by the telescoping f(1)−f(n+1)≤f(1)f(1) - f(n+1) \leq f(1): the series converges. Moreover the sequence (∫nn+1f)n\bigl(\int_n^{n+1} f\bigr)_n is nonincreasing (ff decreases) and nonnegative, hence convergent. Writing

∑k=1nf(k)−∫1nf=∑k=1nuk+∫nn+1f,\sum_{k=1}^{n} f(k) - \int_1^n f = \sum_{k=1}^{n} u_k + \int_n^{n+1} f ,

the right side converges as n→∞n \to \infty: the difference converges to a constant CC, which is statement (2). ∎

Example 6.7 (The harmonic expansion)

For f(t)=1tf(t) = \frac1t: Hn=ln⁡n+γ+o(1)H_n = \ln n + \gamma + o(1), recovering Euler’s constant (Year 1 volume) with a cleaner proof. Pushing one order further (Exercise 6.3):

Hn=ln⁡n+γ+12n+o(1n).H_n = \ln n + \gamma + \frac{1}{2n} + o\Bigl(\frac1n\Bigr).

Numbers make the gain visible at n=10n = 10: H10=2.928968…H_{10} = 2.928968\dots and ln⁡10=2.302585…\ln 10 = 2.302585\dots, so the raw estimate of γ\gamma is H10−ln⁡10=0.626383H_{10} - \ln 10 = 0.626383, off by 0.0490.049; subtracting the correction 120\frac1{20} gives 0.5763830.576383, off from γ=0.577216\gamma = 0.577216 by only 8.3⋅10−48.3\cdot10^{-4} — which is itself the next term 112⋅100\frac{1}{12\cdot100} of the expansion, as the weekend problem proves (question 8).

Example 6.8 (A crude ln⁡(n!)\ln(n!) without Stirling)

The bracketing device alone already locates ln⁡(n!)\ln(n!). Since ln⁡\ln increases,

∫k−1kln⁡t  ⁣dt  ≤  ln⁡k  ≤  ∫kk+1ln⁡t  ⁣dt,\int_{k-1}^{k}\ln t\,\dd t \;\leq\; \ln k \;\leq\; \int_{k}^{k+1}\ln t\,\dd t ,

and summing over k=2,…,nk = 2, \dots, n (with ∫1nln⁡=nln⁡n−n+1\int_1^n\ln = n\ln n - n + 1):

nln⁡n−n+1  ≤  ln⁡(n!)  ≤  (n+1)ln⁡(n+1)−n.n\ln n - n + 1 \;\leq\; \ln(n!) \;\leq\; (n+1)\ln(n+1) - n .

Both fences are nln⁡n−n+O(ln⁡n)n\ln n - n + O(\ln n): hence ln⁡(n!)=nln⁡n−n+O(ln⁡n)\ln(n!) = n\ln n - n + O(\ln n), and in particular ln⁡(n!)∼nln⁡n\ln(n!) \sim n\ln n. What Stirling adds is the next two rungs — the 12ln⁡n\frac12\ln n and the constant ln⁡2π\ln\sqrt{2\pi} — which cost the finer telescoping of Theorem 6.13. Knowing which precision each tool buys is half of asymptotic craft.

Example 6.9 (Cancellation demands expansions)

Compute the limit of n2+n−n\sqrt{n^2 + n} - n. Both terms are ∼n\sim n, and “∼n−n\sim n - n” is meaningless: equivalents cannot be subtracted. Expand instead:

n2+n−n=n(1+1n−1)=n(12n−18n2+O(1n3))=12−18n+O(1n2):\sqrt{n^2 + n} - n = n\Bigl(\sqrt{1 + \tfrac1n} - 1\Bigr) = n\Bigl(\frac{1}{2n} - \frac{1}{8n^2} + O\Bigl(\frac1{n^3}\Bigr)\Bigr) = \frac12 - \frac{1}{8n} + O\Bigl(\frac1{n^2}\Bigr) :

limit 12\frac12, with the approach speed 18n\frac1{8n} as a bonus. The mechanism deserves a name: a difference of two large equivalent quantities lives entirely in their next terms, so one must expand to the first order at which the two sides differ — and carry the remainder to certify that nothing else survives at that order.

Example 6.10 (A divergent comparison, worked)

For f(t)=1tln⁡tf(t) = \frac{1}{t\ln t} on [2, +∞)\intco{2}{+\infty} (continuous, positive, decreasing): ∫2xf=ln⁡ln⁡x−ln⁡ln⁡2→∞\int_2^x f = \ln\ln x - \ln\ln 2 \to \infty, so by Theorem 6.6 (2),

∑k=2n1kln⁡k=ln⁡ln⁡n+C+o(1)\sum_{k=2}^{n}\frac{1}{k\ln k} = \ln\ln n + C + o(1)

for some constant CC. Two lessons. First, the divergence is real but glacial: the partial sum first exceeds 44 around n≈ee4−Cn \approx \eu^{\eu^{4 - C}}, astronomically large. Second, the shape ln⁡ln⁡n\ln\ln n was delivered by an antiderivative, not guessed: for monotone terms, the integral is the canonical summing device, and the constant CC — like Euler’s γ\gamma — is the memory of the initial terms.

6.3 Stirling’s formula

Lemma 6.11 (Wallis integrals, revisited)

Let Wn=∫0π/2sin⁡nt  ⁣dtW_n = \int_0^{\pi/2} \sin^n t\,\dd t. Then nWnWn−1=π2nW_nW_{n-1} = \frac\pi2 for n≥1n \geq 1, (Wn)(W_n) decreases, and Wn∼π2nW_n \sim \sqrt{\dfrac{\pi}{2n}}.

Proof. Integration by parts gives nWn=(n−1)Wn−2nW_n = (n-1)W_{n-2} (n≥2n \geq 2), so nWnWn−1nW_nW_{n-1} is constant in nn, equal to 1⋅W1W0=π21 \cdot W_1 W_0 = \frac\pi2. Decrease: sin⁡n+1≤sin⁡n\sin^{n+1} \leq \sin^n on [0, π2]\intcc{0}{\frac\pi2}. The squeeze, in detail: monotonicity gives Wn+1≤Wn≤Wn−1W_{n+1} \leq W_n \leq W_{n-1}, and dividing by Wn−1>0W_{n-1} > 0,

nn+1=Wn+1Wn−1≤WnWn−1≤1,\frac{n}{n+1} = \frac{W_{n+1}}{W_{n-1}} \leq \frac{W_n}{W_{n-1}} \leq 1 ,

the left identity from the recurrence at index n+1n + 1. Both bounds tend to 11: Wn∼Wn−1W_n \sim W_{n-1}, whence

nWn2∼nWnWn−1=π2⟹Wn∼π2n.nW_n^2 \sim nW_nW_{n-1} = \frac\pi2 \qquad\Longrightarrow\qquad W_n \sim \sqrt{\frac{\pi}{2n}} .

∎

Example 6.12 (The first Wallis integrals)

From W0=π2W_0 = \frac\pi2, W1=1W_1 = 1 and the recurrence nWn=(n−1)Wn−2nW_n = (n-1)W_{n-2}:

W2=π4,W3=23,W4=3π16,W5=815,W6=5π32.W_2 = \frac\pi4, \qquad W_3 = \frac23, \qquad W_4 = \frac{3\pi}{16}, \qquad W_5 = \frac{8}{15}, \qquad W_6 = \frac{5\pi}{32}.

Even indices carry a π\pi, odd ones are rational — the two interleaved products of the closed forms. Numerically W6≈0.4909W_6 \approx 0.4909 against the asymptotic π/12≈0.5116\sqrt{\pi/12} \approx 0.5116: at n=6n = 6 the equivalent is already within 5%5\%, and the product identity is exact at every nn: 6 W6W5=6⋅5π32⋅815=π26\,W_6W_5 = 6\cdot\frac{5\pi}{32}\cdot\frac8{15} = \frac\pi2. Small tables like this one are the cheapest way to catch an algebra slip before it infects an asymptotic argument.

Theorem 6.13 (Stirling)

n!  ∼  2πn (ne) ⁣n.n! \;\sim\; \sqrt{2\pi n}\, \Bigl(\frac{n}{\eu}\Bigr)^{\!n} .

Proof. Step 1: n!∼Cn (n/e)nn! \sim C \sqrt n\, (n/\eu)^n for some constant C>0C > 0. Set

dn=ln⁡(n!)−(n+12)ln⁡n+n.d_n = \ln(n!) - \Bigl(n + \frac12\Bigr)\ln n + n .

Then

dn−dn+1=(n+12)ln⁡n+1n−1=(n+12)(1n−12n2+13n3+o(n−3))−1=112n2+o(1n2),d_n - d_{n+1} = \Bigl(n + \frac12\Bigr) \ln\frac{n+1}{n} - 1 = \Bigl(n + \frac12\Bigr)\Bigl(\frac1n - \frac{1}{2n^2} + \frac{1}{3n^3} + o\bigl(n^{-3}\bigr)\Bigr) - 1 = \frac{1}{12n^2} + o\Bigl(\frac{1}{n^2}\Bigr),

by the Taylor expansion of ln⁡(1+1n)\ln(1 + \frac1n). The series ∑(dn−dn+1)\sum (d_n - d_{n+1}) thus converges absolutely (comparison with ∑n−2\sum n^{-2}), so (dn)(d_n) converges, say to dd; exponentiating, n!∼Cn (n/e)nn! \sim C\sqrt n\,(n/\eu)^n with C=edC = \eu^{d}.

Step 2: C=2πC = \sqrt{2\pi} via Wallis. The closed form W2p=(2p)!4p(p!)2⋅π2W_{2p} = \frac{(2p)!}{4^p (p!)^2}\cdot\frac\pi2 (from the recurrence, Year 1 computation redone in Lemma 6.11’s setting) combines with Step 1:

W2p∼C2p (2p/e)2p4p (Cp (p/e)p)2⋅π2=2pC p⋅π2=πC⋅12p.W_{2p} \sim \frac{C\sqrt{2p}\,(2p/\eu)^{2p}} {4^p\,\bigl(C\sqrt p\,(p/\eu)^p\bigr)^2}\cdot\frac{\pi}{2} = \frac{\sqrt{2p}}{C\,p}\cdot\frac{\pi}{2} = \frac{\pi}{C}\cdot\frac{1}{\sqrt{2p}} .

Comparing with W2p∼π4pW_{2p} \sim \sqrt{\frac{\pi}{4p}} (Lemma 6.11): πC2p=π4p (1+o(1))\frac{\pi}{C\sqrt{2p}} = \sqrt{\frac{\pi}{4p}}\,(1 + o(1)) forces C=π4p2p π=2πC = \pi \sqrt{\frac{4p}{2p\,\pi}} = \sqrt{2\pi}. ∎

Example 6.14 (Central binomial coefficient)

(2nn)=(2n)!(n!)2∼4πn (2n/e)2n2πn (n/e)2n=4nπn:\binom{2n}{n} = \frac{(2n)!}{(n!)^2} \sim \frac{\sqrt{4\pi n}\,(2n/\eu)^{2n}}{2\pi n\,(n/\eu)^{2n}} = \frac{4^n}{\sqrt{\pi n}} :

the probability that a symmetric random walk returns to 00 at time 2n2n is ∼1πn\sim \frac{1}{\sqrt{\pi n}} — an announcement of Chapter 22.

Remark 6.15 (Perspectives within this volume)

Every quantitative chapter ahead speaks this chapter’s language. Chapter 7 classifies series by comparing terms to the scale n−α(ln⁡n)−βn^{-\alpha}(\ln n)^{-\beta} — its weekend problem maps that frontier completely. Chapter 9 does the same for improper integrals, with the identical scale in the continuous variable. Chapter 11 computes radii of convergence from lim sup⁡∣an∣1/n\limsup\abs{a_n}^{1/n}, an equivalent-of-nn-th-roots exercise where Stirling is the standard key (n!n∼ne\sqrt[n]{n!} \sim \frac n\eu, Exercise 6.4). And the probability chapters cash Stirling directly: the local estimates of Chapter 22 for binomial coefficients are Example 6.14 and Example 6.21 verbatim. Asymptotics is not a chapter here; it is the volume’s accent.

Method 6.16 (The bootstrap checklist)

Before trusting a bootstrapped expansion, audit four points. (1) Existence first: the root or sequence must be pinned down (monotonicity, intermediate values) before any expansion — symbols without referents expand beautifully and mean nothing. (2) One order per pass: each substitution may only be trusted to the order of the estimate fed in; extracting two new terms from one pass is the classic source of wrong coefficients. (3) Remainders ride along: carry the o(⋅)o(\cdot) through every algebraic step and let absorption (smaller terms swallowed by larger remainders) happen at the end, explicitly. (4) Numerical audit: evaluate at one honest value of nn; a coefficient error survives algebraic re-derivation surprisingly often, and almost never survives arithmetic.

Remark 6.17 (Common pitfalls)

(i) Equivalents add badly: from un∼n+ln⁡nu_n \sim n + \ln n and vn∼−nv_n \sim -n one may not conclude un+vn∼ln⁡nu_n + v_n \sim \ln n; cancellations demand expansions with explicit remainders, never bare equivalents. (ii) Never exponentiate an equivalence: n+1∼nn + 1 \sim n but en+1≁en\eu^{n+1} \not\sim \eu^n; the safe direction is taking logarithms of equivalents tending to +∞+\infty (this chapter’s weekend problem, question 24). (iii) An asymptotic expansion is attached to a scale: writing f=1x+o(1x2)f = \frac1x + o\bigl(\frac1{x^2}\bigr) claims more than f=1x+o(1x)f = \frac1x + o\bigl(\frac1x\bigr), and mixing the two invalidates subsequent algebra. (iv) In bootstraps, substitute the whole current expansion, remainder included — dropping an o(⋅)o(\cdot) mid-pass produces plausible but wrong coefficients. (v) The series–integral comparison needs monotonicity: for oscillating terms it fails outright (compare ∑sin⁡kk\sum\frac{\sin k}k, Chapter 7).

Example 6.18 (Stirling in numbers)

At n=10n = 10: the formula gives 20π (10/e)10≈3 598 696\sqrt{20\pi}\,(10/\eu)^{10} \approx 3\,598\,696 against 10!=3 628 80010! = 3\,628\,800: relative error 8.3⋅10−38.3\cdot10^{-3}, remarkable for an “asymptotic” statement at n=10n = 10. The error has a structure — the exact refinement n!=2πn (n/e)n(1+112n+O(n−2))n! = \sqrt{2\pi n}\,(n/\eu)^n\bigl(1 + \frac1{12n} + O(n^{-2})\bigr) — whose first correction 1120≈8.3⋅10−3\frac1{120} \approx 8.3\cdot10^{-3} explains the observed gap almost exactly. The weekend problem’s Euler–Maclaurin machinery is precisely the systematic source of such correction terms.

Remark 6.19 (Where this chapter is used)

Asymptotic comparison is the grammar of everything quantitative downstream: the convergence tests and Bertrand panorama of Chapter 7, the integrability criteria of Chapter 9, the radius-of-convergence computations of Chapter 11, and the limit theorems of Chapter 22 (where Stirling runs the de Moivre–Laplace estimates). The Year 3 volume industrializes the one idea we prove by hand here — extract the main term, bound the rest — into the Laplace method and dominated convergence.

Example 6.20 (An integral compared to itself: ∫2x ⁣dtln⁡t\int_2^x \frac{\dd t}{\ln t})

The comparison toolbox also runs on integrals. Let F(x)=∫2x ⁣dtln⁡tF(x) = \int_2^x\frac{\dd t}{\ln t} (the integrand is continuous on [2, ∞)\intco2\infty). Integrate by parts:

F(x)=[tln⁡t]2x+∫2x ⁣dt(ln⁡t)2=xln⁡x+O(∫2x ⁣dt(ln⁡t)2)+O(1),F(x) = \Bigl[\frac{t}{\ln t}\Bigr]_2^x + \int_2^x\frac{\dd t}{(\ln t)^2} = \frac{x}{\ln x} + O\Bigl(\int_2^x\frac{\dd t}{(\ln t)^2}\Bigr) + O(1),

and the remainder integral is o(xln⁡x)o\bigl(\frac{x}{\ln x}\bigr): split it at x\sqrt x, bounding by

∫2x ⁣dt(ln⁡t)2≤xand∫xx ⁣dt(ln⁡t)2≤x(ln⁡x)2=4x(ln⁡x)2.\int_2^{\sqrt x}\frac{\dd t}{(\ln t)^2} \leq \sqrt x \qquad\text{and}\qquad \int_{\sqrt x}^{x}\frac{\dd t}{(\ln t)^2} \leq \frac{x}{(\ln\sqrt x)^2} = \frac{4x}{(\ln x)^2} .

Hence F(x)∼xln⁡xF(x) \sim \frac{x}{\ln x}. Readers who met the prime number theorem in this chapter’s weekend problem will recognize FF: it is the logarithmic integral, the better estimator of π(x)\pi(x), and the computation shows it agrees with xln⁡x\frac{x}{\ln x} to first order.

Example 6.21 (Stirling on a lopsided binomial)

The same three-factorial routine as for Example 6.14 gives, for (3nn)=(3n)!n! (2n)!\binom{3n}{n} = \frac{(3n)!}{n!\,(2n)!}:

(3nn)∼6πn (3n/e)3n2πn (n/e)n⋅4πn (2n/e)2n=34πn (274) ⁣n.\binom{3n}{n} \sim \frac{\sqrt{6\pi n}\,(3n/\eu)^{3n}} {\sqrt{2\pi n}\,(n/\eu)^{n}\cdot\sqrt{4\pi n}\,(2n/\eu)^{2n}} = \sqrt{\frac{3}{4\pi n}}\, \Bigl(\frac{27}{4}\Bigr)^{\!n} .

The exponential rate 274=3322\frac{27}4 = \frac{3^3}{2^2} is e3n H(1/3)\eu^{3n\,H(1/3)} in the entropy notation of information theory: lopsided binomials grow strictly slower than the central 4n4^n per two steps — here (27/4)1/3≈1.89<2(27/4)^{1/3} \approx 1.89 < 2 per step. Every binomial asymptotic in combinatorics and probability (Chapter 22) is this one computation with different weights.

6.4 Implicitly defined sequences

Method 6.22

To find the asymptotics of solutions xnx_n of an equation F(x,n)=0F(x, n) = 0:

  1. Localize: prove existence and uniqueness of xnx_n in a definite interval (monotonicity, intermediate value theorem), and find its crude behavior (limit, order of growth).
  2. Bootstrap: substitute the crude form xn=(main term)(1+εn)x_n = (\text{main term})(1 + \varepsilon_n) into the equation and solve for the next order of εn\varepsilon_n; repeat, each pass refining one order.

Example 6.23

For n≥1n \geq 1, the equation tan⁡x=x\tan x = x has exactly one solution xnx_n in (nπ−π2, nπ+π2)\intoo{n\pi - \frac\pi2}{n\pi + \frac\pi2} (the function tan⁡x−x\tan x - x increases from −∞-\infty to +∞+\infty there, its derivative being tan⁡2x≥0\tan^2 x \geq 0). Crude: xn=nπ+π2−ynx_n = n\pi + \frac\pi2 - y_n with yn∈(0, π)y_n \in \intoo{0}{\pi}; since xn→∞x_n \to \infty and tan⁡xn=xn→+∞\tan x_n = x_n \to +\infty, xnx_n approaches the asymptote from the left: yn→0y_n \to 0. Bootstrap: tan⁡xn=cot⁡yn=1tan⁡yn∼1yn\tan x_n = \cot y_n = \frac{1}{\tan y_n} \sim \frac{1}{y_n}, and the equation cot⁡yn=xn∼nπ\cot y_n = x_n \sim n\pi gives yn∼1nπy_n \sim \frac{1}{n\pi}. Hence

xn=nπ+π2−1nπ+o(1n),x_n = n\pi + \frac\pi2 - \frac{1}{n\pi} + o\Bigl(\frac1n\Bigr),

and the process continues to any order (Exercise 6.6).

Example 6.24 (A second run of the method)

Solve x+ln⁡x=nx + \ln x = n asymptotically. Localize: x↦x+ln⁡xx \mapsto x + \ln x increases from −∞-\infty to +∞+\infty on (0, +∞)\intoo{0}{+\infty}: a unique root xnx_n, and xn→∞x_n \to \infty. Crude: ln⁡xn=o(xn)\ln x_n = o(x_n) gives xn∼nx_n \sim n. Bootstrap: from xn=n−ln⁡xnx_n = n - \ln x_n and ln⁡xn=ln⁡n+o(1)\ln x_n = \ln n + o(1) (logarithms of equivalents, both sides →∞\to \infty):

xn=n−ln⁡n+o(1);x_n = n - \ln n + o(1) ;

one more pass, with ln⁡xn=ln⁡(n−ln⁡n+o(1))=ln⁡n−ln⁡nn+o(ln⁡nn)\ln x_n = \ln\bigl(n - \ln n + o(1)\bigr) = \ln n - \frac{\ln n}{n} + o\bigl(\frac{\ln n}n\bigr):

xn=n−ln⁡n+ln⁡nn+o(ln⁡nn).x_n = n - \ln n + \frac{\ln n}{n} + o\Bigl(\frac{\ln n}{n}\Bigr).

(Check at n=100n = 100: the root is x≈95.4415x \approx 95.4415; the three-term formula gives 100−4.6052+0.0461=95.4409100 - 4.6052 + 0.0461 = 95.4409, the two-term one 95.394895.3948 — each pass gains the predicted order.) Same loop, third landscape: the method of Method 6.22 does not care what the equation looks like, only that each pass isolates the dominant unknown.

6.5 Exercises

Exercise 6.1 ★

Expand at +∞+\infty, two terms beyond the leading one:

x2+x+1,ln⁡(x2+x)−2ln⁡x,x+sin⁡xx−ln⁡x.\sqrt{x^2 + x + 1} , \qquad \ln(x^2 + x) - 2\ln x, \qquad \frac{x + \sin x}{x - \ln x} .
Solution

Solution of Exercise 6.1.

x2+x+1=x1+1x+1x2=x+12+38⋅1x+o(1x)\sqrt{x^2 + x + 1} = x\sqrt{1 + \tfrac1x + \tfrac{1}{x^2}} = x + \frac12 + \frac38\cdot\frac1x + o\bigl(\frac1x\bigr) (binomial expansion: 12u−18u2\frac12 u - \frac18 u^2 with u=1x+1x2u = \frac1x + \frac{1}{x^2} gives 12x+12x2−18x2=12x+38x2\frac{1}{2x} + \frac{1}{2x^2} - \frac{1}{8x^2} = \frac{1}{2x} + \frac{3}{8x^2}, then multiply by xx).

ln⁡(x2+x)−2ln⁡x=ln⁡(1+1x)=1x−12x2+o(1x2)\ln(x^2 + x) - 2\ln x = \ln\bigl(1 + \tfrac1x\bigr) = \frac1x - \frac{1}{2x^2} + o\bigl(\frac{1}{x^2}\bigr).

Third function: expand each factor,

x+sin⁡xx−ln⁡x=(1+sin⁡xx)(1+ln⁡xx+(ln⁡x)2x2+O((ln⁡x)3x3)).\frac{x + \sin x}{x - \ln x} = \Bigl(1 + \frac{\sin x}{x}\Bigr) \Bigl(1 + \frac{\ln x}{x} + \frac{(\ln x)^2}{x^2} + O\Bigl(\frac{(\ln x)^3}{x^3}\Bigr)\Bigr).

Order the contributions on the scale at +∞+\infty: ln⁡xx≫1x≥∣sin⁡xx∣≫(ln⁡x)2x2\frac{\ln x}{x} \gg \frac{1}{x} \geq \bigl|\frac{\sin x}{x}\bigr| \gg \frac{(\ln x)^2}{x^2}. The two terms after the leading 11 are therefore ln⁡xx\frac{\ln x}{x}, then the bounded-oscillation term sin⁡xx\frac{\sin x}{x}:

x+sin⁡xx−ln⁡x=1+ln⁡xx+sin⁡xx+O((ln⁡x)2x2).\frac{x + \sin x}{x - \ln x} = 1 + \frac{\ln x}{x} + \frac{\sin x}{x} + O\Bigl(\frac{(\ln x)^2}{x^2}\Bigr).

Exercise 6.2 ★

Give the nature (convergence/divergence) and, when divergent, the leading asymptotics of ∑k≤nkα\sum_{k \leq n} k^\alpha for α>−1\alpha > -1, α=−1\alpha = -1, α<−1\alpha < -1, via Theorem 6.6.

Solution

Solution of Exercise 6.2.

f(t)=tαf(t) = t^\alpha (t≥1t \geq 1).

α>−1\alpha > -1: divergence, and by Theorem 6.6 (2), ∑k≤nkα=nα+1α+1+C+o(1)\sum_{k\leq n} k^\alpha = \frac{n^{\alpha+1}}{\alpha+1} + C + o(1) if α<0\alpha < 0 (where ff decreases); for α≥0\alpha \geq 0 (ff increasing) the same bracketing with reversed inequalities gives ∑k≤nkα∼nα+1α+1\sum_{k \leq n} k^\alpha \sim \frac{n^{\alpha + 1}}{\alpha + 1}.

α=−1\alpha = -1: Hn=ln⁡n+γ+o(1)H_n = \ln n + \gamma + o(1) (Example 6.7).

α<−1\alpha < -1: convergence, with remainder ∑k>nkα∼nα+1−(α+1)\sum_{k > n} k^\alpha \sim \frac{n^{\alpha+1}}{-(\alpha+1)} by the bracketing (1) (both integral bounds are equivalent to that value).

Exercise 6.3 ★★

Prove Hn=ln⁡n+γ+12n+o(1n)H_n = \ln n + \gamma + \frac{1}{2n} + o\bigl(\frac1n\bigr). (Study vn=Hn−ln⁡n−γv_n = H_n - \ln n - \gamma: show vn−vn+1=12n2+O(n−3)v_n - v_{n+1} = \frac{1}{2n^2} + O(n^{-3}) and sum the tail, comparing with ∑k≥n12k2∼12n\sum_{k \geq n} \frac{1}{2k^2} \sim \frac{1}{2n} — Theorem 6.6 (1).)

Solution

Solution of Exercise 6.3.

Let vn=Hn−ln⁡n−γ→0v_n = H_n - \ln n - \gamma \to 0. Then

vn−vn+1=ln⁡n+1n−1n+1=(1n−12n2)−(1n−1n2)+O(1n3)=12n2+O(1n3),v_n - v_{n+1} = \ln\frac{n+1}{n} - \frac{1}{n+1} = \Bigl(\frac1n - \frac{1}{2n^2}\Bigr) - \Bigl(\frac1n - \frac{1}{n^2}\Bigr) + O\Bigl(\frac{1}{n^3}\Bigr) = \frac{1}{2n^2} + O\Bigl(\frac{1}{n^3}\Bigr),

using 1n+1=1n−1n2+O(n−3)\frac{1}{n+1} = \frac1n - \frac{1}{n^2} + O(n^{-3}). Since vn→0v_n \to 0, telescoping the tail:

vn=∑k≥n(vk−vk+1)=∑k≥n(12k2+O(k−3))=12n+O(1n2),v_n = \sum_{k \geq n} (v_k - v_{k+1}) = \sum_{k\geq n} \Bigl(\frac{1}{2k^2} + O(k^{-3})\Bigr) = \frac{1}{2n} + O\Bigl(\frac{1}{n^2}\Bigr),

by Theorem 6.6 (1) applied to t−2t^{-2} (remainder ∼1n\sim \frac1n, halved) and to t−3t^{-3}. Hence Hn=ln⁡n+γ+12n+o(1n)H_n = \ln n + \gamma + \frac{1}{2n} + o(\frac1n).

Exercise 6.4 ★★

Using Stirling, find equivalents of: (3n)!(n!)3\dfrac{(3n)!}{(n!)^3};   n!nn\;\dfrac{n!}{n^n};   n!n\;\sqrt[n]{n!} (as ne(1+o(1))\frac n\eu(1 + o(1)), made precise to two terms).

Solution

Solution of Exercise 6.4.

Stirling three times:

(3n)!(n!)3∼6πn (3n/e)3n(2πn)3/2 (n/e)3n=6  27 n2πn⋅12πn⋅2πn  =3 27n2πn.\frac{(3n)!}{(n!)^3} \sim \frac{\sqrt{6\pi n}\,(3n/\eu)^{3n}} {(2\pi n)^{3/2}\,(n/\eu)^{3n}} = \frac{\sqrt{6}\; 27^{\,n}}{2\pi n} \cdot \frac{1}{\sqrt{2\pi n}}\cdot\sqrt{2\pi n}\; = \frac{\sqrt3\,27^n}{2\pi n} .

(Carefully: 6πn(2πn)3/2=6(2πn)2πnπn=32πn\frac{\sqrt{6\pi n}}{(2\pi n)^{3/2}} = \frac{\sqrt6}{(2\pi n)\sqrt{2\pi n}}\sqrt{\pi n} = \frac{\sqrt3}{2\pi n}.)

n!nn∼2πn e−n\dfrac{n!}{n^n} \sim \sqrt{2\pi n}\,\eu^{-n}.

n!n=exp⁡(ln⁡n!n)\sqrt[n]{n!} = \exp\bigl(\frac{\ln n!}{n}\bigr) with ln⁡n!=nln⁡n−n+12ln⁡(2πn)+o(1)\ln n! = n\ln n - n + \frac12\ln(2\pi n) + o(1):

n!n=exp⁡(ln⁡n−1+ln⁡(2πn)2n+o(ln⁡nn))=ne(1+ln⁡(2πn)2n+o(ln⁡nn)).\sqrt[n]{n!} = \exp\Bigl(\ln n - 1 + \frac{\ln(2\pi n)}{2n} + o\Bigl(\frac{\ln n}{n}\Bigr)\Bigr) = \frac{n}{\eu}\Bigl(1 + \frac{\ln(2\pi n)}{2n} + o\Bigl(\frac{\ln n}{n}\Bigr)\Bigr).

Exercise 6.5 ★★

For n≥2n \geq 2, prove that xn+x=1x^n + x = 1 has a unique solution xn∈(0, 1)x_n \in \intoo{0}{1}, that xn→1x_n \to 1, and establish

xn=1−ln⁡nn+o(ln⁡nn).x_n = 1 - \frac{\ln n}{n} + o\Bigl(\frac{\ln n}{n}\Bigr).

(From xnn=1−xnx_n^n = 1 - x_n: take logarithms and bootstrap with xn=1−εnx_n = 1 - \varepsilon_n.)

Solution

Solution of Exercise 6.5.

g(x)=xn+x−1g(x) = x^n + x - 1 increases strictly on [0, 1]\intcc{0}{1} from −1-1 to 11: unique root xnx_n. Since xnn=1−xn∈(0, 1)x_n^n = 1 - x_n \in \intoo{0}{1}: if xn≤c<1x_n \leq c < 1 along a subsequence, then xnn≤cn→0x_n^n \leq c^n \to 0, so 1−xn→01 - x_n \to 0: contradiction with xn≤cx_n \leq c. Hence xn→1x_n \to 1.

Write xn=1−εnx_n = 1 - \varepsilon_n, εn→0+\varepsilon_n \to 0^+. The equation reads (1−εn)n=εn(1 - \varepsilon_n)^n = \varepsilon_n, i.e.

nln⁡(1−εn)=ln⁡εn⟹−nεn(1+o(1))=ln⁡εn.n\ln(1 - \varepsilon_n) = \ln \varepsilon_n \quad\Longrightarrow\quad -n\varepsilon_n\bigl(1 + o(1)\bigr) = \ln\varepsilon_n .

So nεn=−ln⁡εn (1+o(1))→+∞n\varepsilon_n = -\ln\varepsilon_n\,(1 + o(1)) \to +\infty, and taking logarithms again: ln⁡n+ln⁡εn=ln⁡(−ln⁡εn)+o(1)\ln n + \ln\varepsilon_n = \ln(-\ln\varepsilon_n) + o(1). Since ln⁡(−ln⁡εn)=o(ln⁡(1/εn))\ln(-\ln \varepsilon_n) = o(\ln(1/\varepsilon_n)), this gives ln⁡εn∼−ln⁡n\ln\varepsilon_n \sim -\ln n, whence εn=−ln⁡εnn(1+o(1))∼ln⁡nn\varepsilon_n = \frac{-\ln\varepsilon_n}{n}(1 + o(1)) \sim \frac{\ln n}{n}:

xn=1−ln⁡nn+o(ln⁡nn).x_n = 1 - \frac{\ln n}{n} + o\Bigl(\frac{\ln n}{n}\Bigr) .

Exercise 6.6 ★★

Push Example 6.23 one order further:

xn=nπ+π2−1nπ+12n2π+o(1n2).x_n = n\pi + \frac\pi2 - \frac{1}{n\pi} + \frac{1}{2n^2\pi} + o\Bigl(\frac{1}{n^2}\Bigr).

(Write cot⁡yn=xn\cot y_n = x_n exactly, expand cot⁡y=1y−y3+o(y)\cot y = \frac1y - \frac y3 + o(y) and xn=nπ(1+12n−… )x_n = n\pi(1 + \frac{1}{2n} - \dots), and identify.)

Solution

Solution of Exercise 6.6.

Exact relation: cot⁡yn=xn=nπ+π2−yn\cot y_n = x_n = n\pi + \frac\pi2 - y_n, with yn∼1nπy_n \sim \frac{1}{n\pi} (Example 6.23). Expand cot⁡y=1y−y3+O(y3)\cot y = \frac1y - \frac y3 + O(y^3):

1yn−yn3+O(yn3)=nπ+π2−yn⟹1yn=nπ+π2+O(1n),\frac{1}{y_n} - \frac{y_n}{3} + O(y_n^3) = n\pi + \frac\pi2 - y_n \quad\Longrightarrow\quad \frac{1}{y_n} = n\pi + \frac\pi2 + O\Bigl(\frac1n\Bigr),

(the terms −yn-y_n and −yn3-\frac{y_n}{3} are O(1n)O(\frac1n)). Invert:

yn=1nπ⋅11+12n+O(n−2)=1nπ(1−12n+O(1n2))=1nπ−12n2π+O(1n3).y_n = \frac{1}{n\pi}\cdot\frac{1}{1 + \frac{1}{2n} + O(n^{-2})} = \frac{1}{n\pi}\Bigl(1 - \frac{1}{2n} + O\Bigl(\frac{1}{n^2}\Bigr)\Bigr) = \frac{1}{n\pi} - \frac{1}{2n^2\pi} + O\Bigl(\frac{1}{n^3}\Bigr).

Hence

xn=nπ+π2−yn=nπ+π2−1nπ+12n2π+o(1n2).x_n = n\pi + \frac{\pi}{2} - y_n = n\pi + \frac\pi2 - \frac{1}{n\pi} + \frac{1}{2n^2\pi} + o\Bigl(\frac{1}{n^2}\Bigr).

Exercise 6.7 ★★

Determine lim⁡n→∞1n!∑k=0nk!\lim_{n\to\infty} \dfrac{1}{n!}\sum_{k=0}^{n} k! (bound the sum of all terms but the last two), and deduce the asymptotic expansion ∑k≤nk!=n!(1+1n+O(n−2))\sum_{k \leq n} k! = n!\bigl(1 + \frac1n + O(n^{-2})\bigr).

Solution

Solution of Exercise 6.7.

Split off the two largest terms:

∑k=0nk!=n!+(n−1)!+∑k≤n−2k!,∑k≤n−2k!≤(n−1) (n−2)!=(n−1)!.\sum_{k=0}^{n} k! = n! + (n-1)! + \sum_{k \leq n-2} k! , \qquad \sum_{k\leq n-2} k! \leq (n-1)\,(n-2)! = (n-1)! .

So 1≤1n!∑k!≤1+2n1 \leq \frac{1}{n!}\sum k! \leq 1 + \frac{2}{n}: the limit is 11. Refining: (n−1)!n!=1n\frac{(n-1)!}{n!} = \frac1n and the crude bound ∑k≤n−2k!≤(n−1)!\sum_{k \leq n-2}k! \leq (n-1)! can be sharpened the same way: ∑k≤n−2k!=(n−2)! (1+O(1n))=O(n!n2)\sum_{k\leq n-2} k! = (n-2)!\,(1 + O(\frac1n)) = O\bigl(\frac{n!}{n^2}\bigr). Hence

∑k=0nk!=n!(1+1n+O(1n2)).\sum_{k=0}^{n} k! = n!\Bigl(1 + \frac1n + O\Bigl(\frac{1}{n^2}\Bigr)\Bigr).

Exercise 6.8 ★★★

Let u0>0u_0 > 0 and un+1=un+1unu_{n+1} = u_n + \dfrac{1}{u_n}. Prove that un→∞u_n \to \infty, then that un∼2nu_n \sim \sqrt{2n} (study un2u_n^2: its increments are 2+un−22 + u_n^{-2}; sum), and refine:

un=2n(1+ln⁡n8n+o(ln⁡nn)).u_n = \sqrt{2n}\Bigl(1 + \frac{\ln n}{8n} + o\Bigl(\frac{\ln n}{n}\Bigr)\Bigr).

(From un2=2n+∑k<nuk−2+u02u_n^2 = 2n + \sum_{k<n} u_k^{-2} + u_0^2 and uk2∼2ku_k^2 \sim 2k: the sum is ∼12ln⁡n\sim \frac12\ln n by Theorem 6.6.)

Solution

Solution of Exercise 6.8.

(un)(u_n) increases; if bounded it would converge to ℓ\ell with ℓ=ℓ+1ℓ\ell = \ell + \frac1\ell: absurd. So un→∞u_n \to \infty.

Squares: un+12=un2+2+un−2u_{n+1}^2 = u_n^2 + 2 + u_n^{-2}, so

un2=u02+2n+∑k=0n−11uk2.u_n^2 = u_0^2 + 2n + \sum_{k=0}^{n-1} \frac{1}{u_k^2} .

The sum is o(n)o(n) (terms tend to 00, Cesàro), so un2∼2nu_n^2 \sim 2n and un∼2nu_n \sim \sqrt{2n}.

Refinement: 1uk2∼12k\frac{1}{u_k^2} \sim \frac{1}{2k}, so by comparison (Theorem 6.6, or equivalents of partial sums of positive series) ∑k<nuk−2∼12ln⁡n\sum_{k<n} u_k^{-2} \sim \frac12 \ln n. Hence

un2=2n+ln⁡n2 (1+o(1))+O(1)⟹un=2n1+ln⁡n4n+o(ln⁡nn)=2n(1+ln⁡n8n+o(ln⁡nn)).u_n^2 = 2n + \frac{\ln n}{2}\,(1 + o(1)) + O(1) \quad\Longrightarrow\quad u_n = \sqrt{2n}\sqrt{1 + \frac{\ln n}{4n} + o\Bigl(\frac{\ln n}{n}\Bigr)} = \sqrt{2n}\Bigl(1 + \frac{\ln n}{8n} + o\Bigl(\frac{\ln n}{n}\Bigr)\Bigr).

Exercise 6.9 ★★★

(A Riemann sum with a twist) Determine the asymptotic behavior of

Sn=∑k=1n1n+kln⁡n.S_n = \sum_{k=1}^{n} \frac{1}{n + k\ln n} .

(Factor nn: Sn=1n∑k(1+kln⁡nn)−1S_n = \frac1n\sum_k \bigl(1 + \frac{k\ln n}{n}\bigr)^{-1}; recognize a Riemann-type sum with a slowly varying parameter t=ln⁡nt = \ln n, compute ∫01 ⁣du1+tu=ln⁡(1+t)t\int_0^1 \frac{\dd u}{1 + tu} = \frac{\ln(1+t)}{t}, and conclude Sn∼ln⁡ln⁡nln⁡nS_n \sim \frac{\ln\ln n}{\ln n}.)

Solution

Solution of Exercise 6.9.

Factor nn and set t=ln⁡nt = \ln n:

Sn=1n∑k=1n11+t kn.S_n = \frac1n \sum_{k=1}^{n} \frac{1}{1 + t\,\frac kn} .

For fixed tt, the sum is a Riemann sum of u↦11+tuu \mapsto \frac{1}{1 + tu} on [0, 1]\intcc{0}{1}; the function is monotone in uu, so the Riemann sum is bracketed by the integral shifted by one mesh:

∫01 ⁣du1+tu−1n≤Sn≤∫01 ⁣du1+tu+1n\int_0^1 \frac{\dd u}{1 + tu} - \frac1n \leq S_n \leq \int_0^1 \frac{\dd u}{1 + tu} + \frac1n

(comparison of a monotone function’s Riemann sums with its integral, valid for each nn with its own t=ln⁡nt = \ln n). Now ∫01 ⁣du1+tu=ln⁡(1+t)t\int_0^1 \frac{\dd u}{1 + tu} = \frac{\ln(1 + t)}{t}, and 1n=o(ln⁡tt)\frac1n = o\bigl(\frac{\ln t}{t}\bigr): hence

Sn=ln⁡(1+ln⁡n)ln⁡n+O(1n)  ∼  ln⁡ln⁡nln⁡n.S_n = \frac{\ln(1 + \ln n)}{\ln n} + O\Bigl(\frac 1n\Bigr) \;\sim\; \frac{\ln\ln n}{\ln n} .

Exercise 6.10 ★

Prove the identity (ln⁡n)ln⁡n=nln⁡ln⁡n(\ln n)^{\ln n} = n^{\ln\ln n}, then rank the following in increasing o(⋅)o(\cdot) order at infinity, with proofs: n2n^2, (ln⁡n)ln⁡n(\ln n)^{\ln n}, 2n2^n, n!n!, nnn^n.

Solution

Solution of Exercise 6.10.

Identity: (ln⁡n)ln⁡n=eln⁡n ln⁡ln⁡n=(eln⁡n)ln⁡ln⁡n=nln⁡ln⁡n(\ln n)^{\ln n} = \eu^{\ln n\,\ln\ln n} = \bigl(\eu^{\ln n}\bigr)^{\ln\ln n} = n^{\ln\ln n}. Ranking: compare logarithms. ln⁡(n2)=2ln⁡n\ln(n^2) = 2\ln n; ln⁡((ln⁡n)ln⁡n)=ln⁡nln⁡ln⁡n\ln\bigl((\ln n)^{\ln n}\bigr) = \ln n\ln\ln n; ln⁡(2n)=nln⁡2\ln(2^n) = n\ln2; ln⁡(n!)=nln⁡n−n+O(ln⁡n)\ln(n!) = n\ln n - n + O(\ln n) (Stirling, or the cruder bracketing ln⁡n!∼nln⁡n\ln n! \sim n\ln n); ln⁡(nn)=nln⁡n\ln(n^n) = n\ln n. Since 2ln⁡n=o(ln⁡nln⁡ln⁡n)2\ln n = o(\ln n\ln\ln n), ln⁡nln⁡ln⁡n=o(n)\ln n\ln\ln n = o(n), nln⁡2=o(nln⁡n−n)n\ln 2 = o(n\ln n - n), and nln⁡n−n∼nln⁡nn \ln n - n \sim n\ln n but n!/nn→0n! / n^n \to 0 (the difference of logs is −n+O(ln⁡n)→−∞-n + O(\ln n) \to -\infty):

n2=o((ln⁡n)ln⁡n),(ln⁡n)ln⁡n=o(2n),2n=o(n!),n!=o(nn).n^2 = o\bigl((\ln n)^{\ln n}\bigr),\quad (\ln n)^{\ln n} = o(2^n),\quad 2^n = o(n!),\quad n! = o(n^n).

(For each step: the difference of logarithms tends to +∞+\infty, so the ratio tends to 00.)

Exercise 6.11 ★★

(Tail of ∑1/k2\sum 1/k^2, two terms) Using the exact telescoping ∑k>n1k(k+1)=1n+1\sum_{k > n} \frac{1}{k(k+1)} = \frac{1}{n+1} and the decomposition 1k2=1k(k+1)+1k2(k+1)\frac1{k^2} = \frac{1}{k(k+1)} + \frac{1}{k^2(k+1)}, prove

∑k>n1k2=1n−12n2+O(1n3).\sum_{k > n} \frac{1}{k^2} = \frac1n - \frac{1}{2n^2} + O\Bigl(\frac{1}{n^3}\Bigr).
Solution

Solution of Exercise 6.11.

Decompose 1k2=1k(k+1)+1k2(k+1)\frac1{k^2} = \frac1{k(k+1)} + \frac1{k^2(k+1)} and sum for k>nk > n:

∑k>n1k2=1n+1+∑k>n1k2(k+1),\sum_{k>n}\frac1{k^2} = \frac1{n+1} + \sum_{k>n}\frac{1}{k^2(k+1)} ,

the first sum telescoping exactly (1k(k+1)=1k−1k+1\frac1{k(k+1)} = \frac1k - \frac1{k+1}). For the second: 1k2(k+1)=1k3+O(1k4)\frac{1}{k^2(k+1)} = \frac1{k^3} + O\bigl(\frac1{k^4}\bigr) (since 1k2(k+1)−1k3=−1k3(k+1)\frac{1}{k^2(k+1)} - \frac1{k^3} = \frac{-1}{k^3(k+1)}), and by the integral comparison ∑k>n1k3=12n2+O(1n3)\sum_{k>n}\frac1{k^3} = \frac1{2n^2} + O\bigl(\frac1{n^3}\bigr), ∑k>n1k4=O(1n3)\sum_{k>n}\frac1{k^4} = O\bigl(\frac1{n^3}\bigr). Hence

∑k>n1k2=1n+1+12n2+O(1n3)=1n−1n2+12n2+O(1n3)=1n−12n2+O(1n3),\sum_{k>n}\frac1{k^2} = \frac1{n+1} + \frac{1}{2n^2} + O\Bigl(\frac1{n^3}\Bigr) = \frac1n - \frac1{n^2} + \frac{1}{2n^2} + O\Bigl(\frac1{n^3}\Bigr) = \frac1n - \frac{1}{2n^2} + O\Bigl(\frac1{n^3}\Bigr),

using 1n+1=1n−1n2+O(1n3)\frac1{n+1} = \frac1n - \frac1{n^2} + O\bigl(\frac1{n^3}\bigr).

Exercise 6.12 ★★★

Let u0=12u_0 = \frac12 and un+1=un+e−unu_{n+1} = u_n + \eu^{-u_n}. Prove that un→∞u_n \to \infty, then — setting vn=eunv_n = \eu^{u_n} and showing vn+1=vn+1+12vn+O(vn−2)v_{n+1} = v_n + 1 + \frac{1}{2v_n} + O\bigl(v_n^{-2}\bigr) — establish

un=ln⁡n+ln⁡n2n+O(1n).u_n = \ln n + \frac{\ln n}{2n} + O\Bigl(\frac1n\Bigr).
Solution

Solution of Exercise 6.12.

(un)(u_n) increases; if it were bounded it would converge to a finite ℓ\ell with ℓ=ℓ+e−ℓ\ell = \ell + \eu^{-\ell}: impossible. So un→∞u_n \to \infty. Let vn=eun→∞v_n = \eu^{u_n} \to \infty: then

vn+1=eun+e−un=vn e1/vn=vn(1+1vn+12vn2+O(vn−3))=vn+1+12vn+O(vn−2).v_{n+1} = \eu^{u_n + \eu^{-u_n}} = v_n\,\eu^{1/v_n} = v_n\Bigl(1 + \frac1{v_n} + \frac1{2v_n^2} + O\bigl(v_n^{-3}\bigr)\Bigr) = v_n + 1 + \frac{1}{2v_n} + O\bigl(v_n^{-2}\bigr).

Summing vk+1−vk=1+O(1)v_{k+1} - v_k = 1 + O(1) first gives vn=n+O(n)v_n = n + O(n), hence vn≥cnv_n \geq cn eventually; re-summing with 12vk=O(1k)\frac1{2v_k} = O(\frac1k) gives vn=n+O(ln⁡n)v_n = n + O(\ln n). One more pass: 12vk=12k(1+O(ln⁡kk))\frac{1}{2v_k} = \frac{1}{2k}\bigl(1 + O\bigl(\tfrac{\ln k}k\bigr)\bigr), so

vn=n+∑k<n12k+O(1)=n+ln⁡n2+O(1).v_n = n + \sum_{k<n}\frac1{2k} + O(1) = n + \frac{\ln n}2 + O(1).

Finally un=ln⁡vn=ln⁡n+ln⁡(1+ln⁡n2n+O(1n))=ln⁡n+ln⁡n2n+O(1n)u_n = \ln v_n = \ln n + \ln\Bigl(1 + \frac{\ln n}{2n} + O\bigl(\tfrac1n\bigr)\Bigr) = \ln n + \frac{\ln n}{2n} + O\bigl(\tfrac1n\bigr).

6.6 Problem: Bootstrapping, from Euler–Maclaurin to the Primes

An implicit or accumulated quantity rarely hands over its asymptotics at once; one extracts them in passes, each pass feeding the previous estimate back into the defining relation. This weekend problem trains that loop on fresh equations, proves the first-order Euler–Maclaurin formula (the trapezoid upgrade of the series–integral comparison, with rigorous error bars), inverts xln⁡x=nx\ln x = n, and cashes the method’s most famous cheque: from the admitted prime number theorem, the asymptotic law pn∼nln⁡np_n \sim n\ln n of the nn-th prime.

Problem 6.1

Weekend problem — the Euler–Maclaurin correction and the asymptotics of the nn-th prime

Part I — The bootstrap loop on a fresh equation.

  1. Prove the uniqueness claim of Definition 6.2: if f=∑i≤kciφi+o(φk)=∑i≤kci′φi+o(φk)f = \sum_{i\leq k} c_i\varphi_i + o(\varphi_k) = \sum_{i \leq k} c_i'\varphi_i + o(\varphi_k) along the same scale, then ci=ci′c_i = c_i' for all ii. Then push the course’s mixed example one rung further:

    1x−ln⁡x=1x+ln⁡xx2+(ln⁡x)2x3+o((ln⁡x)2x3)(x→+∞),\frac{1}{x - \ln x} = \frac1x + \frac{\ln x}{x^2} + \frac{(\ln x)^2}{x^3} + o\Bigl(\frac{(\ln x)^2}{x^3}\Bigr) \qquad (x \to +\infty),

    and explain why no term cx2\frac{c}{x^2} appears.

  2. Show that for every n≥1n \geq 1 the equation ex+x=n\eu^x + x = n has exactly one real solution xnx_n, and that xn→+∞x_n \to +\infty with xn∼ln⁡nx_n \sim \ln n.
  3. Bootstrap twice:

    xn=ln⁡n−ln⁡nn−(ln⁡n)22n2+o((ln⁡n)2n2).x_n = \ln n - \frac{\ln n}{n} - \frac{(\ln n)^2}{2n^2} + o\Bigl(\frac{(\ln n)^2}{n^2}\Bigr).
  4. Check numerically at n=1000n = 1000: compare x1000≈6.90083x_{1000} \approx 6.90083 with the one-, two- and three-term values of question 3, to five decimals.

Part II — Euler–Maclaurin, order one.

  1. Prove the trapezoid kernel identity: for gg of class C2C^2 on [0, 1]\intcc{0}{1},

    ∫01g(t)  ⁣dt=g(0)+g(1)2−12∫01t(1−t) g′′(t)  ⁣dt\int_0^1 g(t)\,\dd t = \frac{g(0) + g(1)}{2} - \frac12\int_0^1 t(1 - t)\,g''(t)\,\dd t

    (integrate 12t(1−t)g′′\frac12 t(1-t)g'' by parts twice).

  2. Let ff be C2C^2 on [1, +∞)\intco{1}{+\infty} with ∫1∞∣f′′∣<∞\int_1^\infty \abs{f''} < \infty. Show that

    En=∑k=1nf(k)−∫1nf−f(1)+f(n)2E_n = \sum_{k=1}^{n} f(k) - \int_1^n f - \frac{f(1) + f(n)}{2}

    converges to a constant EE, with the tail bound ∣E−En∣≤18∫n∞∣f′′∣\abs{E - E_n} \leq \frac18\int_n^\infty\abs{f''}: the Euler–Maclaurin formula to first order.

  3. Apply this to f(t)=1tf(t) = \frac1t: prove

    Hn=ln⁡n+γ+12n+εn,∣εn∣≤18n2,H_n = \ln n + \gamma + \frac{1}{2n} + \varepsilon_n, \qquad \abs{\varepsilon_n} \leq \frac{1}{8n^2},

    strengthening Exercise 6.3 (identify the constant with γ\gamma by comparing with Example 6.7).

  4. Extract the next coefficient: show εn=−112n2+o(1n2)\varepsilon_n = -\frac{1}{12n^2} + o\bigl(\frac1{n^2}\bigr) (the increments of EnE_n are 12∫01t(1−t)f′′(n+t) ⁣dt=112f′′(n)+o(f′′(n))\frac12\int_0^1t(1-t)f''(n+t)\dd t = \frac1{12}f''(n) + o(f''(n)); sum the tail with Theorem 6.6).
  5. Apply question 6 to f=ln⁡f = \ln: re-derive in three lines the convergence of dn=ln⁡n!−(n+12)ln⁡n+nd_n = \ln n! - (n + \frac12)\ln n + n (Step 1 of Theorem 6.13), with the bonus error rate dn=d+O(1n)d_n = d + O\bigl(\frac1n\bigr).
  6. Apply question 6 to f(t)=1tf(t) = \frac{1}{\sqrt t}: show

    ∑k=1n1k=2n+c+12n+O(1n3/2)\sum_{k=1}^{n}\frac1{\sqrt k} = 2\sqrt n + c + \frac{1}{2\sqrt n} + O\Bigl(\frac{1}{n^{3/2}}\Bigr)

    for some constant cc, and evaluate all terms at n=104n = 10^4 (the constant is c≈−1.4604c \approx -1.4604).

Part III — Inversion: the equation xln⁡x=nx\ln x = n.

  1. Show that xln⁡x=nx\ln x = n has exactly one solution xn∈[1, +∞)x_n \in \intco{1}{+\infty} for n≥1n \geq 1, that xn→∞x_n \to \infty, and that ln⁡xn∼ln⁡n\ln x_n \sim \ln n.
  2. Deduce the one-term inversion xn∼nln⁡nx_n \sim \dfrac{n}{\ln n}, then bootstrap once more:

    ln⁡xn=ln⁡n−ln⁡ln⁡n+o(1),xn=nln⁡n(1+ln⁡ln⁡nln⁡n+o(ln⁡ln⁡nln⁡n)).\ln x_n = \ln n - \ln\ln n + o(1), \qquad x_n = \frac{n}{\ln n}\Bigl(1 + \frac{\ln\ln n}{\ln n} + o\Bigl(\frac{\ln\ln n}{\ln n}\Bigr)\Bigr).
  3. Test at n=106n = 10^6: the true root is x≈87 848x \approx 87\,848; compare with the one-term (≈72 382\approx 72\,382) and two-term (≈86 140\approx 86\,140) values, and explain the slow gain (the expansion parameter is ln⁡ln⁡nln⁡n\frac{\ln\ln n}{\ln n}, only ≈0.19\approx 0.19 at n=106n = 10^6).
  4. We now admit the prime number theorem: the number π(x)\pi(x) of primes ≤x\leq x satisfies π(x)∼xln⁡x\pi(x) \sim \frac{x}{\ln x} as x→∞x \to \infty (proved honestly in the Year 3 volume). Writing pnp_n for the nn-th prime, justify π(pn)=n\pi(p_n) = n, and run the inversion of questions 11–12 to prove

    pn∼nln⁡n.p_n \sim n \ln n .
  5. Dividends: (a) show ∑k≤npk∼n2ln⁡n2\sum_{k \leq n} p_k \sim \frac{n^2\ln n}{2} (compare ∑kln⁡k\sum k\ln k with ∫tln⁡t  ⁣dt\int t\ln t\,\dd t); (b) compute the approximate chance that a uniformly random integer with 100100 digits is prime (ln⁡10100≈230.26\ln 10^{100} \approx 230.26: about one in 230230).

Part IV — The method exported: xtan⁡x=1x\tan x = 1.

  1. Show that for each n≥1n \geq 1 the equation tan⁡x=1x\tan x = \frac1x has exactly one solution xnx_n in (nπ,  nπ+π2)\intoo{n\pi}{\,n\pi + \frac\pi2}, and that zn=xn−nπ→0+z_n = x_n - n\pi \to 0^+.
  2. One term: zn∼1nπz_n \sim \dfrac{1}{n\pi}.
  3. Show that the expansion of znz_n has no cn2\frac{c}{n^2} term: zn=1nπ+O(1n3)z_n = \frac1{n\pi} + O\bigl(\frac{1}{n^3}\bigr).
  4. Three terms: using arctan⁡u=u−u33+O(u5)\arctan u = u - \frac{u^3}3 + O(u^5) and 1xn=1nπ−zn(nπ)2+O(n−3⋅zn2)\frac1{x_n} = \frac{1}{n\pi} - \frac{z_n}{(n\pi)^2} + O(n^{-3}\cdot z_n^2), prove

    xn=nπ+1nπ−43π3n3+o(1n3).x_n = n\pi + \frac{1}{n\pi} - \frac{4}{3\pi^3 n^3} + o\Bigl(\frac{1}{n^3}\Bigr).
  5. Check at n=3n = 3: true root x3≈9.5293344x_3 \approx 9.5293344; compare the one- and three-term values, and contrast in one sentence with the course’s tan⁡x=x\tan x = x (Example 6.23): where each sequence sits in its window, and why.

Part V — A dynamical bootstrap, rules of the game, synthesis.

  1. Let u0∈(0, π)u_0 \in \intoo{0}{\pi} and un+1=sin⁡unu_{n+1} = \sin u_n. Show un→0u_n \to 0 decreasingly, and compute the limit of 1un+12−1un2\dfrac{1}{u_{n+1}^2} - \dfrac{1}{u_n^2} (expand sin⁡−2\sin^{-2} via sin⁡u=u−u36+o(u3)\sin u = u - \frac{u^3}6 + o(u^3)).
  2. Deduce, via Cesàro means (Year 1 volume), the classic

    un∼3n.u_n \sim \sqrt{\frac{3}{n}} .
  3. (Certified numerics) Using question 7’s rigorous bound, show that evaluating ln⁡n+γ+12n\ln n + \gamma + \frac1{2n} at n=106n = 10^6 yields H106H_{10^6} with error at most 1.25⋅10−131.25\cdot10^{-13} — a million-term sum computed to thirteen digits by three terms.
  4. (Rules of the game) Prove or refute, with proofs or counterexamples: (a) if un∼vn→+∞u_n \sim v_n \to +\infty then ln⁡un∼ln⁡vn\ln u_n \sim \ln v_n; (b) if un∼vnu_n \sim v_n then eun∼evn\eu^{u_n} \sim \eu^{v_n}; (c) if f∼gf \sim g at +∞+\infty (f,gf, g differentiable) then f′∼g′f' \sim g'.
  5. (Synthesis) In one sentence each: the bootstrap loop of Method 6.22 as used in Parts I, III, IV; what the trapezoid correction adds to Theorem 6.6; why inversion of xln⁡xx\ln x is exactly the bridge from π(x)\pi(x) to pnp_n; and which of question 24’s rules protected which step. Name the two summits: the Euler–Maclaurin formula (first order), and the asymptotic law of the nn-th prime.
Solution

Solution of Problem 6.1.

1. Subtracting the two expansions: ∑i(ci−ci′)φi=o(φk)\sum_i (c_i - c_i')\varphi_i = o(\varphi_k). If some coefficient differs, let i0i_0 be the first: dividing by φi0\varphi_{i_0} and using φj=o(φi0)\varphi_j = o(\varphi_{i_0}) for j>i0j > i_0 gives ci0−ci0′=o(1)c_{i_0} - c_{i_0}' = o(1): zero, contradiction. For the expansion: with u=ln⁡xx→0u = \frac{\ln x}x \to 0,

1x−ln⁡x=1x⋅11−u=1x(1+u+u2+O(u3))=1x+ln⁡xx2+(ln⁡x)2x3+o((ln⁡x)2x3).\frac{1}{x - \ln x} = \frac1x\cdot\frac{1}{1 - u} = \frac1x\bigl(1 + u + u^2 + O(u^3)\bigr) = \frac1x + \frac{\ln x}{x^2} + \frac{(\ln x)^2}{x^3} + o\Bigl(\frac{(\ln x)^2}{x^3}\Bigr).

No cx2\frac c{x^2} term appears because the expansion is a geometric series in u=ln⁡xxu = \frac{\ln x}{x}: every term carries as many powers of ln⁡x\ln x as of 1x\frac1x beyond the first; the scale rung 1x2\frac1{x^2} (coefficient of (ln⁡x)0(\ln x)^0) is simply absent, with coefficient 00.

2. f(x)=ex+xf(x) = \eu^x + x is continuous, strictly increasing, with limits −∞-\infty and +∞+\infty: a bijection R→R\R \to \R, so xn=f−1(n)x_n = f^{-1}(n) exists and is unique, and xn→+∞x_n \to +\infty (f−1f^{-1} increases to +∞+\infty). From exn=n−xn\eu^{x_n} = n - x_n: xn=ln⁡(n−xn)≤ln⁡nx_n = \ln(n - x_n) \leq \ln n, so xn/n→0x_n/n \to 0 and xn=ln⁡n+ln⁡(1−xn/n)=ln⁡n+o(1)∼ln⁡nx_n = \ln n + \ln(1 - x_n/n) = \ln n + o(1) \sim \ln n.

3. Write un=xn/nu_n = x_n/n. Second pass: un=ln⁡n+o(1)nu_n = \frac{\ln n + o(1)}{n}, so

xn=ln⁡n+ln⁡(1−un)=ln⁡n−un+O(un2)=ln⁡n−ln⁡nn+o(ln⁡nn).x_n = \ln n + \ln(1 - u_n) = \ln n - u_n + O(u_n^2) = \ln n - \frac{\ln n}{n} + o\Bigl(\frac{\ln n}n\Bigr).

Third pass: now un=ln⁡nn−ln⁡nn2+o(ln⁡nn2)u_n = \frac{\ln n}{n} - \frac{\ln n}{n^2} + o\bigl(\frac{\ln n}{n^2}\bigr), and ln⁡(1−un)=−un−un22+O(un3)\ln(1 - u_n) = -u_n - \frac{u_n^2}2 + O(u_n^3):

xn=ln⁡n−ln⁡nn+ln⁡nn2−(ln⁡n)22n2+o((ln⁡n)2n2)=ln⁡n−ln⁡nn−(ln⁡n)22n2+o((ln⁡n)2n2),x_n = \ln n - \frac{\ln n}n + \frac{\ln n}{n^2} - \frac{(\ln n)^2}{2n^2} + o\Bigl(\frac{(\ln n)^2}{n^2}\Bigr) = \ln n - \frac{\ln n}{n} - \frac{(\ln n)^2}{2n^2} + o\Bigl(\frac{(\ln n)^2}{n^2}\Bigr),

the term ln⁡nn2\frac{\ln n}{n^2} being absorbed into o((ln⁡n)2n2)o\bigl(\frac{(\ln n)^2}{n^2}\bigr).

4. At n=1000n = 1000: ln⁡1000≈6.90776\ln 1000 \approx 6.90776 (error 7⋅10−37\cdot10^{-3}); two terms: 6.900856.90085 (error 2⋅10−52\cdot10^{-5}); three terms: 6.900826.90082 (error below 10−510^{-5}), against x1000≈6.90083x_{1000} \approx 6.90083. Each pass buys roughly the predicted factor ln⁡nn\frac{\ln n}{n}.

5. Two integrations by parts, starting from the right: with  ⁣d ⁣dt[12t(1−t)]=12−t\frac{\dd}{\dd t}\bigl[\tfrac12t(1-t)\bigr] = \tfrac12 - t and t(1−t)t(1-t) vanishing at both ends,

12∫01t(1−t)g′′(t) ⁣dt=−∫01(12−t)g′(t) ⁣dt=−[(12−t)g]01−∫01g=g(0)+g(1)2−∫01g.\frac12\int_0^1 t(1-t)g''(t)\dd t = -\int_0^1\Bigl(\frac12 - t\Bigr)g'(t)\dd t = -\Bigl[\Bigl(\frac12 - t\Bigr)g\Bigr]_0^1 - \int_0^1 g = \frac{g(0) + g(1)}2 - \int_0^1 g .

Rearranged, this is the stated identity.

6. Compute the increment, then apply question 5 to g(t)=f(n+t)g(t) = f(n + t):

En+1−En=f(n+1)−∫nn+1 ⁣f−f(n+1)−f(n)2=f(n)+f(n+1)2−∫nn+1 ⁣f=12∫01t(1−t)f′′(n+t) ⁣dt.\begin{align*} E_{n+1} - E_n &= f(n{+}1) - \int_n^{n+1}\!f - \frac{f(n{+}1) - f(n)}2 \\ &= \frac{f(n) + f(n{+}1)}2 - \int_n^{n+1}\!f = \frac12\int_0^1 t(1-t)f''(n+t)\dd t . \end{align*}

Since 0≤t(1−t)≤140 \leq t(1-t) \leq \frac14: ∣En+1−En∣≤18∫nn+1∣f′′∣\abs{E_{n+1} - E_n} \leq \frac18\int_n^{n+1}\abs{f''}, whose sum over nn converges by hypothesis: (En)(E_n) converges (absolutely summable increments) to some EE, with

∣E−En∣≤∑k≥n∣Ek+1−Ek∣≤18∫n∞∣f′′∣.\abs{E - E_n} \leq \sum_{k\geq n}\abs{E_{k+1} - E_k} \leq \frac18\int_n^\infty\abs{f''} .

7. f(t)=1tf(t) = \frac1t: f′′(t)=2t3f''(t) = \frac2{t^3}, ∫1∞∣f′′∣=1<∞\int_1^\infty\abs{f''} = 1 < \infty. Question 6:

Hn=ln⁡n+1+1n2+E+(En−E)=ln⁡n+(E+12)+12n+εn,H_n = \ln n + \frac{1 + \frac1n}{2} + E + (E_n - E) = \ln n + \Bigl(E + \frac12\Bigr) + \frac1{2n} + \varepsilon_n,

with ∣εn∣=∣En−E∣≤18∫n∞2 ⁣dtt3=18n2\abs{\varepsilon_n} = \abs{E_n - E} \leq \frac18\int_n^\infty\frac{2\dd t}{t^3} = \frac1{8n^2}. Comparing with Hn=ln⁡n+γ+o(1)H_n = \ln n + \gamma + o(1) (Example 6.7) identifies E+12=γE + \frac12 = \gamma.

8. From question 6’s increment formula,

εn=En−E=−∑k≥n12∫01t(1−t) 2  ⁣dt(k+t)3=−∑k≥n(1k3∫01t(1−t) ⁣dt+O(1k4)),\varepsilon_n = E_n - E = -\sum_{k\geq n}\frac12\int_0^1 t(1-t)\,\frac{2\,\dd t}{(k+t)^3} = -\sum_{k \geq n}\Bigl(\frac1{k^3}\int_0^1t(1-t)\dd t + O\Bigl(\frac1{k^4}\Bigr)\Bigr),

using 1(k+t)3=1k3+O(1k4)\frac{1}{(k+t)^3} = \frac1{k^3} + O\bigl(\frac1{k^4}\bigr) uniformly for t∈[0, 1]t \in \intcc01. With ∫01t(1−t)=16\int_0^1 t(1-t) = \frac16 and ∑k≥n1k3∼12n2\sum_{k\geq n}\frac1{k^3} \sim \frac{1}{2n^2} (Theorem 6.6):

εn=−16⋅12n2+o(1n2)=−112n2+o(1n2).\varepsilon_n = -\frac16\cdot\frac{1}{2n^2} + o\Bigl(\frac1{n^2}\Bigr) = -\frac{1}{12n^2} + o\Bigl(\frac{1}{n^2}\Bigr).

9. f=ln⁡f = \ln: f′′(t)=−1t2f''(t) = -\frac1{t^2}, absolutely integrable. Question 6 gives

ln⁡n!=∫1nln⁡t  ⁣dt+ln⁡n2+E+O(18∫n∞ ⁣dtt2)=(n+12)ln⁡n−n+1+E+O(1n),\ln n! = \int_1^n\ln t\,\dd t + \frac{\ln n}2 + E + O\Bigl( \frac1{8}\int_n^\infty\frac{\dd t}{t^2}\Bigr) = \Bigl(n + \frac12\Bigr)\ln n - n + 1 + E + O\Bigl(\frac1n\Bigr),

so dn=1+E+O(1n)d_n = 1 + E + O\bigl(\frac1n\bigr): convergence of (dn)(d_n) — Step 1 of Theorem 6.13 — plus the rate O(1/n)O(1/n). (Stirling’s value of the limit gives E=ln⁡2π−1E = \ln\sqrt{2\pi} - 1.)

10. f(t)=t−1/2f(t) = t^{-1/2}: f′′(t)=34t−5/2f''(t) = \frac34 t^{-5/2}, absolutely integrable. Question 6:

∑k=1n1k=2n−2+1+1n2+E+O(n−3/2)=2n+c+12n+O(n−3/2),\sum_{k=1}^n \frac1{\sqrt k} = 2\sqrt n - 2 + \frac{1 + \frac1{\sqrt n}}2 + E + O\bigl(n^{-3/2}\bigr) = 2\sqrt n + c + \frac{1}{2\sqrt n} + O\bigl(n^{-3/2}\bigr),

with c=E−32c = E - \frac32. At n=104n = 10^4: 2n=2002\sqrt n = 200, c≈−1.46035c \approx -1.46035, 12n=0.005\frac1{2\sqrt n} = 0.005: predicted 198.54465198.54465, and indeed ∑k≤104k−1/2=198.544645…\sum_{k\leq10^4}k^{-1/2} = 198.544645\dots — three terms, seven digits.

11. t↦tln⁡tt \mapsto t\ln t is continuous and strictly increasing on [1, ∞)\intco1\infty (derivative ln⁡t+1≥1\ln t + 1 \geq 1), from 00 to +∞+\infty: a unique xnx_n exists, and xn→∞x_n \to \infty (else xnln⁡xnx_n\ln x_n would stay bounded). Taking logarithms in xnln⁡xn=nx_n\ln x_n = n: ln⁡xn+ln⁡ln⁡xn=ln⁡n\ln x_n + \ln\ln x_n = \ln n; since ln⁡ln⁡xn=o(ln⁡xn)\ln\ln x_n = o(\ln x_n), dividing by ln⁡xn\ln x_n gives ln⁡nln⁡xn→1\frac{\ln n}{\ln x_n} \to 1: ln⁡xn∼ln⁡n\ln x_n \sim \ln n.

12. From xn=nln⁡xnx_n = \frac{n}{\ln x_n} and ln⁡xn∼ln⁡n\ln x_n \sim \ln n: xn∼nln⁡nx_n \sim \frac{n}{\ln n}. Next pass: ln⁡ln⁡xn=ln⁡(ln⁡n (1+o(1)))=ln⁡ln⁡n+o(1)\ln\ln x_n = \ln\bigl(\ln n\,(1 + o(1))\bigr) = \ln\ln n + o(1), so ln⁡xn=ln⁡n−ln⁡ln⁡n+o(1)\ln x_n = \ln n - \ln\ln n + o(1) and

xn=nln⁡n−ln⁡ln⁡n+o(1)=nln⁡n⋅11−ln⁡ln⁡n+o(1)ln⁡n=nln⁡n(1+ln⁡ln⁡nln⁡n+o(ln⁡ln⁡nln⁡n)).x_n = \frac{n}{\ln n - \ln\ln n + o(1)} = \frac{n}{\ln n}\cdot\frac{1}{1 - \frac{\ln\ln n + o(1)}{\ln n}} = \frac{n}{\ln n}\Bigl(1 + \frac{\ln\ln n}{\ln n} + o\Bigl(\frac{\ln\ln n}{\ln n}\Bigr)\Bigr).

13. At n=106n = 10^6: nln⁡n≈72 382\frac{n}{\ln n} \approx 72\,382 (off by 18%18\%), two terms give ≈86 140\approx 86\,140 (off by 1.9%1.9\%), against the true x≈87 848x \approx 87\,848. The gain per pass is only the factor ln⁡ln⁡nln⁡n≈2.6313.8≈0.19\frac{\ln\ln n}{\ln n} \approx \frac{2.63}{13.8} \approx 0.19: logarithmic scales converge with maddening slowness — a fact of life wherever primes are involved.

14. There are exactly nn primes ≤pn\leq p_n (namely p1,…,pnp_1, \dots, p_n): π(pn)=n\pi(p_n) = n. The prime number theorem (admitted; Year 3 volume) gives n=π(pn)∼pnln⁡pnn = \pi(p_n) \sim \frac{p_n}{\ln p_n}, i.e. pn∼nln⁡pnp_n \sim n\ln p_n: this is the equation xln⁡x≈nx\ln x \approx n read backwards. Taking logarithms: ln⁡pn=ln⁡n+ln⁡ln⁡pn+o(1)\ln p_n = \ln n + \ln\ln p_n + o(1), and ln⁡ln⁡pn=o(ln⁡pn)\ln\ln p_n = o(\ln p_n) forces ln⁡pn∼ln⁡n\ln p_n \sim \ln n as in question 11. Substituting back:

pn∼nln⁡pn=n ln⁡n ln⁡pnln⁡n∼nln⁡n.p_n \sim n\ln p_n = n\,\ln n\,\frac{\ln p_n}{\ln n} \sim n\ln n .

15. (a) Fix ε>0\varepsilon > 0; for kk large, (1−ε)kln⁡k≤pk≤(1+ε)kln⁡k(1 - \varepsilon)k\ln k \leq p_k \leq (1 + \varepsilon)k\ln k. By comparison with the increasing tln⁡tt\ln t (Theorem 6.6-type bracketing), ∑k≤nkln⁡k=∫1ntln⁡t  ⁣dt+O(nln⁡n)=n2ln⁡n2−n24+O(nln⁡n)∼n2ln⁡n2\sum_{k\leq n}k\ln k = \int_1^n t\ln t\,\dd t + O(n\ln n) = \frac{n^2\ln n}2 - \frac{n^2}4 + O(n\ln n) \sim \frac{n^2\ln n}2. Hence ∑k≤npk=n2ln⁡n2(1+O(ε)+o(1))\sum_{k\leq n}p_k = \frac{n^2\ln n}{2}(1 + O(\varepsilon) + o(1)) for every ε\varepsilon: ∑k≤npk∼n2ln⁡n2\sum_{k\leq n}p_k \sim \frac{n^2\ln n}2. (b) By the prime number theorem, among the integers up to 1010010^{100} a proportion ∼1ln⁡10100=1230.26…\sim \frac{1}{\ln 10^{100}} = \frac1{230.26\dots} are prime: a uniformly random 100100-digit integer is prime with probability about 1230\frac1{230}.

16. On (nπ, nπ+π2)\intoo{n\pi}{n\pi + \frac\pi2}, g(x)=tan⁡x−1xg(x) = \tan x - \frac1x is continuous and strictly increasing (g′=1+tan⁡2x+1x2>0g' = 1 + \tan^2x + \frac1{x^2} > 0), with g→−1nπ<0g \to -\frac1{n\pi} < 0 at the left end and g→+∞g \to +\infty at the right: exactly one root xnx_n. Since tan⁡zn=tan⁡xn=1xn→0\tan z_n = \tan x_n = \frac1{x_n} \to 0 with zn∈(0, π2)z_n \in \intoo{0}{\frac\pi2}: zn→0+z_n \to 0^+.

17. tan⁡zn∼zn\tan z_n \sim z_n and 1xn∼1nπ\frac1{x_n} \sim \frac1{n\pi}: zn∼1nπz_n \sim \frac1{n\pi}.

18. zn=arctan⁡1xnz_n = \arctan\frac1{x_n} and arctan⁡u=u+O(u3)\arctan u = u + O(u^3). With zn=O(1n)z_n = O(\frac1n):

1xn=1nπ⋅11+znnπ=1nπ−znn2π2+O(1n4)=1nπ+O(1n3),\frac1{x_n} = \frac{1}{n\pi}\cdot\frac1{1 + \frac{z_n}{n\pi}} = \frac1{n\pi} - \frac{z_n}{n^2\pi^2} + O\Bigl(\frac1{n^4}\Bigr) = \frac1{n\pi} + O\Bigl(\frac1{n^3}\Bigr),

so zn=1nπ+O(1n3)z_n = \frac1{n\pi} + O\bigl(\frac1{n^3}\bigr): the cn2\frac{c}{n^2} rung carries coefficient 00, because the first correction to 1xn\frac1{x_n} is itself of size znn2=O(n−3)\frac{z_n}{n^2} = O(n^{-3}).

19. Insert zn=1nπ+O(n−3)z_n = \frac1{n\pi} + O(n^{-3}) into the previous display:

1xn=1nπ−1n3π3+O(1n5),\frac{1}{x_n} = \frac{1}{n\pi} - \frac{1}{n^3\pi^3} + O\Bigl(\frac1{n^5}\Bigr),

then zn=arctan⁡1xn=1xn−13(1xn)3+O(1n5)=1nπ−1n3π3−13n3π3+O(1n5)z_n = \arctan\frac1{x_n} = \frac1{x_n} - \frac{1}{3}\Bigl(\frac1{x_n}\Bigr)^3 + O\Bigl(\frac1{n^5}\Bigr) = \frac1{n\pi} - \frac{1}{n^3\pi^3} - \frac{1}{3n^3\pi^3} + O\Bigl(\frac1{n^5}\Bigr):

xn=nπ+1nπ−43π3n3+O(1n5).x_n = n\pi + \frac{1}{n\pi} - \frac{4}{3\pi^3n^3} + O\Bigl(\frac1{n^5}\Bigr).

20. At n=3n = 3: one term 9.530889.53088, three terms 9.529299.52929, true root 9.529339.52933: errors 1.5⋅10−31.5\cdot10^{-3} and 5⋅10−55\cdot10^{-5}. Contrast: for tan⁡x=x\tan x = x the root must make tan⁡\tan huge, so it hugs the right end nπ+π2n\pi + \frac\pi2 of the window, at distance ∼1nπ\sim\frac1{n\pi} before the asymptote; for xtan⁡x=1x\tan x = 1 the root must make tan⁡\tan tiny, so it sits just past the left end nπn\pi, at distance ∼1nπ\sim\frac1{n\pi} after the zero. Same method, mirror geography.

21. sin⁡u<u\sin u < u on (0, π)\intoo0\pi and sin⁡\sin maps (0, π)\intoo0\pi into (0, 1]⊆(0, π)\intoc01 \subseteq \intoo0\pi: after one step u1∈(0, 1]u_1 \in \intoc{0}{1}, then (un)(u_n) decreases and is bounded below by 00: it converges to a fixed point of sin⁡\sin, i.e. to 00. Expansion: sin⁡u=u(1−u26+o(u2))\sin u = u(1 - \frac{u^2}6 + o(u^2)), so

1un+12−1un2=1un2((1−un26+o(un2))−2−1)=1un2(un23+o(un2))⟶13.\frac{1}{u_{n+1}^2} - \frac1{u_n^2} = \frac{1}{u_n^2}\Bigl(\bigl(1 - \tfrac{u_n^2}6 + o(u_n^2)\bigr)^{-2} - 1\Bigr) = \frac{1}{u_n^2}\Bigl(\frac{u_n^2}{3} + o(u_n^2)\Bigr) \longrightarrow \frac13 .

22. By Cesàro (Year 1 volume), the mean of the increments converges to the same limit:

1n⋅1un2=1n(1u02+∑k=0n−1(1uk+12−1uk2))⟶13,\frac{1}{n}\cdot\frac{1}{u_n^2} = \frac1n\Bigl(\frac1{u_0^2} + \sum_{k=0}^{n-1} \Bigl(\frac1{u_{k+1}^2} - \frac1{u_k^2}\Bigr)\Bigr) \longrightarrow \frac13 ,

so un2∼3nu_n^2 \sim \frac3n and, all terms being positive, un∼3/nu_n \sim \sqrt{3/n}.

23. By question 7, ∣Hn−ln⁡n−γ−12n∣≤18n2\abs{H_n - \ln n - \gamma - \frac1{2n}} \leq \frac1{8n^2}. At n=106n = 10^6 this bound is 18⋅1012=1.25⋅10−13\frac{1}{8\cdot10^{12}} = 1.25\cdot10^{-13}: three computed terms deliver the million-term harmonic sum to thirteen digits, with a fully rigorous error certificate — the whole point of an asymptotic formula with explicit remainder.

24. (a) True: ln⁡un−ln⁡vn=ln⁡unvn→0\ln u_n - \ln v_n = \ln\frac{u_n}{v_n} \to 0 while ln⁡vn→+∞\ln v_n \to +\infty, so the ratio of logarithms tends to 11. (b) False: un=n+1∼vn=nu_n = n + 1 \sim v_n = n, but eun/evn=e≠1\eu^{u_n}/\eu^{v_n} = \eu \neq 1. Equivalence tolerates additive errors o(1)o(1) in the exponent, not O(1)O(1). (c) False: f(x)=x+sin⁡(x2)∼g(x)=xf(x) = x + \sin(x^2) \sim g(x) = x at +∞+\infty, but f′(x)=1+2xcos⁡(x2)f'(x) = 1 + 2x\cos(x^2) oscillates unboundedly while g′=1g' = 1: derivatives of equivalent functions need not be comparable at all.

25. The loop of Method 6.22 ran identically three times: localize the root, extract a crude term, feed it back for the next order — on ex+x=n\eu^x + x = n (Part I), on xln⁡x=nx\ln x = n (Part III), on xtan⁡x=1x\tan x = 1 (Part IV). The trapezoid correction upgrades the series–integral comparison from “the difference converges” to an explicit f(1)+f(n)2\frac{f(1) + f(n)}2 term with a certified O(∫n∞∣f′′∣)O(\int_n^\infty \abs{f''}) remainder — constants and error bars instead of mere convergence. The bridge to primes is pure inversion: the prime number theorem says π(x)ln⁡x≈x\pi(x)\ln x \approx x, so pnp_n, defined by π(pn)=n\pi(p_n) = n, solves an xln⁡x=nx\ln x = n equation — and inherits its asymptotics. Rule (a) of question 24 legitimized every passage from un∼vnu_n \sim v_n to ln⁡un∼ln⁡vn\ln u_n \sim \ln v_n (questions 11, 14); the falsity of (b) is why we never exponentiate equivalences. Summits: the Euler–Maclaurin formula to first order (question 6), and the asymptotic law pn∼nln⁡np_n \sim n\ln n of the nn-th prime (question 14).

Terms defined in this chapter

See all 395 terms in the glossary