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 (aRa \in \R or ±\pm\infty), for functions (or sequences, with nn \to \infty): f=o(g)f = o(g), f=O(g)f = O(g), fgf \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α(lnx)β(α,β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=limf/φ1c_1 = \lim f/\varphi_1, and inductively ci+1=lim(fjicjφ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 (xa)k(x - a)^k at aa. But the notion is strictly wider: at ++\infty,

1xlnx=1x11lnxx=1x+lnxx2+o(lnxx2),\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α(lnx)βx^{\alpha}(\ln x)^{\beta} and xα(lnx)βx^{\alpha'}(\ln x)^{\beta'} at ++\infty. If α<α\alpha < \alpha': the ratio is xαα(lnx)ββ0x^{\alpha - \alpha'}(\ln x)^{\beta - \beta'} \to 0, because a negative power of xx crushes any power of lnx\ln x (set x=etx = \eu^t: e(αα)ttββ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 (lnx)ββ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}, elnnn\eu^{\sqrt{\ln n}\,\cdot\,\sqrt n}, 2n2^n and nlnnn^{\ln n} by taking logarithms:

10lnn    (lnn)2    nlnn    nln2,10\ln n \;\ll\; (\ln n)^2 \;\ll\; \sqrt{n\ln n} \;\ll\; n\ln 2 ,

where anbna_n \ll b_n means an=o(bn)a_n = o(b_n); the second entry is ln(nlnn)\ln(n^{\ln n}). Exponentials preserve these strict gaps (if lnunlnvn\ln u_n - \ln v_n \to -\infty then un/vn0u_n/v_n \to 0), so

n10=o(nlnn),nlnn=o(enlnn),enlnn=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 unvnu_n \sim v_n from lnunlnvn\ln u_n \sim \ln v_n — the pair n10n^{10} and nlnnn^{\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 1f\int_1^{\infty} f converges, the remainders satisfy

    n+1f    k>nf(k)    nf.\int_{n+1}^{\infty} f \;\leq\; \sum_{k > n} f(k) \;\leq\; \int_{n}^{\infty} f .
  2. If 1f\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 knf(k)1nf\sum_{k \leq n} f(k) - \int_1^n f converges.

Proof. The bracketing f(k+1)kk+1ff(k)f(k+1) \leq \int_k^{k+1} f \leq f(k) (decrease) was the Year 1 device; summing over kn+1k \geq n+1, resp. knk \geq n, gives (1). For (2), set uk=f(k)kk+1fu_k = f(k) - \int_k^{k+1} f: by the bracketing, 0ukf(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 nn \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=lnn+γ+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=lnn+γ+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.928968H_{10} = 2.928968\dots and ln10=2.302585\ln 10 = 2.302585\dots, so the raw estimate of γ\gamma is H10ln10=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.31048.3\cdot10^{-4} — which is itself the next term 112100\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,

k1klnt ⁣dt    lnk    kk+1lnt ⁣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=nlnnn+1\int_1^n\ln = n\ln n - n + 1):

nlnnn+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 nlnnn+O(lnn)n\ln n - n + O(\ln n): hence ln(n!)=nlnnn+O(lnn)\ln(n!) = n\ln n - n + O(\ln n), and in particular ln(n!)nlnn\ln(n!) \sim n\ln n. What Stirling adds is the next two rungs — the 12lnn\frac12\ln n and the constant ln2π\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+nn\sqrt{n^2 + n} - n. Both terms are n\sim n, and “nn\sim n - n” is meaningless: equivalents cannot be subtracted. Expand instead:

n2+nn=n(1+1n1)=n(12n18n2+O(1n3))=1218n+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)=1tlntf(t) = \frac{1}{t\ln t} on [2,+)\intco{2}{+\infty} (continuous, positive, decreasing): 2xf=lnlnxlnln2\int_2^x f = \ln\ln x - \ln\ln 2 \to \infty, so by Theorem 6.6 (2),

k=2n1klnk=lnlnn+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 nee4Cn \approx \eu^{\eu^{4 - C}}, astronomically large. Second, the shape lnlnn\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π/2sinnt ⁣dtW_n = \int_0^{\pi/2} \sin^n t\,\dd t. Then nWnWn1=π2nW_nW_{n-1} = \frac\pi2 for n1n \geq 1, (Wn)(W_n) decreases, and Wnπ2nW_n \sim \sqrt{\dfrac{\pi}{2n}}.

Proof. Integration by parts gives nWn=(n1)Wn2nW_n = (n-1)W_{n-2} (n2n \geq 2), so nWnWn1nW_nW_{n-1} is constant in nn, equal to 1W1W0=π21 \cdot W_1 W_0 = \frac\pi2. Decrease: sinn+1sinn\sin^{n+1} \leq \sin^n on [0,π2]\intcc{0}{\frac\pi2}. The squeeze, in detail: monotonicity gives Wn+1WnWn1W_{n+1} \leq W_n \leq W_{n-1}, and dividing by Wn1>0W_{n-1} > 0,

nn+1=Wn+1Wn1WnWn11,\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: WnWn1W_n \sim W_{n-1}, whence

nWn2nWnWn1=π2Wnπ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=(n1)Wn2nW_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 W60.4909W_6 \approx 0.4909 against the asymptotic π/120.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: 6W6W5=65π32815=π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)lnn+n.d_n = \ln(n!) - \Bigl(n + \frac12\Bigr)\ln n + n .

Then

dndn+1=(n+12)lnn+1n1=(n+12)(1n12n2+13n3+o(n3))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 (dndn+1)\sum (d_n - d_{n+1}) thus converges absolutely (comparison with n2\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:

W2pC2p(2p/e)2p4p(Cp(p/e)p)2π2=2pCpπ2=πC12p.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!)24π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α(lnn)β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 supan1/n\limsup\abs{a_n}^{1/n}, an equivalent-of-nn-th-roots exercise where Stirling is the standard key (n!nne\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 unn+lnnu_n \sim n + \ln n and vnnv_n \sim -n one may not conclude un+vnlnnu_n + v_n \sim \ln n; cancellations demand expansions with explicit remainders, never bare equivalents. (ii) Never exponentiate an equivalence: n+1nn + 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 sinkk\sum\frac{\sin k}k, Chapter 7).

Example 6.18 (Stirling in numbers)

At n=10n = 10: the formula gives 20π(10/e)103598696\sqrt{20\pi}\,(10/\eu)^{10} \approx 3\,598\,696 against 10!=362880010! = 3\,628\,800: relative error 8.31038.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(n2))n! = \sqrt{2\pi n}\,(n/\eu)^n\bigl(1 + \frac1{12n} + O(n^{-2})\bigr) — whose first correction 11208.3103\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 ⁣dtlnt\int_2^x \frac{\dd t}{\ln t})

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

F(x)=[tlnt]2x+2x ⁣dt(lnt)2=xlnx+O(2x ⁣dt(lnt)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(xlnx)o\bigl(\frac{x}{\ln x}\bigr): split it at x\sqrt x, bounding by

2x ⁣dt(lnt)2xandxx ⁣dt(lnt)2x(lnx)2=4x(lnx)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)xlnxF(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 xlnx\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)n4π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 e3nH(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/31.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 n1n \geq 1, the equation tanx=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 tanxx\tan x - x increases from -\infty to ++\infty there, its derivative being tan2x0\tan^2 x \geq 0). Crude: xn=nπ+π2ynx_n = n\pi + \frac\pi2 - y_n with yn(0,π)y_n \in \intoo{0}{\pi}; since xnx_n \to \infty and tanxn=xn+\tan x_n = x_n \to +\infty, xnx_n approaches the asymptote from the left: yn0y_n \to 0. Bootstrap: tanxn=cotyn=1tanyn1yn\tan x_n = \cot y_n = \frac{1}{\tan y_n} \sim \frac{1}{y_n}, and the equation cotyn=xnnπ\cot y_n = x_n \sim n\pi gives yn1nπy_n \sim \frac{1}{n\pi}. Hence

xn=nπ+π21nπ+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+lnx=nx + \ln x = n asymptotically. Localize: xx+lnxx \mapsto x + \ln x increases from -\infty to ++\infty on (0,+)\intoo{0}{+\infty}: a unique root xnx_n, and xnx_n \to \infty. Crude: lnxn=o(xn)\ln x_n = o(x_n) gives xnnx_n \sim n. Bootstrap: from xn=nlnxnx_n = n - \ln x_n and lnxn=lnn+o(1)\ln x_n = \ln n + o(1) (logarithms of equivalents, both sides \to \infty):

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

one more pass, with lnxn=ln(nlnn+o(1))=lnnlnnn+o(lnnn)\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=nlnn+lnnn+o(lnnn).x_n = n - \ln n + \frac{\ln n}{n} + o\Bigl(\frac{\ln n}{n}\Bigr).

(Check at n=100n = 100: the root is x95.4415x \approx 95.4415; the three-term formula gives 1004.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)2lnx,x+sinxxlnx.\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+381x+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: 12u18u2\frac12 u - \frac18 u^2 with u=1x+1x2u = \frac1x + \frac{1}{x^2} gives 12x+12x218x2=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)2lnx=ln(1+1x)=1x12x2+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+sinxxlnx=(1+sinxx)(1+lnxx+(lnx)2x2+O((lnx)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: lnxx1xsinxx(lnx)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 lnxx\frac{\ln x}{x}, then the bounded-oscillation term sinxx\frac{\sin x}{x}:

x+sinxxlnx=1+lnxx+sinxx+O((lnx)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 knkα\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 (t1t \geq 1).

α>1\alpha > -1: divergence, and by Theorem 6.6 (2), knkα=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 knkαnα+1α+1\sum_{k \leq n} k^\alpha \sim \frac{n^{\alpha + 1}}{\alpha + 1}.

α=1\alpha = -1: Hn=lnn+γ+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=lnn+γ+12n+o(1n)H_n = \ln n + \gamma + \frac{1}{2n} + o\bigl(\frac1n\bigr). (Study vn=Hnlnnγv_n = H_n - \ln n - \gamma: show vnvn+1=12n2+O(n3)v_n - v_{n+1} = \frac{1}{2n^2} + O(n^{-3}) and sum the tail, comparing with kn12k212n\sum_{k \geq n} \frac{1}{2k^2} \sim \frac{1}{2n}Theorem 6.6 (1).)

Solution

Solution of Exercise 6.3.

Let vn=Hnlnnγ0v_n = H_n - \ln n - \gamma \to 0. Then

vnvn+1=lnn+1n1n+1=(1n12n2)(1n1n2)+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=1n1n2+O(n3)\frac{1}{n+1} = \frac1n - \frac{1}{n^2} + O(n^{-3}). Since vn0v_n \to 0, telescoping the tail:

vn=kn(vkvk+1)=kn(12k2+O(k3))=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 t2t^{-2} (remainder 1n\sim \frac1n, halved) and to t3t^{-3}. Hence Hn=lnn+γ+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!)36πn(3n/e)3n(2πn)3/2(n/e)3n=6  27n2πn12πn2πn  =327n2π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!nn2πnen\dfrac{n!}{n^n} \sim \sqrt{2\pi n}\,\eu^{-n}.

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

n!n=exp(lnn1+ln(2πn)2n+o(lnnn))=ne(1+ln(2πn)2n+o(lnnn)).\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 n2n \geq 2, prove that xn+x=1x^n + x = 1 has a unique solution xn(0,1)x_n \in \intoo{0}{1}, that xn1x_n \to 1, and establish

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

(From xnn=1xnx_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+x1g(x) = x^n + x - 1 increases strictly on [0,1]\intcc{0}{1} from 1-1 to 11: unique root xnx_n. Since xnn=1xn(0,1)x_n^n = 1 - x_n \in \intoo{0}{1}: if xnc<1x_n \leq c < 1 along a subsequence, then xnncn0x_n^n \leq c^n \to 0, so 1xn01 - x_n \to 0: contradiction with xncx_n \leq c. Hence xn1x_n \to 1.

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

nln(1εn)=lnεnnε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: lnn+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εnlnn\ln\varepsilon_n \sim -\ln n, whence εn=lnεnn(1+o(1))lnnn\varepsilon_n = \frac{-\ln\varepsilon_n}{n}(1 + o(1)) \sim \frac{\ln n}{n}:

xn=1lnnn+o(lnnn).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π+π21nπ+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 cotyn=xn\cot y_n = x_n exactly, expand coty=1yy3+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: cotyn=xn=nπ+π2yn\cot y_n = x_n = n\pi + \frac\pi2 - y_n, with yn1nπy_n \sim \frac{1}{n\pi} (Example 6.23). Expand coty=1yy3+O(y3)\cot y = \frac1y - \frac y3 + O(y^3):

1ynyn3+O(yn3)=nπ+π2yn1yn=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(n2)=1nπ(112n+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π+π2yn=nπ+π21nπ+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 limn1n!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 knk!=n!(1+1n+O(n2))\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!+(n1)!+kn2k!,kn2k!(n1)(n2)!=(n1)!.\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 11n!k!1+2n1 \leq \frac{1}{n!}\sum k! \leq 1 + \frac{2}{n}: the limit is 11. Refining: (n1)!n!=1n\frac{(n-1)!}{n!} = \frac1n and the crude bound kn2k!(n1)!\sum_{k \leq n-2}k! \leq (n-1)! can be sharpened the same way: kn2k!=(n2)!(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 unu_n \to \infty, then that un2nu_n \sim \sqrt{2n} (study un2u_n^2: its increments are 2+un22 + u_n^{-2}; sum), and refine:

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

(From un2=2n+k<nuk2+u02u_n^2 = 2n + \sum_{k<n} u_k^{-2} + u_0^2 and uk22ku_k^2 \sim 2k: the sum is 12lnn\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 unu_n \to \infty.

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

un2=u02+2n+k=0n11uk2.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 un22nu_n^2 \sim 2n and un2nu_n \sim \sqrt{2n}.

Refinement: 1uk212k\frac{1}{u_k^2} \sim \frac{1}{2k}, so by comparison (Theorem 6.6, or equivalents of partial sums of positive series) k<nuk212lnn\sum_{k<n} u_k^{-2} \sim \frac12 \ln n. Hence

un2=2n+lnn2(1+o(1))+O(1)un=2n1+lnn4n+o(lnnn)=2n(1+lnn8n+o(lnnn)).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+klnn.S_n = \sum_{k=1}^{n} \frac{1}{n + k\ln n} .

(Factor nn: Sn=1nk(1+klnnn)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=lnnt = \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 SnlnlnnlnnS_n \sim \frac{\ln\ln n}{\ln n}.)

Solution

Solution of Exercise 6.9.

Factor nn and set t=lnnt = \ln n:

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

For fixed tt, the sum is a Riemann sum of u11+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+tu1nSn01 ⁣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=lnnt = \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(lntt)\frac1n = o\bigl(\frac{\ln t}{t}\bigr): hence

Sn=ln(1+lnn)lnn+O(1n)    lnlnnlnn.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 (lnn)lnn=nlnlnn(\ln n)^{\ln n} = n^{\ln\ln n}, then rank the following in increasing o()o(\cdot) order at infinity, with proofs: n2n^2, (lnn)lnn(\ln n)^{\ln n}, 2n2^n, n!n!, nnn^n.

Solution

Solution of Exercise 6.10.

Identity: (lnn)lnn=elnnlnlnn=(elnn)lnlnn=nlnlnn(\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)=2lnn\ln(n^2) = 2\ln n; ln((lnn)lnn)=lnnlnlnn\ln\bigl((\ln n)^{\ln n}\bigr) = \ln n\ln\ln n; ln(2n)=nln2\ln(2^n) = n\ln2; ln(n!)=nlnnn+O(lnn)\ln(n!) = n\ln n - n + O(\ln n) (Stirling, or the cruder bracketing lnn!nlnn\ln n! \sim n\ln n); ln(nn)=nlnn\ln(n^n) = n\ln n. Since 2lnn=o(lnnlnlnn)2\ln n = o(\ln n\ln\ln n), lnnlnlnn=o(n)\ln n\ln\ln n = o(n), nln2=o(nlnnn)n\ln 2 = o(n\ln n - n), and nlnnnnlnnn \ln n - n \sim n\ln n but n!/nn0n! / n^n \to 0 (the difference of logs is n+O(lnn)-n + O(\ln n) \to -\infty):

n2=o((lnn)lnn),(lnn)lnn=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=1n12n2+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)=1k1k+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)=1n1n2+12n2+O(1n3)=1n12n2+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=1n1n2+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+eunu_{n+1} = u_n + \eu^{-u_n}. Prove that unu_n \to \infty, then — setting vn=eunv_n = \eu^{u_n} and showing vn+1=vn+1+12vn+O(vn2)v_{n+1} = v_n + 1 + \frac{1}{2v_n} + O\bigl(v_n^{-2}\bigr) — establish

un=lnn+lnn2n+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 unu_n \to \infty. Let vn=eunv_n = \eu^{u_n} \to \infty: then

vn+1=eun+eun=vne1/vn=vn(1+1vn+12vn2+O(vn3))=vn+1+12vn+O(vn2).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+1vk=1+O(1)v_{k+1} - v_k = 1 + O(1) first gives vn=n+O(n)v_n = n + O(n), hence vncnv_n \geq cn eventually; re-summing with 12vk=O(1k)\frac1{2v_k} = O(\frac1k) gives vn=n+O(lnn)v_n = n + O(\ln n). One more pass: 12vk=12k(1+O(lnkk))\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+lnn2+O(1).v_n = n + \sum_{k<n}\frac1{2k} + O(1) = n + \frac{\ln n}2 + O(1).

Finally un=lnvn=lnn+ln(1+lnn2n+O(1n))=lnn+lnn2n+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 xlnx=nx\ln x = n, and cashes the method’s most famous cheque: from the admitted prime number theorem, the asymptotic law pnnlnnp_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=ikciφi+o(φk)=ikciφ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=cic_i = c_i' for all ii. Then push the course’s mixed example one rung further:

    1xlnx=1x+lnxx2+(lnx)2x3+o((lnx)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 n1n \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 xnlnnx_n \sim \ln n.
  3. Bootstrap twice:

    xn=lnnlnnn(lnn)22n2+o((lnn)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 x10006.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)21201t(1t)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(1t)g\frac12 t(1-t)g'' by parts twice).

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

    En=k=1nf(k)1nff(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 EEn18nf\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=lnn+γ+12n+εn,εn18n2,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 1201t(1t)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=lnf = \ln: re-derive in three lines the convergence of dn=lnn!(n+12)lnn+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 c1.4604c \approx -1.4604).

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

  1. Show that xlnx=nx\ln x = n has exactly one solution xn[1,+)x_n \in \intco{1}{+\infty} for n1n \geq 1, that xnx_n \to \infty, and that lnxnlnn\ln x_n \sim \ln n.
  2. Deduce the one-term inversion xnnlnnx_n \sim \dfrac{n}{\ln n}, then bootstrap once more:

    lnxn=lnnlnlnn+o(1),xn=nlnn(1+lnlnnlnn+o(lnlnnlnn)).\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 x87848x \approx 87\,848; compare with the one-term (72382\approx 72\,382) and two-term (86140\approx 86\,140) values, and explain the slow gain (the expansion parameter is lnlnnlnn\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)xlnx\pi(x) \sim \frac{x}{\ln x} as xx \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

    pnnlnn.p_n \sim n \ln n .
  5. Dividends: (a) show knpkn2lnn2\sum_{k \leq n} p_k \sim \frac{n^2\ln n}{2} (compare klnk\sum k\ln k with tlnt ⁣dt\int t\ln t\,\dd t); (b) compute the approximate chance that a uniformly random integer with 100100 digits is prime (ln10100230.26\ln 10^{100} \approx 230.26: about one in 230230).

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

  1. Show that for each n1n \geq 1 the equation tanx=1x\tan x = \frac1x has exactly one solution xnx_n in (nπ,nπ+π2)\intoo{n\pi}{\,n\pi + \frac\pi2}, and that zn=xnnπ0+z_n = x_n - n\pi \to 0^+.
  2. One term: zn1nπ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 arctanu=uu33+O(u5)\arctan u = u - \frac{u^3}3 + O(u^5) and 1xn=1nπzn(nπ)2+O(n3zn2)\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 x39.5293344x_3 \approx 9.5293344; compare the one- and three-term values, and contrast in one sentence with the course’s tanx=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=sinunu_{n+1} = \sin u_n. Show un0u_n \to 0 decreasingly, and compute the limit of 1un+121un2\dfrac{1}{u_{n+1}^2} - \dfrac{1}{u_n^2} (expand sin2\sin^{-2} via sinu=uu36+o(u3)\sin u = u - \frac{u^3}6 + o(u^3)).
  2. Deduce, via Cesàro means (Year 1 volume), the classic

    un3n.u_n \sim \sqrt{\frac{3}{n}} .
  3. (Certified numerics) Using question 7’s rigorous bound, show that evaluating lnn+γ+12n\ln n + \gamma + \frac1{2n} at n=106n = 10^6 yields H106H_{10^6} with error at most 1.2510131.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 unvn+u_n \sim v_n \to +\infty then lnunlnvn\ln u_n \sim \ln v_n; (b) if unvnu_n \sim v_n then eunevn\eu^{u_n} \sim \eu^{v_n}; (c) if fgf \sim g at ++\infty (f,gf, g differentiable) then fgf' \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 xlnxx\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(cici)φ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 ci0ci0=o(1)c_{i_0} - c_{i_0}' = o(1): zero, contradiction. For the expansion: with u=lnxx0u = \frac{\ln x}x \to 0,

1xlnx=1x11u=1x(1+u+u2+O(u3))=1x+lnxx2+(lnx)2x3+o((lnx)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=lnxxu = \frac{\ln x}{x}: every term carries as many powers of lnx\ln x as of 1x\frac1x beyond the first; the scale rung 1x2\frac1{x^2} (coefficient of (lnx)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 RR\R \to \R, so xn=f1(n)x_n = f^{-1}(n) exists and is unique, and xn+x_n \to +\infty (f1f^{-1} increases to ++\infty). From exn=nxn\eu^{x_n} = n - x_n: xn=ln(nxn)lnnx_n = \ln(n - x_n) \leq \ln n, so xn/n0x_n/n \to 0 and xn=lnn+ln(1xn/n)=lnn+o(1)lnnx_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=lnn+o(1)nu_n = \frac{\ln n + o(1)}{n}, so

xn=lnn+ln(1un)=lnnun+O(un2)=lnnlnnn+o(lnnn).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=lnnnlnnn2+o(lnnn2)u_n = \frac{\ln n}{n} - \frac{\ln n}{n^2} + o\bigl(\frac{\ln n}{n^2}\bigr), and ln(1un)=unun22+O(un3)\ln(1 - u_n) = -u_n - \frac{u_n^2}2 + O(u_n^3):

xn=lnnlnnn+lnnn2(lnn)22n2+o((lnn)2n2)=lnnlnnn(lnn)22n2+o((lnn)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 lnnn2\frac{\ln n}{n^2} being absorbed into o((lnn)2n2)o\bigl(\frac{(\ln n)^2}{n^2}\bigr).

4. At n=1000n = 1000: ln10006.90776\ln 1000 \approx 6.90776 (error 71037\cdot10^{-3}); two terms: 6.900856.90085 (error 21052\cdot10^{-5}); three terms: 6.900826.90082 (error below 10510^{-5}), against x10006.90083x_{1000} \approx 6.90083. Each pass buys roughly the predicted factor lnnn\frac{\ln n}{n}.

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

1201t(1t)g(t) ⁣dt=01(12t)g(t) ⁣dt=[(12t)g]0101g=g(0)+g(1)201g.\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+1En=f(n+1)nn+1 ⁣ff(n+1)f(n)2=f(n)+f(n+1)2nn+1 ⁣f=1201t(1t)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 0t(1t)140 \leq t(1-t) \leq \frac14: En+1En18nn+1f\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

EEnknEk+1Ek18nf.\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}, 1f=1<\int_1^\infty\abs{f''} = 1 < \infty. Question 6:

Hn=lnn+1+1n2+E+(EnE)=lnn+(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=EnE18n2 ⁣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=lnn+γ+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=EnE=kn1201t(1t)2 ⁣dt(k+t)3=kn(1k301t(1t) ⁣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(1t)=16\int_0^1 t(1-t) = \frac16 and kn1k312n2\sum_{k\geq n}\frac1{k^3} \sim \frac{1}{2n^2} (Theorem 6.6):

εn=1612n2+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=lnf = \ln: f(t)=1t2f''(t) = -\frac1{t^2}, absolutely integrable. Question 6 gives

lnn!=1nlnt ⁣dt+lnn2+E+O(18n ⁣dtt2)=(n+12)lnnn+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=ln2π1E = \ln\sqrt{2\pi} - 1.)

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

k=1n1k=2n2+1+1n2+E+O(n3/2)=2n+c+12n+O(n3/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=E32c = E - \frac32. At n=104n = 10^4: 2n=2002\sqrt n = 200, c1.46035c \approx -1.46035, 12n=0.005\frac1{2\sqrt n} = 0.005: predicted 198.54465198.54465, and indeed k104k1/2=198.544645\sum_{k\leq10^4}k^{-1/2} = 198.544645\dots — three terms, seven digits.

11. ttlntt \mapsto t\ln t is continuous and strictly increasing on [1,)\intco1\infty (derivative lnt+11\ln t + 1 \geq 1), from 00 to ++\infty: a unique xnx_n exists, and xnx_n \to \infty (else xnlnxnx_n\ln x_n would stay bounded). Taking logarithms in xnlnxn=nx_n\ln x_n = n: lnxn+lnlnxn=lnn\ln x_n + \ln\ln x_n = \ln n; since lnlnxn=o(lnxn)\ln\ln x_n = o(\ln x_n), dividing by lnxn\ln x_n gives lnnlnxn1\frac{\ln n}{\ln x_n} \to 1: lnxnlnn\ln x_n \sim \ln n.

12. From xn=nlnxnx_n = \frac{n}{\ln x_n} and lnxnlnn\ln x_n \sim \ln n: xnnlnnx_n \sim \frac{n}{\ln n}. Next pass: lnlnxn=ln(lnn(1+o(1)))=lnlnn+o(1)\ln\ln x_n = \ln\bigl(\ln n\,(1 + o(1))\bigr) = \ln\ln n + o(1), so lnxn=lnnlnlnn+o(1)\ln x_n = \ln n - \ln\ln n + o(1) and

xn=nlnnlnlnn+o(1)=nlnn11lnlnn+o(1)lnn=nlnn(1+lnlnnlnn+o(lnlnnlnn)).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: nlnn72382\frac{n}{\ln n} \approx 72\,382 (off by 18%18\%), two terms give 86140\approx 86\,140 (off by 1.9%1.9\%), against the true x87848x \approx 87\,848. The gain per pass is only the factor lnlnnlnn2.6313.80.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)pnlnpnn = \pi(p_n) \sim \frac{p_n}{\ln p_n}, i.e. pnnlnpnp_n \sim n\ln p_n: this is the equation xlnxnx\ln x \approx n read backwards. Taking logarithms: lnpn=lnn+lnlnpn+o(1)\ln p_n = \ln n + \ln\ln p_n + o(1), and lnlnpn=o(lnpn)\ln\ln p_n = o(\ln p_n) forces lnpnlnn\ln p_n \sim \ln n as in question 11. Substituting back:

pnnlnpn=nlnnlnpnlnnnlnn.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ε)klnkpk(1+ε)klnk(1 - \varepsilon)k\ln k \leq p_k \leq (1 + \varepsilon)k\ln k. By comparison with the increasing tlntt\ln t (Theorem 6.6-type bracketing), knklnk=1ntlnt ⁣dt+O(nlnn)=n2lnn2n24+O(nlnn)n2lnn2\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 knpk=n2lnn2(1+O(ε)+o(1))\sum_{k\leq n}p_k = \frac{n^2\ln n}{2}(1 + O(\varepsilon) + o(1)) for every ε\varepsilon: knpkn2lnn2\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 1ln10100=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)=tanx1xg(x) = \tan x - \frac1x is continuous and strictly increasing (g=1+tan2x+1x2>0g' = 1 + \tan^2x + \frac1{x^2} > 0), with g1nπ<0g \to -\frac1{n\pi} < 0 at the left end and g+g \to +\infty at the right: exactly one root xnx_n. Since tanzn=tanxn=1xn0\tan z_n = \tan x_n = \frac1{x_n} \to 0 with zn(0,π2)z_n \in \intoo{0}{\frac\pi2}: zn0+z_n \to 0^+.

17. tanznzn\tan z_n \sim z_n and 1xn1nπ\frac1{x_n} \sim \frac1{n\pi}: zn1nπz_n \sim \frac1{n\pi}.

18. zn=arctan1xnz_n = \arctan\frac1{x_n} and arctanu=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(n3)\frac{z_n}{n^2} = O(n^{-3}).

19. Insert zn=1nπ+O(n3)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=arctan1xn=1xn13(1xn)3+O(1n5)=1nπ1n3π313n3π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.51031.5\cdot10^{-3} and 51055\cdot10^{-5}. Contrast: for tanx=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 xtanx=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. sinu<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: sinu=u(1u26+o(u2))\sin u = u(1 - \frac{u^2}6 + o(u^2)), so

1un+121un2=1un2((1un26+o(un2))21)=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:

1n1un2=1n(1u02+k=0n1(1uk+121uk2))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 un23nu_n^2 \sim \frac3n and, all terms being positive, un3/nu_n \sim \sqrt{3/n}.

23. By question 7, Hnlnnγ12n18n2\abs{H_n - \ln n - \gamma - \frac1{2n}} \leq \frac1{8n^2}. At n=106n = 10^6 this bound is 181012=1.251013\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: lnunlnvn=lnunvn0\ln u_n - \ln v_n = \ln\frac{u_n}{v_n} \to 0 while lnvn+\ln v_n \to +\infty, so the ratio of logarithms tends to 11. (b) False: un=n+1vn=nu_n = n + 1 \sim v_n = n, but eun/evn=e1\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 xlnx=nx\ln x = n (Part III), on xtanx=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(nf)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)lnxx\pi(x)\ln x \approx x, so pnp_n, defined by π(pn)=n\pi(p_n) = n, solves an xlnx=nx\ln x = n equation — and inherits its asymptotics. Rule (a) of question 24 legitimized every passage from unvnu_n \sim v_n to lnunlnvn\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 pnnlnnp_n \sim n\ln n of the nn-th prime (question 14).