Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

I wasn't at school when we were learning this, and I've forgot how to calculate a square root on paper using a formula?

Can anyone please help me? What is the formula?

I need this to write an algorithm for my college assignment home work. Thanks!

share|improve this question
1  
Do you mean Taylor series? –  glebovg Oct 19 '12 at 22:50
6  
Try Newton's method. –  copper.hat Oct 19 '12 at 22:51
3  
Perhaps you mean this Method of calculating square roots digit by digit? –  MJD Oct 19 '12 at 22:56
2  
I find the one MJD cites easier than the Newton series approach, but that is a matter of taste. –  Ross Millikan Oct 19 '12 at 23:14
1  
Also, take a look at math.stackexchange.com/questions/127310/…, in particular the comments by robjohn & James Fennell. –  copper.hat Oct 19 '12 at 23:42
show 1 more comment

3 Answers

up vote 7 down vote accepted

Let $ a \geq 0 $. If you want to find $ \sqrt{a} $, use the following iteration: \begin{align} x_{0} &:= a. \\ x_{n+1} &:= \frac{1}{2} \left( x_{n} + \frac{a}{x_{n}} \right). \end{align} Then $ \displaystyle \lim_{n \rightarrow \infty} x_{n} = \sqrt{a} $. This is an example of the Newton-Raphson method, applied to the function $ f(x) = x^{2} - a $. This particular iteration exhibits quadratic convergence, which means that the number of correct digits about doubles in size with each successive step. Hence, on an ordinary scientific calculator, one can obtain a good approximation after just a few steps.

share|improve this answer
3  
I remember asking my teacher in about third grade, since we were doing the division step by hand as well, and a certain amount of careful work was involved, to how many digits should we calculate $a / x_n?$ I never got an answer. –  Will Jagy Oct 19 '12 at 23:07
1  
I do not think it accepted your edit. Try to put in $\frac{a}{x_n}$ again and be careful to hit whatever button means "save edit." Never mind, I did it. –  Will Jagy Oct 19 '12 at 23:09
3  
That is known as the Babylonian method. –  MJD Oct 19 '12 at 23:15
1  
@WillJagy: Thanks! My keyboard is having some problems, so typing is a little difficult. –  Haskell Curry Oct 19 '12 at 23:19
2  
Haskell, I have always had good luck using my home version of Latex, composing there until it is what I actually want, then copying and pasting to window here. Not usually necessary for short posts unless your computer has serious problems. Very helpful with long posts if the computer insists on rendering the Latex/MathJax as you go along, thus slowing things down. –  Will Jagy Oct 19 '12 at 23:23
show 4 more comments

Use $$(1+x)^{1/2}=\sum_{n=0} \binom{1/2}{n}x^n$$ for $|x|<1$, where $\binom{a}{n}=\frac{a(a-1)\dots (a-n+1)}{n!}$.

share|improve this answer
add comment

Observe that $$\sin \left( {\frac{\pi }{4}} \right) = \cos \left( {\frac{\pi }{4}} \right) = \frac{{\sqrt 2 }}{2}$$ so you can use Taylor series for either $\sin (\pi /4)$ or $\cos (\pi /4)$ to approximate ${\sqrt 2 }$ for example.

Or you could just use linear approximation from calculus.

I am not familiar with algorithms, but it seems like linear approximation should be easier.

share|improve this answer
4  
How does this generalize to arbitrary $x$? –  copper.hat Oct 19 '12 at 22:57
1  
Well, the easier way is $\sqrt r = \sum\nolimits_{n = 0}^\infty {{{\left( {\ln \sqrt r } \right)}^n}/n!}$ for $r \in {\mathbb R}$. –  glebovg Oct 19 '12 at 23:07
2  
But you need to calculate $ \ln(\sqrt{r}) $, and the $ \ln $ function, I believe, is more complicated than the square-root function. –  Haskell Curry Oct 19 '12 at 23:13
1  
@HaskellCurry I agree. So I think linear approximation is the easiest solution. –  glebovg Oct 19 '12 at 23:17
2  
But you have to calculate powers of $\pi/4$. That does not sound very convenient to me. –  MJD Oct 19 '12 at 23:59
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.