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-22

Exercise 1.2.2-22

proved in Lean solution written

Rating20
Markersrecommended
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

Show that ln⁡x+log⁡10x\ln x + \log_{10} x approximates lg⁡x\lg x with a relative error below 1%1\%.

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

Write all three logarithms with ln⁡x\ln x as a common factor.

Hint 2

The ratio of the two sides does not depend on xx.

Solution

Show the solution

Let x>0x > 0 and x≠1x \ne 1. By Eq. (14), lg⁡x=ln⁡x/ln⁡2\lg x = \ln x / \ln 2 and log⁡10x=ln⁡x/ln⁡10\log_{10} x = \ln x / \ln 10. So ln⁡x+log⁡10xlg⁡x=ln⁡2(1+1ln⁡10)=ln⁡2+log⁡102.\frac{\ln x + \log_{10} x}{\lg x} = \ln 2 \left(1 + \frac{1}{\ln 10}\right) = \ln 2 + \log_{10} 2. With ln⁡2=0.693147…\ln 2 = 0.693147\ldots and log⁡102=0.301030…\log_{10} 2 = 0.301030\ldots this is 0.994177…0.994177\ldots. The relative error 1−0.994177=0.00582…1 - 0.994177 = 0.00582\ldots is below 1%1\%, and the same for every xx. □\square

Check

For x=1024x = 1024: ln⁡x=6.93147\ln x = 6.93147, log⁡10x=3.01030\log_{10} x = 3.01030, the sum is 9.941779.94177 and lg⁡x=10\lg x = 10. The relative error is 0.58%0.58\%.

Remarks

The sum slightly underestimates lg⁡x\lg x for x>1x > 1 and overestimates it for x<1x < 1. A table of natural and of common logarithms thus gives binary logarithms by one addition.

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.