25.5k views
3 votes
How do I approximate a square root

1 Answer

0 votes
The calculus approach is to use Newtons Method:

x_(n+1) = x_n - (f(x_n))/(f'(x_n))
where

f(x) = x^2 - a
Start with initial guess of "a".
After 4 or 5 iterations, you should get a close approximation to
√(a)
...............

If you wanted a non-calculus approach, I would suggest divide and conquer.
First determine which 2 integers the sqrt lies in between by perfect squares.

m^2\ \textless \ a \ \textless \ n^2
Then use midpoint
(m+n)/(2) for next guess, if

((m+n)/(2))^2 \ \textless \ a
then repeat with "m" = midpoint. Otherwise repeat with "n" = midpoint.
Continue until you have a good approximation, about 6-8 decimal points.
User MitchellSalad
by
7.7k points

No related questions found

Welcome to QAmmunity.org, where you can ask questions and receive answers from other members of our community.

9.4m questions

12.2m answers

Categories