Currently there may be errors shown on top of a page, because of a missing Wiki update (PHP version and extension DPL3). |
Topics | Help • Register • News • History • How to • Sequences statistics • Template prototypes |
Difference between revisions of "Square root"
(restored) |
(Enclosing remaining formulas in <math> tags) |
||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
− | In [[mathematics]], the '''principal square root''' of a [[non-negative]] [[real number]] <math>x | + | In [[mathematics]], the '''principal square root''' of a [[non-negative]] [[real number]] <math>x</math> is denoted <math>\sqrt x</math> and represents the non-negative real number whose ''square'' (the result of multiplying the number by itself) is <math>x</math>. |
− | For example, <math>\sqrt 9 = 3</math> since | + | For example, <math>\sqrt 9 = 3</math> since <math>3^2 = 3 \times 3 = 9</math>. |
− | This example suggests how square roots can arise when solving quadratic equations such as <math>x^2=9</math> or, more generally, <math>ax^2+bx+c=0 | + | This example suggests how square roots can arise when solving quadratic equations such as <math>x^2=9</math> or, more generally, <math>ax^2+bx+c=0</math>. |
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 number|imaginary]] and [[complex number]]s has been developed to provide a mathematical framework to deal with the results. | 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 number|imaginary]] and [[complex number]]s has been developed to provide a mathematical framework to deal with the results. | ||
− | Square roots of positive [[integer]]s are often ''[[irrational number]]s'', i.e., numbers not expressible as a [[quotient]] of two integers. For example, <math>\sqrt 2</math> cannot be written exactly as | + | Square roots of positive [[integer]]s are often ''[[irrational number]]s'', i.e., numbers not expressible as a [[quotient]] of two integers. For example, <math>\sqrt 2</math> cannot be written exactly as <math>m/n</math>, where <math>n</math> and <math>m</math> are integers. Nonetheless, it is exactly the length of the [[diagonal]] of a [[square (geometry)|square]] with side length 1. |
The discovery that <math>\sqrt 2</math> is irrational is attributed to Hippasus, a disciple of Pythagoras. | The discovery that <math>\sqrt 2</math> is irrational is attributed to Hippasus, a disciple of Pythagoras. | ||
Line 14: | Line 14: | ||
==Properties== | ==Properties== | ||
− | *The '''principal square root''' function <math>\sqrt{x}</math> is a function which maps the non-negative real [[domain]] | + | *The '''principal square root''' function <math>\sqrt{x}</math> is a function which maps the non-negative real [[domain]] <math>\mathbb{R}^+ \cup \{0\}</math> into the non-negative real codomain <math>\mathbb{R}^+ \cup \{0\}</math>. |
*The principal square root function <math>\sqrt{x}</math> always returns a single unique value. | *The principal square root function <math>\sqrt{x}</math> always returns a single unique value. | ||
− | *There are only two solutions to the equation <math>x = \sqrt{x}</math> The solution set is { 0,1 }. | + | *There are only two solutions to the equation <math>x = \sqrt{x}</math> The solution set is <math>\{0, 1\}</math>. |
− | *To obtain both roots of a positive number, take the value given by the principal square root function as the first root ( | + | *To obtain both roots of a positive number, take the value given by the principal square root function as the first root (<math>root_1</math>) and obtain the second root (<math>root_2</math>) by subtracting the first root from zero (ie <math>root_2 = 0 - root_1</math>). |
*The following important properties of the square root functions are valid for all positive real numbers <math>x</math> and <math>y</math>: | *The following important properties of the square root functions are valid for all positive real numbers <math>x</math> and <math>y</math>: | ||
:<math>\sqrt{xy} = \sqrt x \sqrt y \qquad \Rightarrow \qquad \sqrt{100\,y} \, = \, 10 \cdot \sqrt y </math> | :<math>\sqrt{xy} = \sqrt x \sqrt y \qquad \Rightarrow \qquad \sqrt{100\,y} \, = \, 10 \cdot \sqrt y </math> | ||
:<math>\sqrt{\frac{x}{y}} = \frac{\sqrt{x}}{\sqrt{y}} \qquad \Rightarrow \qquad \sqrt{\left ( \frac{x}{100}\right ) } = \frac{\sqrt{x}}{10} </math> | :<math>\sqrt{\frac{x}{y}} = \frac{\sqrt{x}}{\sqrt{y}} \qquad \Rightarrow \qquad \sqrt{\left ( \frac{x}{100}\right ) } = \frac{\sqrt{x}}{10} </math> | ||
− | :<math> | + | :<math>\sqrt{x^2} = \left|x\right|</math> for every real number <math>x</math> (see [[absolute value]]) |
:<math>\sqrt x = x^{1/2}</math> | :<math>\sqrt x = x^{1/2}</math> | ||
*The square root [[function (mathematics)|function]] generally maps [[rational number]]s to [[algebraic number]]s; <math>\sqrt x</math> is rational if and only if <math>x</math> is a rational number which, after cancelling, is a ratio of two [[perfect square]]s. In particular, <math>\sqrt 2</math> is [[irrational number|irrational]]. | *The square root [[function (mathematics)|function]] generally maps [[rational number]]s to [[algebraic number]]s; <math>\sqrt x</math> is rational if and only if <math>x</math> is a rational number which, after cancelling, is a ratio of two [[perfect square]]s. In particular, <math>\sqrt 2</math> is [[irrational number|irrational]]. | ||
Line 94: | Line 94: | ||
---- | ---- | ||
===Simple approximation=== | ===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. | + | 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 <math>d/2N</math>, the larger the value of this expression, the more inaccurate the value of the approximated result. |
====Construction ==== | ====Construction ==== |
Latest revision as of 16:52, 24 October 2020
In mathematics, the principal square root of a non-negative real number [math]\displaystyle{ x }[/math] is denoted [math]\displaystyle{ \sqrt x }[/math] and represents the non-negative real number whose square (the result of multiplying the number by itself) is [math]\displaystyle{ x }[/math].
For example, [math]\displaystyle{ \sqrt 9 = 3 }[/math] since [math]\displaystyle{ 3^2 = 3 \times 3 = 9 }[/math].
This example suggests how square roots can arise when solving quadratic equations such as [math]\displaystyle{ x^2=9 }[/math] or, more generally, [math]\displaystyle{ ax^2+bx+c=0 }[/math].
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, [math]\displaystyle{ \sqrt 2 }[/math] cannot be written exactly as [math]\displaystyle{ m/n }[/math], where [math]\displaystyle{ n }[/math] and [math]\displaystyle{ m }[/math] are integers. Nonetheless, it is exactly the length of the diagonal of a square with side length 1.
The discovery that [math]\displaystyle{ \sqrt 2 }[/math] is irrational is attributed to Hippasus, a disciple of Pythagoras.
The square root symbol (√) was first used during the 16th century. It has been suggested that it originated as an altered form of lowercase r, representing the Latin radix (meaning "root").
Contents
Properties
- The principal square root function [math]\displaystyle{ \sqrt{x} }[/math] is a function which maps the non-negative real domain [math]\displaystyle{ \mathbb{R}^+ \cup \{0\} }[/math] into the non-negative real codomain [math]\displaystyle{ \mathbb{R}^+ \cup \{0\} }[/math].
- The principal square root function [math]\displaystyle{ \sqrt{x} }[/math] always returns a single unique value.
- There are only two solutions to the equation [math]\displaystyle{ x = \sqrt{x} }[/math] The solution set is [math]\displaystyle{ \{0, 1\} }[/math].
- To obtain both roots of a positive number, take the value given by the principal square root function as the first root ([math]\displaystyle{ root_1 }[/math]) and obtain the second root ([math]\displaystyle{ root_2 }[/math]) by subtracting the first root from zero (ie [math]\displaystyle{ root_2 = 0 - root_1 }[/math]).
- The following important properties of the square root functions are valid for all positive real numbers [math]\displaystyle{ x }[/math] and [math]\displaystyle{ y }[/math]:
- [math]\displaystyle{ \sqrt{xy} = \sqrt x \sqrt y \qquad \Rightarrow \qquad \sqrt{100\,y} \, = \, 10 \cdot \sqrt y }[/math]
- [math]\displaystyle{ \sqrt{\frac{x}{y}} = \frac{\sqrt{x}}{\sqrt{y}} \qquad \Rightarrow \qquad \sqrt{\left ( \frac{x}{100}\right ) } = \frac{\sqrt{x}}{10} }[/math]
- [math]\displaystyle{ \sqrt{x^2} = \left|x\right| }[/math] for every real number [math]\displaystyle{ x }[/math] (see absolute value)
- [math]\displaystyle{ \sqrt x = x^{1/2} }[/math]
- The square root function generally maps rational numbers to algebraic numbers; [math]\displaystyle{ \sqrt x }[/math] is rational if and only if [math]\displaystyle{ x }[/math] is a rational number which, after cancelling, is a ratio of two perfect squares. In particular, [math]\displaystyle{ \sqrt 2 }[/math] is irrational.
- In geometrical terms, the square root function maps the area of a square to its side length.
- The function [math]\displaystyle{ f(x) = \sqrt x }[/math] has the following graph, made up of half a parabola lying on its side:
- Suppose that [math]\displaystyle{ x }[/math] and [math]\displaystyle{ a }[/math] are reals, and that [math]\displaystyle{ x^2 = a }[/math], and we want to find [math]\displaystyle{ x }[/math]. A common mistake is to "take the square root" and deduce that [math]\displaystyle{ x = \sqrt a }[/math]. This is incorrect, because the principal square root of [math]\displaystyle{ x^2 }[/math] is not [math]\displaystyle{ x }[/math], but the absolute value [math]\displaystyle{ \left| x \right| }[/math], one of our above rules. Thus, all we can conclude is that [math]\displaystyle{ \left| x \right| = \sqrt a }[/math], or equivalently [math]\displaystyle{ x = \pm\sqrt a }[/math].
- In calculus, for instance when proving that the square root function is continuous or differentiable or when computing certain limits, the following identity often comes handy:
- [math]\displaystyle{ \sqrt x - \sqrt y = \frac{x-y}{\sqrt x + \sqrt y} }[/math]
- It is valid for all non-negative numbers [math]\displaystyle{ x }[/math] and [math]\displaystyle{ y }[/math] which are not both zero.
- The function is continuous for all non-negative [math]\displaystyle{ x }[/math], and differentiable for all positive [math]\displaystyle{ x }[/math] (it is not differentiable for [math]\displaystyle{ x=0 }[/math] since the slope of the tangent there is ∞). Its derivative is given by
- [math]\displaystyle{ f'(x) = \frac{1}{2\sqrt x} }[/math]
- Its Taylor series about [math]\displaystyle{ x=0 }[/math] can be found using the binomial theorem:
- [math]\displaystyle{ \large\sqrt{x+1}=1 + \sum_{n=1}^{\infty}\frac { (-1)^{n+1} (2n-2)!}{n! (n-1)! 2^{2n-1} }x^n }[/math]
- [math]\displaystyle{ = 1 + \frac{1}{2}x - \frac{1}{8}x^2 + \frac{1}{16} x^3 - \frac{5}{128} x^4 + ... }[/math]
- for [math]\displaystyle{ \left| x \right| \lt 1 }[/math].
Computing square roots
Calculators
Pocket calculators typically implement good routines to compute the exponential function and the natural logarithm, and then compute the square root of [math]\displaystyle{ x }[/math] using the identity: [math]\displaystyle{ \sqrt{x} = e^{\frac{1}{2}\ln x} }[/math]
The same identity is exploited when computing square roots with logarithm tables or slide rules.
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 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:
- 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.
- If [math]\displaystyle{ s }[/math] denotes the part of the result found so far, determine the greatest digit [math]\displaystyle{ x }[/math] that does not make [math]\displaystyle{ y = x(20s + x) }[/math] exceed the current value. Place the new digit [math]\displaystyle{ x }[/math] on the quotient line.
- Subtract [math]\displaystyle{ y }[/math] from the current value to form a new remainder.
- 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 base, including 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.
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 [math]\displaystyle{ P \,=\, \frac{d}{2 N} }[/math]
- Let [math]\displaystyle{ A = N + P }[/math]
- [math]\displaystyle{ \sqrt{N^2 + d} \approx A - \frac{P^2}{2 A} }[/math]
When expanded, the equation becomes
- [math]\displaystyle{ \sqrt{N^2 + d} \approx N + \frac{d}{2\,N} - \frac{d^2}{8\,N^3 + 4\,N\,d} }[/math]
Bakhshali approximation example
Find [math]\displaystyle{ \sqrt{9.2345} }[/math]
- Using [math]\displaystyle{ N=3 }[/math] and [math]\displaystyle{ d = 9.2345 - 3^2 = 0.2345 }[/math]
- [math]\displaystyle{ \sqrt{3^2 + d} \approx 3 + \frac{d}{6} - \frac{d^2}{216 + 12\,d} }[/math]
- [math]\displaystyle{ \sqrt{3^2 + 0.2345} \approx 3 + \frac{0.2345}{6} - \frac{0.2345^2}{216 + 12 \cdot 0.2345} }[/math]
- [math]\displaystyle{ \sqrt{3^2 + 0.2345} \approx 3 + 0.039083 - \frac{0.055}{216 + 2.814} }[/math]
- [math]\displaystyle{ \sqrt{3^2 + 0.2345} \approx 3 + 0.039083 - 0.000251 }[/math]
- [math]\displaystyle{ \sqrt{3^2 + 0.2345} \approx 3.038832 }[/math]
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 [math]\displaystyle{ d/2N }[/math], the larger the value of this expression, the more inaccurate the value of the approximated result.
Construction
If N > 0 and d > 0 then
- [math]\displaystyle{ N^2 \quad \lt \quad N^2 + d \quad \lt \quad N^2 + 2\,d + \frac{d^2}{N^2} }[/math]
- [math]\displaystyle{ N^2 \quad \lt \quad N^2 + d \quad \lt \quad N^2 + 2\left( N \right) \left( \frac{d}{N} \right) + \left( \frac{d}{N} \right)^2 }[/math]
- [math]\displaystyle{ N^2 \quad \lt \quad N^2 + d \quad \lt \quad \left( N + \frac{d}{N} \right)^2 }[/math]
- [math]\displaystyle{ N \quad \lt \quad \sqrt{N^2 + d } \quad \lt \quad N + \frac{d}{N} }[/math]
So the solution for [math]\displaystyle{ \sqrt{N^2 + d} }[/math] must be between [math]\displaystyle{ (N) }[/math] and [math]\displaystyle{ ( N + \frac{d}{N}) }[/math]
- [math]\displaystyle{ \sqrt{N^2 + d} \, \approx \, average ( N , N + \frac{d}{N} ) }[/math]
- [math]\displaystyle{ \sqrt{N^2 + d} \, \approx \, \frac{1}{2} \left( N + N + \frac{d}{N} \right) }[/math]
Thus
- [math]\displaystyle{ \sqrt{N^2 + d} \, \approx \, N + \frac{d}{2\,N} }[/math]
Babylonian method
A commonly used algorithm for approximating [math]\displaystyle{ \sqrt r }[/math] is known as the "Babylonian method" and is based on Newton's method. It proceeds as follows:
- start with an arbitrary positive start value [math]\displaystyle{ x }[/math] (the closer to the root the better)
- replace [math]\displaystyle{ x }[/math] by the average of [math]\displaystyle{ x }[/math] and r/x
- go to 2
This is a quadratically convergent algorithm, which means that the number of correct digits of [math]\displaystyle{ r }[/math] roughly doubles with each step.
This could be represented as
- [math]\displaystyle{ x_{n+1} = 0.5 (x_n + \frac{r}{x_n}) }[/math]
where [math]\displaystyle{ \lim_{n \to \infty} x_n = \sqrt r. }[/math]
This algorithm works equally well in the 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 [math]\displaystyle{ +3 }[/math] in the reals, but to [math]\displaystyle{ -3 }[/math] in the 2-adics.
Square roots of the first 20 positive integers
- [math]\displaystyle{ \sqrt{1} }[/math] = 1
- [math]\displaystyle{ \sqrt{2} }[/math] ≈ 1.4142135623 7309504880 1688724209 6980785696 7187537694 8073176679 7379907324 78462
- [math]\displaystyle{ \sqrt{3} }[/math] ≈ 1.7320508075 6887729352 7446341505 8723669428 0525381038 0628055806 9794519330 16909
- [math]\displaystyle{ \sqrt{4} }[/math] = 2
- [math]\displaystyle{ \sqrt{5} }[/math] ≈ 2.2360679774 9978969640 9173668731 2762354406 1835961152 5724270897 2454105209 25638
- [math]\displaystyle{ \sqrt{6} }[/math] ≈ 2.4494897427 8317809819 7284074705 8913919659 4748065667 0128432692 5672509603 77457
- [math]\displaystyle{ \sqrt{7} }[/math] ≈ 2.6457513110 6459059050 1615753639 2604257102 5918308245 0180368334 4592010688 23230
- [math]\displaystyle{ \sqrt{8} }[/math] ≈ 2.8284271247 4619009760 3377448419 3961571393 4375075389 6146353359 4759814649 56924
- [math]\displaystyle{ \sqrt{9} }[/math] = 3
- [math]\displaystyle{ \sqrt{10} }[/math] ≈ 3.1622776601 6837933199 8893544432 7185337195 5513932521 6826857504 8527925944 38639
- [math]\displaystyle{ \sqrt{11} }[/math] ≈ 3.3166247903 5539984911 4932736670 6866839270 8854558935 3597058682 1461164846 42609
- [math]\displaystyle{ \sqrt{12} }[/math] ≈ 3.4641016151 3775458705 4892683011 7447338856 1050762076 1256111613 9589038660 33818
- [math]\displaystyle{ \sqrt{13} }[/math] ≈ 3.6055512754 6398929311 9221267470 4959462512 9657384524 6212710453 0562271669 48293
- [math]\displaystyle{ \sqrt{14} }[/math] ≈ 3.7416573867 7394138558 3748732316 5493017560 1980777872 6946303745 4673200351 56307
- [math]\displaystyle{ \sqrt{15} }[/math] ≈ 3.8729833462 0741688517 9265399782 3996108329 2170529159 0826587573 7661134830 91937
- [math]\displaystyle{ \sqrt{16} }[/math] = 4
- [math]\displaystyle{ \sqrt{17} }[/math] ≈ 4.1231056256 1766054982 1409855974 0770251471 9922537362 0434398633 5730949543 46338
- [math]\displaystyle{ \sqrt{18} }[/math] ≈ 4.2426406871 1928514640 5066172629 0942357090 1562613084 4219530039 2139721974 35386
- [math]\displaystyle{ \sqrt{19} }[/math] ≈ 4.3588989435 4067355223 6981983859 6156591370 0392523244 4936890344 1381595573 28203
- [math]\displaystyle{ \sqrt{20} }[/math] ≈ 4.4721359549 9957939281 8347337462 5524708812 3671922305 1448541794 4908210418 51276
External links
- Japanese soroban techniques - Professor Fukutaro Kato's method
- Japanese soroban techniques - Takashi Kojima's method
- Algorithms, implementations, and more - Paul Hsieh's square roots webpage
- Wikipedia