Square root

In mathematics, the principal square root of a non-negative real number is denoted and represents the non-negative real number whose square (the result of multiplying the number by itself) is x\,\!.

For example, \sqrt 9 = 3 since 32 = 3 × 3 = 9.

This example suggests how square roots can arise when solving quadratic equations such as x^2=9 or, more generally, ax^2+bx+c=0.

There are two solutions to the square root of a non-zero number. For a positive real number, the two square roots are the principle square root and the negative square root. For negative real numbers, the concept of imaginary and complex numbers has been developed to provide a mathematical framework to deal with the results.

Square roots of positive integers are often irrational numbers, i.e., numbers not expressible as a quotient of two integers. For example, \sqrt 2 cannot be written exactly as m/n, where n and m are integers. Nonetheless, it is exactly the length of the diagonal of a square with side length 1.

The discovery that \sqrt 2 is irrational is attributed to Hippasus, a disciple of Pythagoras.

The square root symbol (√) was first used during the r, representing the Latin radix (meaning "root").

Contents
"#Properties">1 Properties
"#Common_errors_involving_equations_with_the_principal_square_root_function">2 Common errors involving equations with the principal square root function
"#Computing_square_roots">3 Computing square roots

"#Calculators">3.1 Calculators
"#Babylonian_method">3.2 Babylonian method
"#Simple_approximation">3.3 Simple approximation

"#Construction">3.3.1 Construction

"#Bakhshali_approximation">3.4 Bakhshali approximation

"#Bakhshali_approximation_example">3.4.1 Bakhshali approximation example

"#An_exact_.22long-division_like.22_algorithm">3.5 An exact "long-division like" algorithm
"#Rough_estimation">3.6 Rough estimation
"#More_accurate_rough_estimation">3.7 More accurate rough estimation
"#Square_roots_using_Newton_iteration">3.8 Square roots using Newton iteration

"#First_method">3.8.1 First method
"#Second_method">3.8.2 Second method
"#Example">3.8.3 Example
"#Comparison">3.8.4 Comparison

"#Pell.27s_equation">3.9 Pell's equation
"#Finding_square_roots_using_mental_arithmetic">3.10 Finding square roots using mental arithmetic
"#Finding_square_roots_using_basic_arithmetic">3.11 Finding square roots using basic arithmetic
"#Continued_fraction_methods">3.12 Continued fraction methods
"#Quadratic_equation_method">3.13 Quadratic equation method

"#Example_using_the_quadratic_equation_method">3.13.1 Example using the quadratic equation method

"#Square_roots_of_complex_numbers">4 Square roots of complex numbers
"#Square_roots_of_matrices_and_operators">5 Square roots of matrices and operators
"#Infinitely_nested_square_roots">6 Infinitely nested square roots
"#Square_roots_of_the_first_20_positive_integers">7 Square roots of the first 20 positive integers
"#See_also">8 See also
["/psypsych?title=Square_root&action=edit&section=1" title="Square root">edit]

Properties

\sqrt{xy} = \sqrt x \sqrt y \qquad \Rightarrow \qquad \sqrt{100\,y} \, = \, 10 \cdot \sqrt y
\sqrt{\frac{x}{y}} = \frac{\sqrt{x}}{\sqrt{y}} \qquad \Rightarrow \qquad \sqrt{\left ( \frac{x}{100}\right ) } = \frac{\sqrt{x}}{10}
\sqrt{x^2} = \left|x\right| for every real number x (see "/psypsych/Absolute_value" title="Absolute value">absolute value)
\sqrt x = x^{1/2}
\sqrt x - \sqrt y = \frac{x-y}{\sqrt x + \sqrt y}
It is valid for all non-negative numbers x and y which are not both zero.

(Missing image)
"http://en.wikipedia.org/wiki/">Image:Square_root.png

f'(x) = \frac{1}{2\sqrt x}
\sqrt{x+1}=1 +

\sum_{n=1}^\infty { (-1)^{n+1} (2n-2)! \over n! (n-1)! 2^{2n-1} }x^n

= 1 + \frac{1}{2}x - \frac{1}{8}x^2 + \frac{1}{16} x^3 - \frac{5}{128} x^4 + \dots
for \left| x \right| < 1.
["/psypsych?title=Square_root&action=edit&section=2" title="Square root">edit]

Common errors involving equations with the principal square root function

  1. Not recognising x^{1/2} as the principal square root of x in a squaring step followed by principal square root step.
    -1 = -1^1 = -1^{2/2} = (-1^2)^{1/2} = 1^{1/2} = 1\,\!

    In details we have:
    -1=-1^1\,\!
    -1^1=-1^{2/2}\,\!
    -1^{2/2}=\sqrt{-1^2}\qquad\mathbf{Error!}\,\!
    This is because -1^{2/2}=-1\,\! and \sqrt{-1^2}=\sqrt{1} so
    -1\ne\sqrt{1}
    The error comes in taking the principal square root of a square of −1.

  2. Not taking into account false root(s) when squaring equations with the principal square root function

    x - 1 = \sqrt{x}\,\!
    x^2 - 2x + 1 = x\,\! squaring both sides which introduces the false root x=0.38197
    x^2 - 3x + 1 = 0\,\! move x from the right hand side to the left hand side
    Using the "/psypsych/Quadratic_formula" title="Quadratic formula">quadratic equation formula, we get the solutions
    x=2.618 or x=0.38197

    But when we substitute back x=0.38197
    0.38197 - 1 = \sqrt{0.38197}
    -0.61803 = 0.61803 Error!
["/psypsych?title=Square_root&action=edit&section=3" title="Square root">edit]

Computing square roots

["/psypsych?title=Square_root&action=edit&section=4" title="Square root">edit]

Calculators

"/psypsych/Calculator" title="Calculator">Pocket calculators typically implement good routines to compute the "/psypsych/Exponential_function" title="Exponential function">exponential function and the "/psypsych/Natural_logarithm" title="Natural logarithm">natural logarithm, and then compute the square root of x using the identity

\sqrt{x} = e^{\frac{1}{2}\ln x}

The same identity is exploited when computing square roots with "/psypsych/Logarithm_table" title="Logarithm table">logarithm tables or "/psypsych/Slide_rule" title="Slide rule">slide rules.

["/psypsych?title=Square_root&action=edit&section=5" title="Square root">edit]

Babylonian method

A commonly used algorithm for approximating \sqrt r is known as the "Babylonian method" and is based on "/psypsych/Newton%27s_method" title="Newton's method">Newton's method. It proceeds as follows:

  1. start with an arbitrary positive start value x (the closer to the root the better)
  2. replace x by the average of x and r/x
  3. go to 2

This is a quadratically convergent algorithm, which means that the number of correct digits of r roughly doubles with each step.

This could be represented as

x_{n+1} = 0.5 (x_n + \frac{r}{x_n})

where \lim_{n \to \infty} x_n = \sqrt r.

This algorithm works equally well in the "/psypsych/P-adic_numbers" title="P-adic numbers">p-adic numbers, but cannot be used to identify real square roots with p-adic square roots; it is easy, for example, to construct a sequence of rational numbers by this method which converges to +3 in the reals, but to -3 in the 2-adics.

["/psypsych?title=Square_root&action=edit&section=6" title="Square root">edit]

Simple approximation

The simple approximation is rather simple and can be highly inaccurate. The amount of inaccuracy for this approximation is dependent on the value of the expression d/2N , the larger the value of this expression, the more inaccurate the value of the approximated result.

["/psypsych?title=Square_root&action=edit&section=7" title="Square root">edit]

Construction

If N > 0 and d > 0 then

N^2 \quad < \quad N^2 + d \quad < \quad N^2 + 2\,d + \frac{d^2}{N^2}
N^2 \quad < \quad N^2 + d \quad < \quad N^2 + 2\left( N \right) \left( \frac{d}{N} \right) + \left( \frac{d}{N} \right)^2
N^2 \quad < \quad N^2 + d \quad < \quad \left( N + \frac{d}{N} \right)^2
N \quad < \quad \sqrt{N^2 + d } \quad < \quad N + \frac{d}{N}

So the solution for \sqrt{N^2 + d} must be between (N) and ( N + \frac{d}{N})

\sqrt{N^2 + d} \, \approx \, average ( N , N + \frac{d}{N} )
\sqrt{N^2 + d} \, \approx \, \frac{1}{2} \left( N + N + \frac{d}{N} \right)

Thus

\sqrt{N^2 + d} \, \approx \, N + \frac{d}{2\,N}
["/psypsych?title=Square_root&action=edit&section=8" title="Square root">edit]

Bakhshali approximation

The Bakhshali square root approximation is a mathematical method for finding an approximation to a square root which was described in an ancient manuscript by the name of "The Bakhshali Manuscript" because it was discovered in 1881 near the village of Bakhshali (or Bakhshalai) in the Yusufzai subdivision of the Peshawar district (now part of Pakistan). The manuscript was made out of the leaves of birch bark tree and was written in Sarada script.

The Bakhshali square root approximation is just the simple approximation applied twice.

Let P \,=\, \frac{d}{2 N}

Let A = N + P

\sqrt{N^2 + d} \approx A - \frac{P^2}{2 A}

When expanded, the equation becomes

\sqrt{N^2 + d} \approx N + \frac{d}{2\,N} - \frac{d^2}{8\,N^3 + 4\,N\,d}
["/psypsych?title=Square_root&action=edit&section=9" title="Square root">edit]

Bakhshali approximation example

Find \sqrt{9.2345}

Using N=3 \qquad and \qquad d = 9.2345 - 3^2 = 0.2345
\sqrt{3^2 + d} \approx 3 + \frac{d}{6} - \frac{d^2}{216 + 12\,d}
\sqrt{3^2 + 0.2345} \approx 3 + \frac{0.2345}{6} - \frac{0.2345^2}{216 + 12 \cdot 0.2345}
\sqrt{3^2 + 0.2345} \approx 3 + 0.039083 - \frac{0.055}{216 + 2.814}
\sqrt{3^2 + 0.2345} \approx 3 + 0.039083 - 0.000251
\sqrt{3^2 + 0.2345} \approx 3.038832
["/psypsych?title=Square_root&action=edit&section=10" title="Square root">edit]

An exact "long-division like" algorithm

This method, while much slower than the Babylonian method, has the advantage that it is exact: if the given number has a square root whose decimal representation terminates, then the algorithm terminates and produces the correct square root after finitely many steps. It can thus be used to check whether a given integer is a "/psypsych/Square_number" title="Square number">square number.

Write the number in decimal and divide it into pairs of digits starting from the decimal point. The numbers are laid out similar to the long division algorithm and the final square root will appear above the original number.

For each iteration:

  1. Bring down the most significant pair of digits not yet used and append them to any remainder. This is the current value referred to in steps 2 and 3.
  2. If s denotes the part of the result found so far, determine the greatest digit x that does not make y = x(20s + x) exceed the current value. Place the new digit x on the quotient line.
  3. Subtract y from the current value to form a new remainder.
  4. If the remainder is zero and there are no more digits to bring down the algorithm has terminated. Otherwise continue with step 1.

Example: What is the square root of 152.2756?

           1  2. 3  4 
       |  01 52.27 56                              1    The digit 1 is a solution digit
x         01                   1(20*0+1)=1        +1 
          00 52                                    22   The digit 2 is a solution digit
2x        00 44                2(20*1+2)=44       + 2 
             08 27                                 243  The digit 3 is a solution digit
24x          07 29             3(20*12+3)=729     +  3 
                98 56                              2464 The digit 4 is a solution digit
246x            98 56          4(20*123+4)=9856       4
                00 00          Algorithm terminates: answer is 12.34

Although demonstrated here for base 10 numbers, the procedure works for any "/psypsych/Numeral_system" title="Numeral system">base, including "/psypsych/Binary_numeral_system" title="Binary numeral system">base 2. In the description above, 20 means double the number base used, in the case of binary this would really be 100. The algorithm is in fact much easier to perform in base 2, as in every step only the two digits 0 and 1 have to be tested. See "/psypsych/Shifting_nth-root_algorithm" title="Shifting nth-root algorithm">Shifting nth-root algorithm.

["/psypsych?title=Square_root&action=edit&section=11" title="Square root">edit]

Rough estimation

Many of the methods used for finding the square root of a number requires an initial seed value which is close to the actual value of the square root. One way of obtaining a very rough estimate of the value of the square root is as follows.

Provided that n » 1

Steps

  1. Take the integer part of the number n. Z = int(n)
  2. Count the number of digits in Z. Let D be the number of digits.
  3. Calculate the value of 3^D where the symbol " ^ " is to-the-n-power operator.
  4. The rough estimate is half the value obtain in step 3. E = (3 ^ D) / 2

Example


n Z D 3 ^ D Estimate (E) Actual Value of √n
723.47 723 3 27 13.5 26.89
5396.37 5396 4 81 40.5 73.45
24956.41 24956 5 243 121.5 157.96
789345.464 789345 6 729 364.5 888.45


["/psypsych?title=Square_root&action=edit&section=12" title="Square root">edit]

More accurate rough estimation

Similar to the rough estimation procedure above. This version is slightly more accurate because it also uses the additional information provided by the first digit of the number n. The steps are almost the same as the one for previous rough estimate.

Provided that n » 1

Steps

  1. Take the integer part of the number n. Z = int(n)
  2. Count the number of digits in Z. Let D be the number of digits.
  3. Calculate the value of 3.16 ^ D where the symbol " ^ " is to-the-n-power operator. Note: 3.16 ≈ √10
  4. The estimate is the value obtain in step 3 multiple by an adjustment factor based on the first (left most) digit of the number n. E = ADJ * 3.16 ^ D

Table of ADJ


First Digit 1 2 3 4 5 6 7 8 9
ADJ 0.32 0.45 0.55 0.63 0.71 0.78 0.84 0.90 0.95


Example


n Z D 3.16 ^ D ADJ Estimate (E) Actual Value of √n
723.47 723 3 31.55 0.84 26.50 26.89
5396.37 5396 4 99.71 0.71 70.79 73.45
24956.41 24956 5 315.09 0.45 141.79 157.96
789345.464 789345 6 995.7 0.84 836.37 888.45


["/psypsych?title=Square_root&action=edit&section=13" title="Square root">edit]

Square roots using Newton iteration

Basic "/psypsych/Newton%27s_method" title="Newton's method">Newton iteration finds a single root of a function f(x) given a sufficiently precise approximation to the root. The nature of which root will be given based on an approximation is dependent on the "/psypsych?title=Newton_fractal&action=edit" class="new" title="Newton fractal">Newton fractal which we will not discuss here any further. The basic iteration is given by:

x_{n+1} = x_n - {f(x_n) \over f^\prime(x_n)}.

There are two widely used functions f(x) and g(x) used to find the square root of a number denoted by "z".

["/psypsych?title=Square_root&action=edit&section=14" title="Square root">edit]

First method

The first method finds the square root of "z"

f(x) = x^2 - z \,

Note that both \sqrt{z} and - \sqrt{z} are roots of the function f(x). ie f( \sqrt{z} ) = 0.

The first derivative of f(x) is f^\prime(x) = 2 x

Thus iteration for x_{n+1} is derived where:

x_0 = 1 \,\,\,        and

x_{n+1}\,\! = x_n - {f(x_n) \over f^\prime(x_n)}
= x_n - {(x_n^2 - z) \over 2 x_n}
= x_n - \frac {x_n}{2} + \frac {z}{2 \,\,\, x_n}
= \frac {x_n}{2} + \frac {z}{2 \,\,\, x_n}.


["/psypsych?title=Square_root&action=edit&section=15" title="Square root">edit]

Second method

The second method finds the reciprocal of the square root of "z".

g(x) = \frac{1}{x^{2}} - z.

The two roots to g(x) are \frac{1}{\sqrt{z}} and \frac{-1}{\sqrt{z}}.

The derivative of g(x) is g^\prime(x) = -2 x^{-3}.

Thus iteration for x_{n+1} is derived where:

x_0 = 0.5        and

x_{n+1} \,\! = x_n - {g(x_n) \over g^\prime(x_n)}
= x_n - {x_n^{-2} - z \over -2 x_n^{-3}}
= x_n - (-1/2) {x_n^3} (x^{-2} - z)
= x_n + (1/2) (x_n - z x_n^3)
= \frac{ 3 x_n - z x_n^3 }{2}
= 1.5 \, x_n - 0.5 \, z x_n^3 = 0.5 \, x_n \,\, ( 3 - z x_n^2 ).


["/psypsych?title=Square_root&action=edit&section=16" title="Square root">edit]

Example

Find the \sqrt{7} using both methods.

z = 7 \, Because we are looking for the square root of 7


f(x)\, g(x)\,
x_0\, 1\, x_0\, 0.5\,
x_1\, \frac{1}{2} + \frac{7}{2 \times 1} = 4 x_1\, 0.5 \times 0.5 \,\, ( 3 - 7 (0.5)^2 ) = 0.312 \frac{1}{x_1}= 3.2\,
x_2\, \frac{4}{2} + \frac{7}{2 \times 4} = 2.875 x_2\, 0.5 \times 0.312 \,\, ( 3 - 7 (0.312)^2 ) = 0.362 \frac{1}{x_2}= 2.762\,
x_3\, \frac{2.875}{2} + \frac{7}{2 \times 2.875} = 2.654 x_3\, 0.5 \times 0.362 \,\, ( 3 - 7 (0.362)^2 ) = 0.376 \frac{1}{x_3}= 2.652\,
x_4\, \frac{2.654}{2} + \frac{7}{2 \times 2.654} = 2.645 x_4\, 0.5 \times 0.376 \,\, ( 3 - 7 (0.376)^2 ) = 0.378 \frac{1}{x_4}= 2.645\,
\sqrt{7} \approx 2.645 \sqrt{7} \approx 2.645


["/psypsych?title=Square_root&action=edit&section=17" title="Square root">edit]

Comparison

The iteration for f(x) involves a division which is more time consuming than a multiplication in computer integer arithmetic. The iteration for g(x) involves no division and is thus recommended for large integers z.

This iteration using "g" involves only a squaring and two multiplications, as opposed to a division in the case of f. In practical implementations of large integer square roots, the iteration involving g is faster for large integers z since division is at best O(M(n)), a constant times the time function of multiplication. The constant term is almost always 3 or more, meaning that a single division can almost never be faster than 3 multiplications.

["/psypsych?title=Square_root&action=edit&section=18" title="Square root">edit]

Pell's equation

"/psypsych/Pell%27s_equation" title="Pell's equation">Pell's equation yields a method for finding rational approximations of square roots of integers.

["/psypsych?title=Square_root&action=edit&section=19" title="Square root">edit]

Finding square roots using mental arithmetic

Based on Pell's equation there is a method to calculate square roots simply by subtracting odd numbers.

Ex: For \sqrt{27} we start with the following sequence:

  1. 27-1 = 26
  2. 26-3 = 23
  3. 23-5 = 18
  4. 18-7 = 11
  5. 11-9 = 2

Five steps have been taken and thus the integer part of the square root of 27 is 5.

2× 100 = 200 and 5× 20 + 1 = 101

  1. 200-101 = 99

Next digit is 1.

99× 100 = 9900 and 51× 20 + 1 = 1021

  1. 9900-1021 = 8879
  2. 8879-1023 = 7856
  3. 7856-1025 = 6831
  4. 6831-1027 = 5804
  5. 5804-1029 = 4775
  6. 4775-1031 = 3744
  7. 3744-1033 = 2711
  8. 2711-1035 = 1676
  9. 1676-1037 = 639

Next digit is 9.

639 × 100 = 63900 and 519 × 20 + 1 = 10381

  1. 63900-10381 = 53519
  2. 53519-10383 = 43136
  3. 43136-10385 = 32751
  4. 32751-10387 = 22364
  5. 22364-10389 = 11975
  6. 11975-10391 = 1584

Next digit is 6.

The result gives us 5.196 as an approximation of the square root of 27

["/psypsych?title=Square_root&action=edit&section=20" title="Square root">edit]

Finding square roots using basic arithmetic

If you have access to a calculator capable of addition, subtraction, multiplication and division then the following method can be used to find the square root of a number.

Find \sqrt{Z}

A_{base} = Z \qquad \qquad \qquad \qquad at \quad the \quad very \quad start
B_{base} = SOLN \times 20 + 1 \qquad where \quad SOLN=0 \quad at \quad the \quad very \quad start

The starting values are

D_0 = 9
A_0 = A_{base} + D_0 \, (D_0 - 1)
B_0 = B_{base} + 2 \, (D_0 - 1)

Now find new values for each variable

A_n = A_{base} + D_n \, ( D_n - 1 )
B_n = B_{base} + 2 \, ( D_n - 1 )
D_{n+1} = floor ( A_n \div B_n )

We found a digit when the value of    D_n    is equal to the value of    floor ( A_n \div B_n )

After a new digit has been found.

New A_{base} = 100 \, ( A_n - B_n \times D_n )
New B_{base} = SOLN \times 20 + 1


The step are shown in the table below

Find \sqrt{27}
A_{base} = Z = 27 and B_{base} = 0 \times 20 + 1 = 1
n D_n A_n B_n floor ( A_n \div B_n ) Remarks SOLN
n=0 9 27 + 9 \times 8 = 99 1 + 2 \times 8 = 17 5
n=1 5 27 + 5 \times 4 = 47 1 + 2 \times 4 = 9 5 STOP 5
A_{base} = 100 \, (47 - 9 \times 5 ) = 200 and B_{base} = 5 \times 20 + 1 = 101
n=0 9 200 + 9 \times 8 = 272 101 + 2 \times 8 = 117 2
n=1 2 200 + 2 \times 1 = 202 101 + 2 \times 1 = 103 1
n=2 1 200 + 1 \times 0 = 200 101 + 2 \times 0 = 101 1 STOP 51
A_{base} = 100 \, (200 - 101 \times 1 ) = 9900 and B_{base} = 51 \times 20 + 1 = 1021
n=0 9 9900 + 9 \times 8 = 9972 1021 + 2 \times 8 = 1037 9 STOP 519
A_{base} = 100 \, (9972 - 1037 \times 9 ) = 63900 and B_{base} = 519 \times 20 + 1 = 10381
n=0 9 63900 + 9 \times 8 = 63972 10381 + 2 \times 8 = 10397 6
n=1 6 63900 + 6 \times 5 = 63930 10381 + 2 \times 5 = 10391 6 STOP 5196
A_{base} = 100 \, (63930 - 10391 \times 6 ) = 158400 and B_{base} = 5196 \times 20 + 1 = 103921
n=0 9 158400 + 9 \times 8 = 158472 103921 + 2 \times 8 = 103937 1
n=1 1 158400 + 1 \times 0 = 158400 103921 + 2 \times 0 = 103921 1 STOP 51961
\sqrt{27} \approx 5.1961


["/psypsych?title=Square_root&action=edit&section=21" title="Square root">edit]

Continued fraction methods

Quadratic irrationals, that is numbers involving square roots in the form (a + √b)/c, have periodic "/psypsych/Continued_fraction" title="Continued fraction">continued fractions. This makes them easy to calculate recursively given the period. For example, to calculate √2, we make use of the fact that √2 − 1 = [0; 2, 2, 2, 2, 2, ...], and use the recurrence relation

an + 1 = 1/(2 + an) with a0 = 0

to obtain √2 − 1 to some specific precision specified through n levels of recurrence, and add 1 to the result to obtain √2.

The information given above is not helpful to finding the square root of a number using continue fractions. For example: try finding √5 using continue fraction. there are no steps given to find that √5 = [2; 4, 4, 4, 4, ... ] It assumes that the user knows that 4 is repeated indefinitely without giving the steps for calculating it.

I shall attempt to write the algorithm for find square root using continued fractions.

Find \sqrt{r} using continued fractions

\sqrt{r} = N_0 + \frac{1}{N_1 + \frac{1}{N_2 + \frac{1}{N_3+\,\cdots}}}

Let \sqrt{r}=\sqrt{N_0^2 + d}= N_0 + \frac{1}{X_0} \qquad where \quad X_0 > 1

X_0 = N_1 + \frac{1}{X_1}
X_1 = N_2 + \frac{1}{X_2}
X_2 = N_3 + \frac{1}{X_3}

Step 1. Find N_0 using some other method. The best method is N_0 = intsqrt(r) using some other algorithmn to determine the integer square root.

N_0 = intsqrt(r)

Step 2. Write X_0 in terms of itself.

X_0 = \frac{1}{\sqrt{r}-N_0} \qquad from \qquad \sqrt{r} = N_0 + \frac{1}{X_0}
X_0 = \frac{1}{\sqrt{r}-N_0} \times \frac{\sqrt{r}+N_0}{\sqrt{r}+N_0} = \frac{\sqrt{r}+N_0}{r-N_0^2} = \frac{\sqrt{r}+N_0}{d}
substitute \quad \sqrt{r} \quad with \quad N_0 + \frac{1}{X_0}
X_0 = \frac{(N_0 + \frac{1}{X_0})+N_0}{d} = \frac{2\,N_0 + \frac{1}{X_0}}{d} = \frac{ 2\,N_0}{d} + \frac{1}{d \,X_0 } = \frac{2\,N_0}{d} + \frac{1}{X_1}

Step 3. Evaluate N_1 using floor \left(\frac{2\,N_0}{d}\right)


N_1 = floor \left(\frac{2\,N_0}{d}\right)
X_0 = N_1 + \frac{1}{X_1}

Step 4. Substitute X_0 with \frac{\sqrt{r}+N_0}{d}

\frac{\sqrt{r}+N_0}{d} = N_1 + \frac{1}{X_1}
\frac{\sqrt{r}+N_0}{d} - N_1 = \frac{1}{X_1}
\frac{\sqrt{r}+N_0 - d\,N_1}{d} = \frac{1}{X_1}
X_1 = \frac{d}{\sqrt{r}+ \left(N_0 - d\,N_1 \right)} = \frac{d}{\sqrt{r}+ \left(N_0 - d\,N_1 \right)} \times \frac{\sqrt{r}- \left(N_0 - d\,N_1 \right)}{\sqrt{r} - \left(N_0 - d\,N_1 \right)}
X_1 = \frac{d \times \left( \sqrt{r}- \left(N_0 - d\,N_1 \right) \right)}{r - \left(N_0 - d\,N_1 \right)^2} = \frac{\sqrt{r}- \left(N_0 - d\,N_1 \right)}{\frac{r - \left(N_0 - d\,N_1 \right)^2}{d}} = \frac{\sqrt{r} + \left(d\,N_1 - N_0\right)}{\frac{r - \left(N_0 - d\,N_1 \right)^2}{d}}
substitute \quad \sqrt{r} \quad with \quad N_0 + \frac{1}{X_0}
X_1 = \frac{ N_0 + \frac{1}{X_0} + \left(d\,N_1 - N_0\right)}{ \frac{r - \left(N_0 - d\,N_1 \right)^2}{d}} = \frac{ d\,N_1 + \frac{1}{X_0} }{ \frac{r - \left(N_0 - d\,N_1 \right)^2}{d}} = \frac{ d\,N_1 + \frac{1}{X_0} }{B} = \frac{d\,N_1}{B} + \frac{1}{B\,X_0} = \frac{d\,N_1}{B} + \frac{1}{X_2}

Step 5. Evaluate N_2 using floor \left(\frac{d\,N_1}{B}\right)

N_2 = floor \left(\frac{d\,N_1}{B}\right)
X_1 = N_2 + \frac{1}{X_2}

Repeat step 4 and step 5 for X_3 , X_4 , X_5 , ...

["/psypsych?title=Square_root&action=edit&section=22" title="Square root">edit]

Quadratic equation method

The solution to a properly setup quadratic equation can be used to find \sqrt{r} where 1 < r < 100


For square root of values greater or equal to 100, use the following identity:
\sqrt{105.3} = \sqrt{1.053} \times 10

For square root of values less than 1, use the following indentity:

\sqrt{0.1053} = \sqrt{10.53} \,\div\, 10


Using the equation \sqrt{r} \,=\, N + \frac{1}{X}      where X > 0 and N \in \{1,2,3,4,5,6,7,8,9\}

\sqrt{r} \,=\, N + \frac{1}{X}
r \,=\, { \left( N + \frac{1}{X} \right ) }^2
r \,=\, N^2 + \frac{2\,N}{X} + \frac{1}{X^2}
0 \,=\, \left( N^2 - r \right) + \frac{2\,N}{X} + \frac{1}{X^2}
\left( N^2 - r \right) + \frac{2\,N}{X} + \frac{1}{X^2} \,=\, 0
\left( N^2 - r \right) \, X^2 + \left( 2\,N \right) X + 1 \,=\, 0

Solve for X using "/psypsych/Quadratic_formula" title="Quadratic formula">quadratic equation formula, choose the solution that satisfy the restriction X > 0 .

Final solution is :

\sqrt{r} \,=\, N + \frac{1}{X}

The obvious problem is that we cannot evaluate the solutions to the quadratic equation without the usage of the square root function. However we can make the snake bite its own tail.

\left( N^2 - r \right) \, X^2 + \left( 2\,N \right) X + 1 \,=\, 0
Let r \, = \, N^2 + d
Thus d \, = \, r - N^2
And - d \, = \, N^2 - r

So the quadratic equation becomes :

\left( - d \right) \, X^2 + \left( 2\,N \right) X + 1 \,=\, 0

Solving for X as far as possible brings

X \, = \, \frac{N + \sqrt{N^2 + d}}{d}

Reciprocal

\frac{1}{X} \, = \, \frac{d}{N + \sqrt{N^2 + d}}

So the final solution becomes

\sqrt{r} \,=\, N + \frac{1}{X}
\sqrt{r} \,=\, N + \frac{d}{N + \sqrt{N^2 + d}}
\sqrt{r} \,=\, N + \frac{d}{N + \sqrt{r}}

Lets go deeper by substituting √r on the right hand side with its own definition.

\sqrt{r} \,=\, N + \frac{d}{N + \left( N + \frac{d}{N + \sqrt{r}} \right) }

Renormalise

\sqrt{r} \,=\, N + \frac{d}{2 N + \frac{d}{N + \sqrt{r}} }

Deeper still

\sqrt{r} \,=\, N + \frac{d}{2 N + \frac{d}{2 N + \frac{d}{N + \sqrt{r}} } }

And so on and so forth

\sqrt{r} \,=\, N + \frac{d}{2 N + \frac{d}{2 N + \frac{d}{2 N + \frac{d}{N + \sqrt{r}} } } }


["/psypsych?title=Square_root&action=edit&section=23" title="Square root">edit]

Example using the quadratic equation method

Find \sqrt{923.45}

\sqrt{923.45} \,=\, \sqrt{9.2345} \times 10
First find \sqrt{9.2345}.
\sqrt{r} \,=\, N + \frac{1}{X}
\sqrt{9.2345} \,=\, N + \frac{1}{X}

Hence N \,=\, 3 \,\! because \!\; 3^2 \; < \; 9.2345 \; < \; 4^2

\left( N^2 - r \right) \, X^2 + \left( 2\,N \right) X + 1 \,=\, 0
\left( 3^2 - 9.2345 \right) \, X^2 + \left( 2 \, \cdot \, 3 \right) X + 1 \,=\, 0
-0.2345 \, X^2 + 6 \, X + 1 \,=\, 0


Using the "/psypsych/Quadratic_formula" title="Quadratic formula">quadratic equation formula, we get the two solutions. soln1 = - 0.165 or soln2 = 25.7519

Choose soln2 as it satisfy the restriction X > 0 .

Hence X = 25.7519
\sqrt{9.2345} \,=\, 3 + \frac{1}{25.7519} \,=\, 3.03883

Alternatively

\sqrt{r} \,=\, N + \frac{d}{2 N + \frac{d}{2 N + \frac{d}{N + \sqrt{r}} } }
\sqrt{9.2345} \,=\, 3 + \frac{0.2345}{6 + \frac{0.2345}{6 + \frac{0.2345}{3 + \sqrt{9.2345}} } }
\sqrt{9.2345} \,\approx\, 3 + \frac{0.2345}{6 + \frac{0.2345}{6 + \frac{0.2345}{3 + 3} } }
\sqrt{9.2345} \,\approx\, 3.03883

And the final solution is

\sqrt{923.45} \,=\, \sqrt{9.2345} \times 10 \,=\, 30.3883
["/psypsych?title=Square_root&action=edit&section=24" title="Square root">edit]

Square roots of complex numbers

To every non-zero "/psypsych/Complex_number" title="Complex number">complex number z there exist precisely two numbers w such that w2 = z. The usual definition of √z is as follows: if z = r exp(iφ) is represented in polar coordinates with -π < φ ≤ π, then we set √z = √r exp(iφ/2). Thus defined, the square root function is "/psypsych/Holomorphic_function" title="Holomorphic function">holomorphic everywhere except on the non-positive real numbers (where it isn't even "/psypsych/Continuous" title="Continuous">continuous). The above Taylor series for √(1+x) remains valid for complex numbers x with |x| < 1.

When the number is in rectangular form the following formula can be used:

\sqrt{x+iy} = \sqrt{\frac{\left|x+iy\right| + x}{2}} \pm i \sqrt{\frac{\left|x+iy\right| - x}{2}}

where the sign of the imaginary part of the root is the same as the sign of the imaginary part of the original number.

Note that because of the discontinuous nature of the square root function in the complex plane, the law √(zw) = √(z)√(w) is in general not true. Wrongly assuming this law underlies several faulty "proofs", for instance the following one showing that -1 = 1:

-1 = i \times i = \sqrt{-1} \times \sqrt{-1} = \sqrt{-1 \times -1} = \sqrt{1} = 1

The third equality cannot be justified. (See "/psypsych/Invalid_proof" title="Invalid proof">invalid proof.)

However the law can only be wrong up to a factor -1, √(zw) = ±√(z)√(w), is true for either ± as + or as - (but not both at the same time). Note that √(c2) = ±c, therefore √(a2b2) = ±ab and therefore √(zw) = ±√(z)√(w), using a = √(z) and b = √(w).

["/psypsych?title=Square_root&action=edit&section=25" title="Square root">edit]

Square roots of matrices and operators

If A is a "/psypsych/Positive_definite" title="Positive definite">positive definite matrix or operator, then there exists precisely one positive definite matrix or operator B with B2 = A; we then define √A = B.

More generally, to every "/psypsych/Normal_operator" title="Normal operator">normal matrix or operator A there exist normal operators B such that B2 = A. In general, there are several such operators B for every A and the square root function cannot be defined for normal operators in a satisfactory manner. Positive definite operators are akin to positive real numbers, and normal operators are akin to complex numbers.

["/psypsych?title=Square_root&action=edit&section=26" title="Square root">edit]

Infinitely nested square roots

Under certain condition infinitely nested radicals such as

x = \sqrt{2+\sqrt{2+\sqrt{2+\sqrt{2+\cdots}}}}

represent rational numbers. This rational number can be found by realizing that x also appears under the radical sign, which gives the equation

x = \sqrt{2+x}.

If we solve this equation, we find that x = 2. More generally, we find that

\sqrt{n+\sqrt{n+\sqrt{n+\sqrt{n+\cdots}}}} = \frac{1 + \sqrt {1+4n}}{2}.

The same procedure also works to get

\sqrt{n-\sqrt{n-\sqrt{n-\sqrt{n-\cdots}}}} = \frac{-1 + \sqrt {1+4n}}{2}.

This method will give a rational x value for all values of n such that

{n} = {x^2} + {x}.
["/psypsych?title=Square_root&action=edit&section=27" title="Square root">edit]

Square roots of the first 20 positive integers

√ 1 = 1
√ 2 ≈ 1.4142135623 7309504880 1688724209 6980785696 7187537694 8073176679 7379907324 78462
√ 3 ≈ 1.7320508075 6887729352 7446341505 8723669428 0525381038 0628055806 9794519330 16909
√ 4 = 2
√ 5 ≈ 2.2360679774 9978969640 9173668731 2762354406 1835961152 5724270897 2454105209 25638
√ 6 ≈ 2.4494897427 8317809819 7284074705 8913919659 4748065667 0128432692 5672509603 77457
√ 7 ≈ 2.6457513110 6459059050 1615753639 2604257102 5918308245 0180368334 4592010688 23230
√ 8 ≈ 2.8284271247 4619009760 3377448419 3961571393 4375075389 6146353359 4759814649 56924
√ 9 = 3
√10 ≈ 3.1622776601 6837933199 8893544432 7185337195 5513932521 6826857504 8527925944 38639
√11 ≈ 3.3166247903 5539984911 4932736670 6866839270 8854558935 3597058682 1461164846 42609
√12 ≈ 3.4641016151 3775458705 4892683011 7447338856 1050762076 1256111613 9589038660 33818
√13 ≈ 3.6055512754 6398929311 9221267470 4959462512 9657384524 6212710453 0562271669 48293
√14 ≈ 3.7416573867 7394138558 3748732316 5493017560 1980777872 6946303745 4673200351 56307
√15 ≈ 3.8729833462 0741688517 9265399782 3996108329 2170529159 0826587573 7661134830 91937
√16 = 4
√17 ≈ 4.1231056256 1766054982 1409855974 0770251471 9922537362 0434398633 5730949543 46338
√18 ≈ 4.2426406871 1928514640 5066172629 0942357090 1562613084 4219530039 2139721974 35386
√19 ≈ 4.3588989435 4067355223 6981983859 6156591370 0392523244 4936890344 1381595573 28203
√20 ≈ 4.4721359549 9957939281 8347337462 5524708812 3671922305 1448541794 4908210418 51276

"/psypsych?title=Da:Kvadratrod&action=edit" class="new" title="Da:Kvadratrod">da:Kvadratrod "/psypsych?title=De:Quadratwurzel&action=edit" class="new" title="De:Quadratwurzel">de:Quadratwurzel "/psypsych?title=Es:Ra%EDz_cuadrada&action=edit" class="new" title="Es:Raíz cuadrada">es:Raíz cuadrada "/psypsych?title=Fr:Racine_carr%E9e&action=edit" class="new" title="Fr:Racine carrée">fr:Racine carrée "/psypsych?title=Is:Ferningsr%F3t&action=edit" class="new" title="Is:Ferningsrót">is:Ferningsrót "/psypsych?title=It:Radice_quadrata&action=edit" class="new" title="It:Radice quadrata">it:Radice quadrata "/psypsych?title=Nl:Vierkantswortel&action=edit" class="new" title="Nl:Vierkantswortel">nl:Vierkantswortel "/psypsych?title=Ja:%E5%B9%B3%E6%96%B9%E6%A0%B9&action=edit" class="new" title="Ja:平方根">ja:平方根 "/psypsych?title=Pl:Pierwiastek_kwadratowy&action=edit" class="new" title="Pl:Pierwiastek kwadratowy">pl:Pierwiastek kwadratowy "/psypsych?title=Pt:Raiz_quadrada&action=edit" class="new" title="Pt:Raiz quadrada">pt:Raiz quadrada "/psypsych?title=Su:Akar_kuadrat&action=edit" class="new" title="Su:Akar kuadrat">su:Akar kuadrat "/psypsych?title=Fi:Neli%F6juuri&action=edit" class="new" title="Fi:Neliöjuuri">fi:Neliöjuuri "/psypsych?title=Sv:Kvadratrot&action=edit" class="new" title="Sv:Kvadratrot">sv:Kvadratrot "/psypsych?title=Zh:%E5%B9%B3%E6%96%B9%E6%A0%B9&action=edit" class="new" title="Zh:平方根">zh:平方根