# Easiest Method to Evaluate Imperfect Square Root up to 5 Decimals?

1. Sep 5, 2014

### jnbp13

Easiest Method to Evaluate Imperfect Square Root up to 5 Decimals?
Any ideas?

Last edited by a moderator: Jan 19, 2015
2. Sep 5, 2014

### SteamKing

Staff Emeritus
It's not clear what you are asking. A fuller description of what you want other than a cryptic title thread is required, I'm afraid.

3. Sep 5, 2014

### jnbp13

I'm seeking a method to evaluate square root of an imperfect square up to 5 decimal accuracy.

4. Sep 5, 2014

### DrewD

Use the Taylor expansion. I don't know if it is the easiest.

5. Sep 5, 2014

6. Sep 5, 2014

### DrewD

That's pretty cool. Honestly though, I'm glad it isn't taught anymore. I'm glad to know it now though.

7. Sep 5, 2014

### jnbp13

Lol! I am the international champion in high speed mental math!

8. Sep 5, 2014

### jnbp13

I was asking an easier and simpler method such as the duplex method of roots

9. Sep 5, 2014

### jnbp13

@drewd! Could you please explain me the solution via Taylor series!

10. Sep 5, 2014

### jnbp13

Could you explain me what the Taylor series exactly means?

11. Sep 5, 2014

### DrewD

I honestly don't think that the Taylor series in an efficient way to calculate a square root, but if you are interested...

$f(x)=\sum\frac{f^{(n)}(0)}{n!}x^n$ is the general formula for a Taylor series centered at zero. If $f(x)=\sqrt{x+S}$ where $S$ is a perfect square near the number you are interested in.

The first 5 derivatives (including the zeroth being the function itself) of $\sqrt{x+S}$ evaluated at $x=0$ are $\sqrt{S},\ \frac{1}{2\sqrt{S}},\ -\frac{1}{4\sqrt{S}},\ \frac{3}{8\sqrt{S}},\ -\frac{15}{16\sqrt{S}}$

So if you want $\sqrt{27}$ you would pick $S=25$ and the $x^n$ would be $2^n$ because $S+2=27$. The first 5 terms would be

$\sqrt{25}+\frac{1}{2\sqrt{25}}(2)-\frac{1}{2}\frac{1}{4\sqrt{25}}(2^2)+\frac{1}{6}\frac{3}{8\sqrt{25}}(2^3)-\frac{1}{24}\frac{15}{16\sqrt{25}}(2^4)$

The wiki article has it in simplified form and discusses a bunch of other options.

12. Sep 5, 2014

### elfmotat

You could do a binomial expansion and only use the terms you need. For example, a first order approximation would be:

$$(1+x)^n=1+nx+\mathcal{O}(x^2) \approx 1+nx$$

So:

$$\sqrt{x} \approx 1+\frac{1}{2} (x-1)$$

13. Sep 6, 2014

### DrewD

Of course that is a lot better... but you know, if you want to make things harder...

14. Sep 6, 2014

### Integral

Staff Emeritus
A good way to get a square root is to apply newton's method to:

x2-A=0

Newton's Method is

x1=x0-$\frac {F(x_0)}{F'(x_0)}$

where x0 is a guess.

For our function we have:

F(x)=x2-A
F'(x)=2x

Pluging these into Newton's Method and doing some algebra gives

xn+1= .5 ( xn+$\frac {A}{x_n}$)

so if A=2 and I guess x=1 I get a first guess of root 2 as 1.5

Repeat using 1.5 to generate the next guess, repeat. You will be surprised at how fast it converges.

15. Sep 6, 2014

### HallsofIvy

Oddly enough, Newton's method for the square root is this method which might be easier to explain to someone who has not taken Calculus:

To find $\sqrt{a}$, which is the same as "solve $x^2= a$":
1. Choose a starting value, $x_0$. The square root of the perfect square closest to a is a good starting value.

2. Divide a by $x_0$. There are three possibilities:

a) $a/x_0= x_0$.
b) $a/x_0> x_0$

c) $a/x_0< x_0$

In case (a) You're done! $x_0= \sqrt{a}$
in either case b or case c, it is easy to show that $\sqrt{a}$ must lie between $x_0$ and $a/x_0$. We don't know where between, of course, so take the easiest, half way between as our next possible value for x, $x_1$, and do that again.

For example, to find $\sqrt{11}$ we note that $3^2= 9$ is the closest perfect square to 11 so we take $x_0= 3$. Then $a/x_0= 11/3$. $3+ 11/3= (9+ 11)/3= 20/3$ so half way between is $x_1= 10/3$. Now $a/x_1= 11/(10/3)= 33/10$ and half way between 10/3 and 33/10 is $(10/3+ 33/10)/2= (100+ 99)/60= 199/60$. So we take $x_2= 199/60= 3.31667$ to 5 decimal places. Now $x_3= (3.3+ 3.31667)/2= 3.30833$. Continue until you have two consecutive x values equal to 5 decimal places.

16. Sep 6, 2014

### SteamKing

Staff Emeritus
Yeah, they used to teach how to find the quotient of two numbers like 6789.465 / 52.5 using long division, but apparently we're too sophisticated now to learn basic arithmetic algorithms.

17. Sep 6, 2014

### DrewD

That is still taught. Doing long division gives a student an idea about place value and the meaning of digits, so most schools (I hope all) still teach it. The algorithm here for estimating square roots does not (it seems to me) teach anything about numbers except by giving the student a goal to motivate practice of basic operations.

18. Sep 7, 2014

### mizen

...from my understanding the Babylonian method which is a simplified Newton's method:

To find the square root of N :

1. Make a rough estimate or guess.
2. Divide N by your estimate.
3. Take the average of the answer from 2. and your estimate
....this will become your new estimate.

(Repeat steps 2 and 3 until you reach the accuracy you want.)

source: square root