taocp

This site has no text of the book. Keep your own copy of TAOCP next to it. See what is checked.

Exercise · Volume 1 · 1.2.2-8

Exercise 1.2.2-8

proved in Lean solution written

Rating25
KindK1, prove: show that a stated fact is true from the written solution
SectionSection 1.2.2 of Volume 1. Companion chapter: Numbers, powers and logarithms

The task

Prove that a positive real number uu has exactly one positive mmth root, by building the decimal digits of the root one after another.

The exact wording is in your copy of the book.

Hints

Open one hint at a time. Try the exercise again after each.

Hint 1

Choose the integer part nn as the largest integer with nm≤un^m \le u. Then choose each digit as the largest one that keeps the mmth power at most uu.

Hint 2

Keep the invariant akm≤u<(ak+10−k)ma_k^m \le u < (a_k + 10^{-k})^m for the truncation aka_k of the root.

Hint 3

Show that the digits are not all 99 from some place on, and then show that the mmth power of the number built is exactly uu.

Solution

Show the solution

Write ak=n+d1/10+⋯+dk/10ka_k = n + d_1/10 + \cdots + d_k/10^k and a0=na_0 = n. The map t↦tmt \mapsto t^m is strictly increasing for t≥0t \ge 0, because a product of larger positive numbers is larger.

Construction. The integer 00 has 0m≤u0^m \le u, and tm≥tt^m \ge t for integers t≥1t \ge 1, so the set of integers t≥0t \ge 0 with tm≤ut^m \le u is nonempty and bounded. Let nn be its largest member. Then a0m≤u<(a0+1)ma_0^m \le u < (a_0 + 1)^m. Assume ak−1m≤u<(ak−1+10−(k−1))ma_{k-1}^m \le u < (a_{k-1} + 10^{-(k-1)})^m. The numbers ak−1+d⋅10−ka_{k-1} + d \cdot 10^{-k}, for d=0,1,…,10d = 0, 1, \ldots, 10, increase from ak−1a_{k-1} to ak−1+10−(k−1)a_{k-1} + 10^{-(k-1)}, so their mmth powers go from at most uu to more than uu. Let dkd_k be the largest dd in 0..90..9 whose mmth power is at most uu. Then the number for dk+1d_k + 1 has mmth power above uu, which gives the invariant akm≤u<(ak+10−k)m.a_k^m \le u < (a_k + 10^{-k})^m.

The digits do not end in nines. Suppose dk=9d_k = 9 for all k>lk > l. Then ak+10−k=al+10−la_k + 10^{-k} = a_l + 10^{-l} for all k>lk > l. The invariant gives akm≤ua_k^m \le u, and ak→al+10−la_k \to a_l + 10^{-l}, so by continuity of tmt^m, (al+10−l)m≤u(a_l + 10^{-l})^m \le u. This contradicts the invariant for k=lk = l, which says u<(al+10−l)mu < (a_l + 10^{-l})^m.

So v=n+0.d1d2…v = n + 0.d_1d_2\ldots is a real number in the sense of Eq. (1), and ak≤v<ak+10−ka_k \le v < a_k + 10^{-k} by Eq. (2). Raising to the mmth power, akm≤vm<(ak+10−k)ma_k^m \le v^m < (a_k + 10^{-k})^m. Both vmv^m and uu lie in the interval from akma_k^m to (ak+10−k)m(a_k + 10^{-k})^m. For A>B≥0A > B \ge 0, Am−Bm=(A−B)(Am−1+Am−2B+⋯+Bm−1)≤(A−B)mAm−1A^m - B^m = (A - B)(A^{m-1} + A^{m-2}B + \cdots + B^{m-1}) \le (A - B) m A^{m-1}. With A=ak+10−k≤n+2A = a_k + 10^{-k} \le n + 2 this gives ∣vm−u∣≤10−km(n+2)m−1|v^m - u| \le 10^{-k} m (n+2)^{m-1}, for every kk. So vm=uv^m = u.

Uniqueness. If 0<v<w0 < v < w then vm<wmv^m < w^m, so two different positive numbers cannot both have mmth power uu. □\square

Check

Take m=3m = 3 and u=20u = 20. Then n=2n = 2 since 23=8≤20<272^3 = 8 \le 20 < 27. Next d1=7d_1 = 7 since 2.73=19.683≤20<2.83=21.9522.7^3 = 19.683 \le 20 < 2.8^3 = 21.952. Next d2=1d_2 = 1 since 2.713=19.902…≤20<2.723=20.123…2.71^3 = 19.902\ldots \le 20 < 2.72^3 = 20.123\ldots. The cube root of 2020 is 2.7144…2.7144\ldots, which agrees.

Remarks

The same digit method defines bxb^x for real xx in Eq. (7).

This solution is checked, and a person has not reviewed it yet. The source.

In Lean

proved The statement and its proof are in Lean. The kernel accepts the proof, and it uses the standard axioms only.

The status is computed from the Lean build. The node of the map.

Something is wrong? Report it.