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

AI Thread Summary
The discussion focuses on methods to evaluate the square root of imperfect squares with five decimal accuracy. Participants mention using the Taylor series and Newton's method as potential approaches, highlighting their effectiveness. The Taylor series is described in detail, including its formula and application for approximating square roots. Newton's method is also explained, emphasizing its iterative process for refining estimates. Overall, the conversation explores various mathematical techniques for achieving precise square root calculations.
jnbp13
Messages
15
Reaction score
0
Easiest Method to Evaluate Imperfect Square Root up to 5 Decimals?
Any ideas?
 
Last edited by a moderator:
Mathematics news on Phys.org
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.
 
I'm seeking a method to evaluate square root of an imperfect square up to 5 decimal accuracy.
 
Use the Taylor expansion. I don't know if it is the easiest.
 
That's pretty cool. Honestly though, I'm glad it isn't taught anymore. I'm glad to know it now though.
 
Lol! I am the international champion in high speed mental math!
 
I was asking an easier and simpler method such as the duplex method of roots
 
@drewd! Could you please explain me the solution via Taylor series!
 
  • #10
DrewD said:
That's pretty cool. Honestly though, I'm glad it isn't taught anymore. I'm glad to know it now though.

Could you explain me what the Taylor series exactly means?
 
  • #11
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
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
Of course that is a lot better... but you know, if you want to make things harder...:redface:
 
  • #14
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
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
Mark44 said:
They used to teach this in about the 8th grade in the US - http://www.basic-mathematics.com/square-root-algorithm.html.

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

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. :frown:
 
  • #17
SteamKing said:
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. :frown:

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
...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
 
Back
Top