## Thursday, June 21, 2007

### A Different Square Root Algorithm

One algorithm for doing square roots by hand was recently mentioned (though not actually yet described in any detail) on math-teach@mathforum.org. It was averred that finding square roots required estimation. I posted part of an algorithm I taught to teacher-education students last year that does not rely on estimating, but instead uses subtraction of successive odd integers. What follows is part of the story using two examples that illustrate most of the situations that might arise. The third situation, as well as how to deal with the square roots of non-perfect squares will be posted later. If there are typos, let me know:

As usual, there are more ways to the woods than one. Here's one in which estimation is NOT necessary. As mentioned in a previous post, I used this with elementary education students in a math content class and we most definitely DID explore why it works. If anyone is interested, I can send the labs that were used to explore this approach, first in base five (Fen) and later in decimal. The algorithm is the same, and the logic behind it is, as well. Since I didn't learn the one Wayne refers to, perhaps he'll offer his algebraic explanation along with the algorithm itself.

The one I used is based on the fact that the nth perfect square is the sum of the first n odd integers. So this fact can be used to subtract successive odd integers from the number for which one wishes to find the square root. If the number isn't a perfect square, this method can be extended by adding pairs of zeroes to the original number and continuing the process for each additional decimal place one wishes to have in the answer.

It helps to look at a couple of examples to illustrate two "special cases" that arise with some numbers, requiring one or two additional "rules" or steps.

Using the example of 54,756:

Start by marking pairs of digits from the right-most digit: 5 | 47 | 56

Then subtract 1 from the leftmost digit or pair: 5 - 1 = 4.
Continue with the next odd integer: 4 - 3 = 1.

We can't subtract 5 from 1, so we count how many odd integers we've subtracted thus far (2) and mark that above the 5.

Bring down the next pair of digits and append it to the 1 yielding 147.

To get the next odd integer to subtract, multiply the last odd integer subtracted by 10 and add 11 (this is Rule #1) to the product. Here, we have 10 x 3 + 11 = 41. Proceed as previously, subtracting 41 from 147 = 106.
Subtract the next odd integer, 43 from 106 = 63.
Subtract the next odd integer, 45 from 63 = 18.

Again, we can't subtract 47 from 18; counting, we have done 3 subtractions and place 3 above the pair 47. Multiply 45 x 10 and add 11 = 461.

Bring down the next pair of digits, 56, and append them to the 18, yielding 1856.

Subtract 461 from 1856 = 1395.
Subtract the next odd integer, 463 from 1395 = 932.
Subtract the next odd integer, 465 from 932 = 467.
Subtract the next odd integer, 467 from 467 = 0.
Stop.

Counting how many subtractions, we see it is 4 and we write 4 above the 56.

Our answer is that 234 is the square root of 54,756. (alternately, instead of keeping a running total of the subtractions and placing the digits above successive pairs of digits from the left, take the last number subtracted, 467, add 1, and divide the result, 468, by 2 = 234, same as what we determined the other way.

==========================

A second example introduces another rule not previously required: find the square root of 4,121,062,016 using the subtraction of successive odd integers.

Begin as above by making pairs of digits from the right-most digit: 4 | 12 | 10 | 62 | 40 | 16

Subtract 1 from 4 = 3.
Subtract 3 from 3 = 0.
Write down 2 for the two subtractions above the 4.
Bring down the next pair of digits, 12.
Multiply 3 x 10 and add 11 = 41.
Note that 41 is too big to subtract from 12.
Write 0 above the 12, since we did 0 subtractions.

Bring down the next pair of digits, 10, and append to the 12 => 1210.

Insert a 0 to the left of the last digit in 41 => 401. (This is Rule #2)
Subtract 401 from 1210 = 809.
Subtract the next odd integer, 403, from 809 = 406.
Subtract the next odd integer, 405 from 406 = 1.

For the three subtractions, write 3 above the 10.

Bring down the next pair of integers, 62 and append to the 1 => 162
Multiply 405 by 10 and add 11 = 4061.
We need to apply Rule #2 again. Write 0 above the 62, bring down the next pair of digits, 40, and append to the 162 => 16240.
Insert 0 to the left of the last digit of 4061 => 40601.

Note that this is still too big to subtract from 16240.
Apply Rule #2 again (and it may have to be applied more than twice in particular cases).
Write 0 above the 40, bring down the 16 and append to the 16240 => 1624016.
Insert a 0 to the left of the last digit of 40601 => 406001.

Subtract 406001 from 1624016 = 1218015.
Subtract the next odd integer , 406003 from 1218015 = 812012.
Subtract the next odd integer, 406005 from 812012 = 406007.
Subtract the next odd integer, 406007 from 406007 = 0.
Write a 4 above the last pair of digits, 16.

The square root of 41210624016 = 203,004.

Again, alternately, the answer = (406007+1) / 2 = 203,004.

I will post the situation that calls for Rule #3 as well as examples with non-perfect squares a little later.