Tuesday, August 4, 2015

Repeated Presses of the Square Root Button

Repeated Presses of the Square Root Button



How many of you have ever done this?  You take an ordinary calculator (or even an older-style AOS calculator or an RPN calculator), enter a number, particularly greater than 1, and just kept pressing the square root button?  Eventually, the number would approach 1, and due to the number decimal points the calculator can hold, the display would be 1.

We can theorize on how many times we would have press the square root button before the displayed value falls below a limit level L. 

Taking repeated square roots of x, n times, will lead to:

√ … √ √ √ x
= √ … √ √ (x^(1/2)
= √ … √ (x^(1/4))
= √ … (x^(1/8))
= x^(1/(2^n))

The number of times the square root button needs to be pressed until it falls below a limit L (for the first time), the inequality is set up as:

x^(1/(2^n)) < L

Solving for n (x and L are given):

Take the logarithm of both sides:

ln (x^(1/(2^n))) < ln L
1/(2^n) ln x < ln L
1/(2^n) < (ln L)/(ln x)

Taking the reciprocal of both sides:

2^n > (ln x)/(ln L)

Again, take the logarithm of both sides:

ln (2^n) > ln (ln x/ln L)
n ln 2 > ln (ln x/ln L)

Solving for n:

n > ln (ln x/ln L)/ln 2

Implementing a short algorithm on an HP 42S:

01 LBL “BL08”
02 LN
03 X<>Y
04 LN
05 ÷
06 LN
07 2
08 LN
09 ÷
10 RTN
11 .END.

Input:  L followed by x.   (x>2)

I calculated a theoretical n for various limits (L = 2, L = 1.5, and L = 1.01) and various values of x.


Table of Repeated Square Root Button Presses:  Theoretical n vs. Actual n
(Excel, HP 42S)


From the table, it seems that a suitable formula for n (L ≥ 1, x ≥ 2):

n = int(ln (ln x/ln L)/ln 2) + 1  

Where int represents the integer part function.    

Try this out – and maybe revisit a small part of your childhood in the process.  Have a great day,

Eddie




This blog is property of Edward Shore – 2015.

  Casio fx-7000G vs Casio fx-CG 50: A Comparison of Generating Statistical Graphs Today’s blog entry is a comparison of how a hist...