Drexel dragonThe Math ForumDonate to the Math Forum

Ask Dr. Math - Questions and Answers from our Archives
_____________________________________________
Associated Topics || Dr. Math Home || Search Dr. Math
_____________________________________________

Bakhshali Formula

Date: 12/15/2002 at 04:35:00
From: Murtaza Khaliq
Subject: I have a formula for calculating sq-roots by hand

I have been going through the site and have noticed that people have 
been asking for a formula for calculating square roots. I came across 
this "Bakhshali formula" only a few weeks ago myself. I hope it is 
useful.

Q = (A^2 + b) = A + b/2A - (b/2A)^2/[2(A + b/2A)]

In the case of a non-square number, subtract the nearest square 
number, divide the remainder by twice this nearest square; half the 
square of this is divided by the sum of the approximate root and the 
fraction. This is subtracted and will give the corrected root. 

Example:
Taking Q = 41, then A = 6, b = 5 and we obtain 6.403138528 as the 
approximation to 41 = 6.403124237. Hence we see that the Bakhshali 
formula gives the result correct to four decimal places. 

More info can be found in the article at the MacTutor History of 
Mathematics archive at St. Andrews University (select The Bakhshali 
manuscript):

   History Topics
   http://www.gap-system.org/~history/Indexes/Indians.html 

Thanks.


Date: 12/16/2002 at 15:11:56
From: Doctor Peterson
Subject: Re: I have a formula for calculating sq-roots by hand

Hi, Murtaza.

In copying the formula, you lost the square root signs; I'll rewrite 
it as

  sqrt(Q) = sqrt(A^2 + b) = A + b/(2A) - (b/(2A))^2/[2(A + b/(2A))]

It's interesting to compare an ancient method like this to those of 
modern times and other historical periods. I see a strong resemblance 
between this and the divide-and-average method covered in our FAQ, 
which is a special case of Newton's method, and was known in ancient 
Egypt:

   Square/cube roots without a calculator
   http://mathforum.org/dr.math/faq/faq.sqrt.by.hand.html 

   Newton's Method and Square Roots
   http://mathforum.org/library/drmath/view/52644.html 

Let's try applying the divide-and-average method to Q = A^2 + b. Our 
first guess will be A, so we divide Q by A and average that with A:

  B = (A + Q/A)/2

    = (A + (A^2 + b)/A)/2

    = (A + A + b/A)/2

    = A + b/(2A)

Now let's repeat the process a second time, dividing Q by B and 
averaging:

  C = (B + Q/B)/2

    = (A + b/(2A) + (A^2 + b)/(A + b/(2A)))/2

Note that

  (A + b/(2A))^2 = A^2 + b + (b/(2A))^2

so that

  A^2 + b = (A + b/(2A))^2 - (b/(2A))^2

and

  (A^2 + b)/(A + b/(2A)) = A + b/(2A) - (b/(2A))^2/(A + b/(2A))

This gives

  C = A + b/(2A) - (b/(2A))^2/[2(A + b/(2A))]

which is exactly Bakhshali's formula! So what he did amounts to 
repeating the traditional algorithm for two steps. No wonder the page 
you referred to says that it is faster than Newton's algorithm; it 
should take half as many steps to get the same accuracy (assuming you 
apply it iteratively). I'm not sure whether it is any easier than 
just doing that explicitly; but it is certainly interesting to see! 
Thanks for calling our attention to it.

- Doctor Peterson, The Math Forum
  http://mathforum.org/dr.math/ 
Associated Topics:
High School Square & Cube Roots
Middle School Square Roots

Search the Dr. Math Library:


Find items containing (put spaces between keywords):
 
Click only once for faster results:

[ Choose "whole words" when searching for a word like age.]

all keywords, in any order at least one, that exact phrase
parts of words whole words

Submit your own question to Dr. Math

[Privacy Policy] [Terms of Use]

_____________________________________
Math Forum Home || Math Library || Quick Reference || Math Forum Search
_____________________________________

Ask Dr. MathTM
© 1994-2013 The Math Forum
http://mathforum.org/dr.math/