Duplex method for square roots

In a previous thread I talked about the duplex method for squaring numbers.
Read that first if you have no idea how this method works.
Otherwise; you might not understand this thread.

If you can square numbers using duplex numbers, then taking the square root is just working backwards, which we will do here.

Let’s go forward first and then backward. This will make the calculation clear.

857^2 =
64 | 80 | 137 | 70 | 49 =
taking care of carrying:
72 | 13 | 14 | 4 | 9 =
another round:
73 | 4 | 4 |4 | 9 =
734,449

This is a 6 digit number, so the answer will be a 3 digit number.
Recall the duplex algorithm:
d(a) | d(ab) | d(abc) | d(bc) | d© =
a^2 | 2ab | 2ac + b^2 | 2bc | c^2

Going backwards now. Let’s take the square root of: 734,449.

From right to left we split the number into 2 digits:
73 44 49
For now we only care about the leftmost block:73

d(a) = a^2. 73 is a^2 plus any carry from the next step d(ab).
So in order to retrieve ‘a’ we find the nearest square below 73:
8^2 = 64. a=8.

With a=8 the formula
a^2 | 2ab | 2ac + b^2 | 2bc | c^2
becomes:
64 | 28b | 28c + b^2 | 2bc | c^2

We subtract the 64 from 73 and continue:
734,449 - 640,000 =
94,449

After subtracting 64, the previous formula of:
64 | 28b | 28c + b^2 | 2bc | c^2
becomes:
28b | 28c + b^2 | 2bc | c^2

So the next step will be:
94,449 = 28b | 28c + b^2 | 2bc | c^2

So let’s focus on 94 = 28b = 16b.
94 / 16 = 5R14 or b=5.

This number 16, or 2a is important as we will see later.

If b=5, then:
94,449 = 28b | 28c + b^2 | 2bc | c^2 becomes:
94,449 = 80 | 16c + 25 | 10c | c^2
Subtract 80. 94-80 = 14:
14,449 = 16
c + 25 | 10c | c^2

Now subtract 25 = d(b):
11,949 = 16*c | 10c | c^2

Focus on the left part:
119 = 16c or
119/16 = 7R7
c= 7.
Then:
11,949 = 16*c | 10c | c^2
becomes:
11,949 = 112 | 70 | 49

Subtract 112 from 119 = 7:
749 = 70 | 49

Subtract 70:
49 = 49
Subtract 49:
0=0
Done.

The calculation ends in zero, so the root is an integer.

Answer is 857

Using this algorithm, we peel the number digit by digit and discover what the root is, from the most significant digit to least.


Now let’s look at the square roots that end up in irrational numbers.
In this case the number cannot be written as a fraction, so we have unlimited digits:

Recall:
If we want to square a 2 digit number: ab then the square is:
d(a) | d(ab) | d(b)

If we want to square a 3 digit number: abc then the square is:
d(a) | d(ab) | d(abc) | d(bc) | d©

If we want to square a 4 digit number: abcd then the square is:
d(a) | d(ab) | d(abc) | d(abcd) | d(bcd) | d(cd) | d(d)

Now we go one step further.
Recall that an irrational number has unlimited digits.
If we want to square a number with unlimited digits then the square is:
d(a) | d(ab) | d(abc) | d(abcd) | d(abcde) | d(abcdef) | d(abcdefg) | etc., etc., etc.

In other words; we never get to this part: d(bcdefg…) | d(cdefg…) | d(defg…) | …

Let’s do an example: the root of 300.
The previous square below 300 is 17^2 = 289.

Subtract d(a) = 289. 300 - 289 = 11

Now take 2a = 34 as the quotient. In the previous example I said that ‘2a’ is important. This is why. At each step, we will be dividing by 2a = 34.

Add a zero: 11 => 110.
Divide by 34:
110 / 34 =3 R 8.
Add a zero:
80 - d(3) = 71
d(3) is d(b). See previous example.

71 / 34 = 2 R 3. Add zero 3 => 30
30 - d(32) = 18

18 / 34 = 0 R 18. 18=>180.
180 - d(320) = 176

176 / 34 = 5 R 6. 6 => 60
60 - d(3205) = 30

30 / 34 = 0 R 30
300 - d(32050) = 280

280 / 34 = 8 R 8.
80 - d(320508) = 32

32 is below 34, so the next digit is zero. Let’s stop here.

Answer is 17.3205080

See how quick this is?

Step 1: We obtain the first digit ‘a’.
Step 2: We define 2a as the quotient.
Step 3: We subtract ‘a’ from the number we are calculating with.
Step 4: We add the next digit the number we are calculating with and divide this by the quotient. This is our next digit ‘b’.
Step 5: We subtract d(b) from the remainder
Step 6: We divide the remainder by the quotient. This is our next digit ‘c’.
Step 7: We add a zero to the remainder. We subtract d(bc) from the remainder
Step 8: We divide the remainder by the quotient. This is our next digit ‘d’.
Step 9: We add a zero to the remainder. We subtract d(bcd) from the remainder
Step 10: We divide the remainder by the quotient. This is our next digit ‘e’.
Step 11: We add a zero to the remainder. We subtract d(bcde) from the remainder
etc.

You need to do this a couple of times.


Another one:
square root of: 2 or 200

14^2 = 196

Quotient=28

200 - 196 = 4
40/28=1r12
120-d(1)=119
119/28=4r7
70-d(14)=62
62/28=2r6
60-d(142)=40
40/28=1r12
120-d(1421)=102
102/28=3r18
180-d(14213)=162
162/28=5r22
220-d(142135)=182
182/28=6r14
140-d(1421356)=75

Answer: 14.1421356


More digits. Square root of 264,196.

Six digits, so start with the first 2:
5^2 = 25

quotient is 10
26 - 25 = 1.
Concatenate the ‘4’ from 264 and work with a remainder of 14:
14/10 = 1r4
Concatenate the ‘1’ from 2641 and work with a remainder of 41:
41 - d(1) = 40
40/10 = 4R0
Concatenate the ‘9’ from 26419 and work with a remainder of 09:
09 - d(14) = 1
1/10= 0r1
Concatenate the ‘6’ from 264196 and work with a remainder of 16:
16 -d(4) = 0

Answer = 514


Square root of 17:

square root of 16 = 4
quotient is 8.
Subtract 16 from 17. remainder is 1.
Shift decimal point: 1 =><10.

10/8 = 1r2
20 - d(1) = 19
19/8 = 2r3
30 - d(12) = 26
26/8 = 3r2
20 - d(123) = 10
10/8 = 1r2
20 - d(1231) = 6
6/8 = 0r6
60 - d(12 3 10) = 47
47 = 5r7
70 - d(123 105) = 54
54 = 6r6
60 - d(123 10 560) = 27
27 = 2r11
110 - d(123 10 562) = 52
52 = 5r12
120 - d(123 1 0 5 625) = 56
56 = 6r8
80 - d(123 10 56 256) = 24
24 = 1r16
160 - d(123 10 5 62 561) = 75

(I added some extra spaces in the d-number for readability and quicker calculation)

The remainder of 75 is close to 80, so the next digit after ‘1’ will be high.
Thus the last digit needs to be rounded up.

Answer is 4.12310562562.

Observe:
The last subtraction is d(123 10 5 62 561).
All digits except for the first one are in the last d-number.


Now why is this algorithm so fast, especially on championships?
Well, each step consists of continuously doing a small division.
This number is 2a. ‘a’ is typed in while registering the answer, so does not need to be remembered.

Then you subtract a number (d(b), d(bc), d(bcd)).
This also does not need to be remembered, because you type in the answer.
So the numbers are in front of you.

In other words, your brain can focus on doing the calculations only.
There is no need for memorization, except for the remainder.
Subtracting d(bcdef…) consists of looking at the screen and calculating the d-number.
For the first digits, this is a quick calculation.

However; doing 10 roots in a minute is still bafflingly fast!

1 Like

Cool :slight_smile:

Great post. This is a very useful reference.

I have taken the Duplex algorithm that I’ve described here and put a user interface in front of it. It’s the same number that is discussed above, maybe this helps with visualization as you read the original post.

Hopefully, I can manage to work a dynamic tutorial into it, just like I have done for the calendar calculation app, so that people not familiar with this method for square roots have an easy way of familiarizing themselves with it.

The format is that of the Mental Calculation World Cup, where each question has a 6-digit number whose square root must be found to 5 decimal places

2 Likes