# How do you find the square root of #13#?

##### 2 Answers

Use a Newton Raphson method to find:

#sqrt(13) ~~ 842401/233640 ~~ 3.60555127547#

#### Explanation:

Since

Linearly interpolating, a reasonable first approximation would be:

#sqrt(13) ~~ 3.6 = 18/5#

We can get better approximations from our initial one (call it

A typical formula used to derive a more accurate approximation for

#a_(i+1) = (a_i^2+n)/(2a_i)#

I prefer to separate

#{ (p_(i+1) = p_i^2 + n q_i^2), (q_(i+1) = 2 p_i q_i) :}#

In our example,

#{ (p_1 = p_0^2 + 13 q_0^2 = 324 + 13*25 = 649), (q_1 = 2 p_0 q_0 = 180) :}#

If we stopped here our approximation would be:

#sqrt(13) ~~ 649/180 = 3.60bar(5)#

Let's try one more iteration:

#{ (p_2 = p_1^2 + 13 q_1^2 = 421201 + 13*32400 = 842401), (q_2 = 2 p_1 q_1 = 233640) :}#

Stopping here, we have:

#sqrt(13) ~~ 842401/233640 ~~ 3.60555127547#

Using a calculator:

#sqrt(13) ~~ 3.60555127546398929311#

Find

#### Explanation:

Look for a generalised continued fraction of the form:

#sqrt(13) = a + b/(2a+b/(2a+b/(2a+...)))#

#color(white)(sqrt(13)) = a + b/(a+sqrt(13))#

Multiply both ends by

#color(red)(cancel(color(black)(a sqrt(13)))) + 13 = a^2 + color(red)(cancel(color(black)(a sqrt(13)))) + b#

Hence:

#b = 13 - a^2#

In order that our generalised continued fraction converges quickly choose a rational approximation

Note that

#sqrt(13) ~~ 3.6 = 18/5#

Note also that:

#(18/5)^2 = 324/25 < 325/25 = 13#

So let

#sqrt(13) = 18/5 + (1/25)/(36/5 + (1/25)/(36/5 + (1/25)/(36/5+...)))#

We can truncate this continued fraction to get a rational approximation of any desired accuracy.

For example:

#sqrt(13) ~~ 18/5 + (1/25)/(36/5) = 18/5+1/180 = 649/180 = 3.60bar(5)#

Or:

#sqrt(13) ~~ 18/5 + (1/25)/(36/5 + (1/25)/(36/5)) = 23382/6485 ~~ 3.60555127#