May 27, 2006

Calculating Square Roots

Ever wonder how people used to find square roots before there were calculators or slide rules? There are methods dating as far back as 1500 BCE (courtesy of the Babylnians) that yield "exact" square roots to any number of decimal places. The process relies on choosing two numbers whose product is the number you wish to find the square root of, and then slowly bringing those two factors closer and closer together, until they are the same number.

For example, if you wanted to find the square root of 12, you could start with the integer factors in pairs, starting with the farthest apart and moving in to the closest together. For instance, 1 and 12, then 2 and 6, then 3 and 4. You can't get any closer than that without surpassing the second factor and repeating them, but in reverse (e.g. 4 and 3, 6 and 2, 12 and 1). So, the square root of 12 must be in between 3 and 4. But how do we get there?

How It Works
Let's calculate the square root of any number n.
  • Select k, so that k is one factor of n.
  • Create n/k, which should be the matching factor of k
  • Find the average of k and n/k.
  • Let this average value replace the former value of k, and repeat the process from step 2, until you achieve accuracy to the desired decimal place. (Hint: you can tell you've achieved accuracy when the value of the decimal place does not change between the previous and current iterations of this process.)

Let's try it with n = 12.

Iteration 1:

  • k = 4
  • n/k = 12/4 = 3
  • Average = (4 + 3)/2 = 3.5
  • We could stop here and say that that's our square root, but we've got to go to the next iteration to see if it's accurate to one decimal place or not.

Iteration 2:

  • k = 3.5
  • n/k = 12/ 3.5 = 3.428571429
  • Average = (3.5 + 3.428571429)/2 = 3.464285714
  • Since this answer differs in the first decimal place from the previousl answer, we do not have accuracy to the tenths place yet. We need another iteration.

Iteration 3:

  • k = 3.464285714
  • n/k = 12/ 3.464285714 = 3.463917526
  • Average = (3.464285714 + 3.463917526)/2 = 3.46410162
  • Wow, comparing this to the previous answer, we see that we are accurate to three decimal places already. For most of us, that's more than enough.

If you square this answer, 3.46410162, you'll get something remarkably close to 12. In fact, you don't notice the residual value until the 9th decimal place.

The funny thing about square roots is that they are what we call irrational numbers. That is, they have decimal representations that never end, and that have no pattern to the digits. (Some rational numbers, which are formed by dividing any two integer values, have never ending decimals, but they repeat. Try 1/3 or 4/7 for example.) So, even if you try to calculate the square root "exactly", you can't, because you would die before you could enumerate all of the necessary decimal places.

4 comments:

Jennie C. said...

Interesting. On the off chance I have to figure square root in my head, which oddly enough I have to do now and then, I do this, sort of. Figure the two factors closest together, find something in the middle that comes close. I don't go much past two decimals (gets a little tricky in the head) and I usually do a trial and error method, but I only need an approximation, nothing exact.

Beckie Russell said...

Yep, that's what I usually do as well,(and it's what I teach my students to do) but for the exacting science of mathematics, that's not good enough.

The alternate method is to find the two perfect squares that surround the number, and you know that the square root of your number must be in between the square roots of the other two numbers. Then, depending on how close it is to one or the other perfect squares, you can determine what the fractional portion of the square root must be. For example, the square root of 50. Since 50 is between 49 and 64, (both perfect squares), the square root of 50 must be between 7 and 8. Since 50 is really really close to 49, maybe 7.1 or 7.05 or so.

Jennie C. said...

I know I figure square roots in my head sometimes, but I can't really think of why I would need to. This has been bothering me all morning. It seems like such a bizarre thing to do on the fly.

bornfool said...

Cool stuff Beckie. You've given me a new toy to play with.