Finding the square root

  • Thread starter Vorbis
  • Start date
  • #1
47
0

Main Question or Discussion Point

This has been bothering me for a while now. Without a calculator and without using "guess and check" how can find the square root of a number? For example: 6[tex]^{2}[/tex] = 36 but how can you reverse it and figure out what [tex]\sqrt{36}[/tex] equals? Is there some equation to it or can it only be done using guess and check?

Thanks in advance :smile:
 

Answers and Replies

  • #3
47
0
Thats a bit complex for me at my level of math right now. Are there any simpler, more straight forward equations?
 
  • #4
1,760
57
There is a long process similar to long division. Is that what you're looking for?
 
  • #6
492
0
Find the Talor polynomial to whatever degree of accuracy you want, and plug in.

For example...

f(x) = sqrt(x)

f(1) = 1
f '(1) = 1/2
f ''(1) = -1/4

So f(x) ~ 1 + 1/2(x-1) - 1/8(x-1)^2

Check my arithmetic... ;p

A special case of this is linear approximation. In this case, and in all cases, it's good to choose a point "close to" the thing you're trying to evaluate to start from. The closer you start, the better your final answer will be.
 
  • #7
Hurkyl
Staff Emeritus
Science Advisor
Gold Member
14,916
17
Is there some equation to it or can it only be done using guess and check?
What's wrong with guess and check? It's the best method to solve lots of problems. (Assuming you don't use it in a stupid way)
 
  • #8
Hurkyl
Staff Emeritus
Science Advisor
Gold Member
14,916
17
Find the Talor polynomial to whatever degree of accuracy you want, and plug in.

For example...

f(x) = sqrt(x)

f(1) = 1
f '(1) = 1/2
f ''(1) = -1/4

So f(x) ~ 1 + 1/2(x-1) - 1/8(x-1)^2

Check my arithmetic... ;p

A special case of this is linear approximation. In this case, and in all cases, it's good to choose a point "close to" the thing you're trying to evaluate to start from. The closer you start, the better your final answer will be.
For example, starting from 1 will only work if you want to find the square root of a number less than 2....
 
  • #9
HallsofIvy
Science Advisor
Homework Helper
41,794
925
This turns out to be equivalent to Newton's method but does not require the general formula:

To find [itex]x= \sqrt{a}[/itex] is equivalent to solving [itex]x^2= a[/itex] which, for non-zero x, is equivalent to x= a/x. Notice also that is x< [itex]\sqrt{a}[/itex], a/x will be larger than x and vice-versa. In either case, the correct square root is between x and a/x.

Therefore: Choose x as some reasonable "guess" (or "starting value" if you don't like "guess"!) for [itex]sqrt{a}[/itex]. Calculate a/x. If that is equal to x, we are done. Otherwise we know the correct square root is between x and a/x. We don't know where, but 1/2 way is likely to be close. So use that as a new value and repeat.

For your example, a= 6, x= 2 is a good starting value. a/x= 6/2= 3 and half way between 2 and 3 is 2.5. Now a/x= 6/2.5= 2.4. Halfway between 2.5 and 2.4 is 2.45. a/x= 6/2.45= 2.449 to 3 decimal places. (2.450+ 2.449)/2= 2.4495 which is still 2.450 to three decimal places to three decimal places which is exactly what a calculator would give. If you want more decimal places, you will need to continue the calculation. This method recovers, generally, one more decimal place for every iteration.
 
  • #10
47
0
you don't even have to start off with a reasonable guess for x. of course, a better initial guess leads to quicker convergence on the solution.

even working out something like [itex]\sqrt{3844}[/itex], taking a starting guess to be 50 takes about 6 iterations to get the correct answer. taking a starting guess to be 1 only takes 12 iterations to get the result.
 
Last edited:
  • #11
HallsofIvy
Science Advisor
Homework Helper
41,794
925
To what degree of accuracy?
 
  • #12
47
0
using a=3844, x=1, i got (using pl/sql mind)

Iteration 1 = 1922.5
Iteration 2 = 962.249739921976592977893368010403120937
Iteration 3 = 483.122272423425796493169827901363303772
Iteration 4 = 245.539425166098942015664368947966959835
Iteration 5 = 130.59737609859217202871199387852836217
Iteration 6 = 80.0156759200862326716562938395764907815
Iteration 7 = 64.028131207575663904905754153984655468
Iteration 8 = 62.0321211639131491817288606001768830525
Iteration 9 = 62.0000083164105287409016192765549547645
Iteration 10 = 62.000000000000557763506494934894469636
Iteration 11 = 62.0000000000000000000000000025088720095
Iteration 12 = 62
using x=50, i get

Iteration 1 = 63.44
Iteration 2 = 62.0163430012610340479192938209331651955
Iteration 3 = 62.000002153413739767994901011000632118
Iteration 4 = 62.0000000000000373966981738746316538005
Iteration 5 = 62.000000000000000000000000000011278331
Iteration 6 = 62
as i did mention though, a closer initial estimate leaders to quicker convergence. the only reason that i mention this is that sometimes, a bad initial guess can lead to chaotic results. but that doesn't seem to be the case with the method you mentioned above.
 
Last edited:
  • #13
jtbell
Mentor
15,505
3,301
There is a long process similar to long division.
This method (the decimal version) is probably the one I learned in high school in the late 1960s. Yes, they actually used to teach this stuff in high school! Maybe it was even in middle school, I don't remember for sure. This was before personal electronic calculators existed, of course. If we wanted to find square roots quickly, we used a slide rule or a table of logarithms.
 
  • #14
662
0
This method (the decimal version) is probably the one I learned in high school in the late 1960s. Yes, they actually used to teach this stuff in high school! Maybe it was even in middle school, I don't remember for sure. This was before personal electronic calculators existed, of course. If we wanted to find square roots quickly, we used a slide rule or a table of logarithms.
Ah, those were the days, weren't they?

No, really, I'm asking, weren't they?? I can't remember any more!!! :eek:
 
  • #15
1,760
57
This method (the decimal version) is probably the one I learned in high school in the late 1960s.
I learned it in high school in the late 60s too.
 

Related Threads for: Finding the square root

  • Last Post
Replies
9
Views
9K
Replies
2
Views
2K
Replies
11
Views
805
Replies
14
Views
21K
Replies
1
Views
7K
  • Last Post
Replies
7
Views
2K
Replies
4
Views
2K
Replies
3
Views
3K
Top