Menu Close

Show-that-log-10-x-1-give-the-number-of-digits-for-x-Z-




Question Number 10040 by FilupSmith last updated on 21/Jan/17
Show that  ⌊log_(10) (x)+1⌋   give the number of  digits for x∈Z
$$\mathrm{Show}\:\mathrm{that} \\ $$$$\lfloor\mathrm{log}_{\mathrm{10}} \left({x}\right)+\mathrm{1}\rfloor\:\:\:\mathrm{give}\:\mathrm{the}\:\mathrm{number}\:\mathrm{of} \\ $$$$\mathrm{digits}\:\mathrm{for}\:{x}\in\mathbb{Z} \\ $$
Answered by mrW1 last updated on 21/Jan/17
let x be an integer with n digits, then  10^(n−1) ≤x<10^n   log_(10)  10^(n−1) ≤log_(10)  (x)<log_(10)  10^n   n−1≤log_(10)  (x)<n  n≤log_(10)  (x)+1<n+1  ⇒⌊log_(10)  (x)+1⌋=n
$${let}\:{x}\:{be}\:{an}\:{integer}\:{with}\:{n}\:{digits},\:{then} \\ $$$$\mathrm{10}^{{n}−\mathrm{1}} \leqslant{x}<\mathrm{10}^{{n}} \\ $$$$\mathrm{log}_{\mathrm{10}} \:\mathrm{10}^{{n}−\mathrm{1}} \leqslant\mathrm{log}_{\mathrm{10}} \:\left({x}\right)<\mathrm{log}_{\mathrm{10}} \:\mathrm{10}^{{n}} \\ $$$${n}−\mathrm{1}\leqslant\mathrm{log}_{\mathrm{10}} \:\left({x}\right)<{n} \\ $$$${n}\leqslant\mathrm{log}_{\mathrm{10}} \:\left({x}\right)+\mathrm{1}<{n}+\mathrm{1} \\ $$$$\Rightarrow\lfloor\mathrm{log}_{\mathrm{10}} \:\left({x}\right)+\mathrm{1}\rfloor={n} \\ $$

Leave a Reply

Your email address will not be published. Required fields are marked *