# Root loop over histogram subjects like

Math pages overview
Heron method
back

### Written root extraction

→ Numerical example
→ Interactive calculation examples

As with the basic arithmetic operations, there is also a method of written calculation for taking the square root, which in turn only works with the basic arithmetic operations.

The basic idea of ​​the procedure is that you can write numbers in the decimal system as the sum of their places: For example 47 = 40 + 7. The square of 47, i.e. 472, would then be equal to (40 + 7)2.

As is well known, such an expression (a + b)2 Simplify according to the 1st binomial formula as follows: (a + b)2 = a2 + 2ab + b2. In the numerical example above: (40 + 7)2 = 402 + 2·40·7 + 72 = 1600 + 560 + 49 = 2209.

Part 2ab + b2 always remains smaller than the distance between a2 and the next bigger possibility for a2, because it is (a + 10)2 = a2 + 20a + 100. The difference to a2 is a2 + 20a + 100 - a2 = 20ab + 100, and that is always greater than 2ab + b2because b <10 and a≥10.

If you now proceed in reverse and try to find two numbers a and b for a three- or four-digit number c with c = (a + b)2, so √c = a + b, then one can uniquely determine a based on this property.

The square of the two-digit number a has three or four digits (a∈ {100; 400; 900; 1600; ...; 8100}). So you find a (i.e. the first digit of the root) by finding the largest square number less than or equal to the third and fourth digits (from the right) of c. a is then ten times the square root of this square number.

Example: Find the root of 1521. Separate the third and fourth digits from the right from the (imaginary) comma, i.e. 15, and find 9, the largest square number less than or equal to this number. So the first digit is the root 3 (= √9) and a is 3 · 10 = 30.

Now subtract the square of 30 from 1521:

√1521 = 3... - 900  621

The remainder 621 must now be equal to 2ab + b2 be. The b has yet to be found. Because a> b, 2ab> b2 and 2ab a good starting approximation for the computation of b: 621 ≈ 2ab, and b ≈ 621 / (2a). The approximation can only be too big (because of neglecting + b2). By trying it out (decrease by 1) you can easily find the right value. (See below.)

Instead of a = 30, we calculate with the first digit of the root w = 3 obtained above and write b ≈ 621 / (20w) = 621/60 = 10.35.

So is b = 10? - no! Just because b can be at most 9 (it is the ones place of the root), the approximation b = 10 must be too large. But that is by no means all that b has to fulfill:

The term 2ab + b2 = 20wb + b2 must be less than or equal to remainder 621. Therefore, b must be corrected down by one until this requirement is met. With b = 9 we get 20wb + b2 = 60 · 9 + 81 = 621, i.e. exactly the remainder. With b = 9, the second digit of the result and also the exact square root of 1521 is found.

√1521 = 39 - 900 = a2 ———— Approximately compute b with r / (2a). 621 =: r Correct b downwards until 2ab + b2≤ r - 621 = 2ab + b2  0

In terms of the computational effort, it is more economical to use the term 2ab + b2 in the form (2a + b) · b.

A similar procedure can be used for roots with three or more digits √R = a + b + c + ... Because after the second step of the method explained above, there remains a remainder in which the summands a2, 2ab and b2 are already missing and by far the largest remaining summands are 2ac and 2bc. Because 2ac + 2bc = 2c (a + b) = 2c · 10w, one again gets the best approximation for the next digit c by dividing the remainder by twenty times the already known digits w of the root.

Since n-digit numbers have 2n-digit or 2n-1-digit squares, there is a correlation between two digits of the radical and one digit of the root. That already turned out above. An n-digit number has an Int (n / 2 + 1)-digit root. In the decimal system (as in any place value system) the minimum change in each digit is always greater than the maximum change in its right neighbor. The squares of the places naturally behave in the same way.

##### Numerical example

Find the root of 387654,321.

 1 For the practical implementation of the method, the radical to the right and left of the comma is first divided into two packets, with zeros having to be added if necessary. 38 76 54, 32 10 2 The first digit of the root is the largest square that is less than or equal to the first two packets. 72 > 38 ≥62The first digit of the root is the 6. 3 Similar to the written division, one subtracts the found square from the first block of two and fetches (unlike dividing) the next both Digits down. √38 76 54,32 10 = 6... -36  2 76 4 The remainder is divided by twenty times the root found so far and the whole number part is used as an approximation for the next digit of the root sought. It may still be too big - see next step. 276 : (20·6) = 276 : 120 = 2,3b = 2? 5 Calculate (20 · w + b) · b and reduce b by 1, if necessary, until the result is smaller than the remainder. This is quite common the first time, and very rare later. (20 * w + b) * b = (20 * 6 + 2) * 2 = 244 244 <276 (OK) 6 The next digit of the root is the b found in the last few steps. Compute the new remainder by subtracting (20 * w + b) * b and adding the next group of two. √38 76 54,32 10 = 62... -36  2 76 -2 44  32 54 7 Repeat steps 4-6 until the remainder is 0 and no more number blocks> 00 can be fetched, or until the desired accuracy is achieved. If the Radikand no longer delivers two-packs after the decimal point, get "00" down as with the division. The comma is set (mentally) as soon as the groups of two after the comma are accessed (see No. 8). However, calculations are made with intermediate results without a comma. 3254 : (20·62) = 2,58...b = 2?(20 * w + b) * b = (20 * 62 + 2) * 2 = 24842484 <3254 (OK)√38 76 54,32 10 = 622,... -36  2 76 -2 44  32 54 -24 84  7 70 32 77032 : (20·622) = 6,19...b = 6?(20·622 + 6)·6 = 7467674676 <77032 (OK)√38 76 54,32 10 = 622,6... -36  2 76 -2 44  32 54 -24 84  7 70 32 -7 46 76  23 56 10 235610 : (20·6226) = 1,89...b = 1?(20·6226 + 1)·1 = 124521124521 <235610 (OK)√38 76 54,32 10 = 622,61... -36  2 76 -2 44  32 54 -24 84  7 70 32 -7 46 76  23 56 10 -12 45 21  11 10 89 00 11108900 : (20·62261) = 8,92...b = 8?(20·62261 + 8)·8 = 99618249961824 <11108900 (OK)√38 76 54,32 10 = 622,618... -36  2 76 -2 44  32 54 -24 84  7 70 32 -7 46 76  23 56 10 -12 45 21  11 10 89 00 - 9 96 18 24  1 14 70 76 00 and so on ... 8 In the result, put the comma after as many places as there are (partial) groups of two before the comma in the radicand. The radical 387654,321 has before the decimal point three Groups of two digits (38, 76 and 54), therefore the comma is also after three Positions of the found sequence of digits 622618 are set:√387654,321 = 622,618...

#### Interactive calculation examples

In the following part, the algorithm can be traced using Javascript at any radicand (> 1). As can be seen in the illustration above, the number of interim bills increases with the number of digits to be calculated. Javascript can calculate with approximately 15 digits. In addition, rounding errors occur that are blatantly noticeable. Therefore, I have created the optional possibility here to theoretically calculate numbers of any length / size. The alternative algorithm is used when the radio button is checked.

Note:
Since Java is currently unavailable, the large number algorithm is unfortunately quite slow!