Talk:Square root
From Academic Kids
Could somebody produce an image of the graph which isn't that humongous and which doesn't use commas as decimal points? AxelBoldt 02:12 Feb 1, 2003 (UTC)
Can you tell me exactly how to continue the coefficients of the Taylor series? They appear to all have powers of 2 in the denominator.
Hi,
In your Taylor's formula i wrote x^n at the end
62.147.217.21 12:35 May 4, 2003 (UTC)
Why the restriction to normal matrices? I can take any square matrix with a complete set of eigenvectors and just take the square roots of the eigenvalues to get a square root of the matrix. Can't I?
- Josh Cherry 01:49, 13 Oct 2003 (UTC)
"Can you tell me exactly how to continue the coefficients of the Taylor series? They appear to all have powers of 2 in the denominator."
I hope my latest edit has addressed this question.
- dcljr 23:12, 5 Jul 2004 (UTC)
t762@inforamp.net (J. B. Rainsberger) wrote:
>In article <31C14605.2D3E@laria.u-picardie.fr>,
> Mustapha Benali wrote:
>>And what do you think about this :
>>
>>
>> -1 = (-1)^1 = (-1)^(2/2) = [(-1)^2]^(1/2) = 1^(1/2) = 1
>>
>A great deal has been said about "the square root" of one. I had this
>discussion with a grade five (?) student from Australia on this topic and
>he understood it perfectly, so I present it here:
>"The" square root oftens refers to the principle square root, which is the
>positive quantity whose square is the given quantity. There are *two*
>square roots of any and all real numbers, and they are both complex
>numbers. (Sometimes strictly real.)
>The expression x^(1/2) refers to the principle square root of a number.
>This is verified by the relations:
> x^(1/2) = y
> 1/2 ln x = ln y
>In order to define this properly for x > 0, we require y > 0. If y < 0,
>then ln y is not strictly a real number, and thus, neither is ln x. If ln x
>is not strictly real, then x is not positive. As a result, if x >= 0,
>x^(1/2) >= 0.
>As for why the above equation is not quite correct, it is commonly known
>that when squaring all members of an equation, extraneous roots are often
>introduced. As an example:
> sqrt(x) + 2 = x
> x + 4 sqrt(x) + 4 = x^2
> 4 sqrt(x) = x^2 - x - 4
> 16 x = x^4 - 2 x^3 - 7 x^2 + 8 x + 16
> 0 = x^4 - 2 x^3 - 7 x^2 - 8 x + 16
> solving for x, x is in {1, 4, -3/2 +/- sqrt(7)/2 i}
>Now I ask you: given that sqrt(x) is the principle (positive) square root
>of x, is x = 1 a solution to this equation? No.
>There you have an example of an extraneous root produced by squaring all
>members of an equation. As a result, if you rearrange to do this:
>-1 = (-1)^1 = (-1)^(2/2) = [(-1)^(1/2)]^2 = i^2 = -1
>then you're cooking.
>Just be careful that you're not adding extraneous roots by squaring both
>sides of an equation. You need to check all roots thus obtained in the
>original equation or expression.
| Contents |
|
|
Simpler proof of the irrationality of the square root of 2
There is a much simpler proof of the irrationality of the square root of 2 that can be readily grasped in its entirety.
Suppose the square root of 2 is rational, that is, that it can be expressed as a ratio of positive integers. Factor the numerator and denominator of this ratio into primes, and square it. Every prime factor in both numerator and denominator must then appear an even number of times. For this ratio to be equal to 2, all factors in numerator and denominator must cancel, except for a single 2 in the numerator, which is impossible with an even number of factors.
The "Square roots using Newton iteration" is very hard for a 12 year old kid to read. I shall try and read it and reduce it to a format which is easier for a 12 year old kid to read.
Ohanian 06:15, 2005 Mar 28 (UTC)
Square roots using Newton iteration
Basic Newton iteration finds a single root of a function <math>f(x)<math> given a sufficently precise approximation to the root. The nature of which root will be given based on an approximation is dependent on the Newton fractal which we will not discuss here any further. The basic iteration is given by:
- <math>x_{n+1} = x_n - {f(x_n) \over f^\prime(x_n)}<math>.
There are two widely used functions <math>f(x)<math> used to find the square root of a number, say, "z".
First method
The first method finds the square root of "z"
- <math>f(x) = x^2 - z \,<math>
Note that the <math>\sqrt{z}<math> and <math>- \, \sqrt{z}<math> are roots of the function <math>f(x)<math>. ie <math>f( \sqrt{z} ) = 0<math>.
The first derivative of <math>f(x)<math> is <math>f^\prime(x) = 2 x<math>
Thus iteration for <math>x_{n+1}<math> is derived where:
<math>x_0 = 1\,\!<math> and
| <math>x_{n+1}\,\!<math> | <math>= x_n - {f(x_n) \over f^\prime(x_n)}<math> |
| <math>= x_n - {(x_n^2 - z) \over 2 x_n}<math> | |
| <math>= x_n - \frac {x_n}{2} + \frac {z}{2 \,\,\, x_n} <math> | |
| <math>= \frac {x_n}{2} + \frac {z}{2 \,\,\, x_n}<math>. |
Second method
The second method finds the reciprocal of the square root of "z".
- <math>g(x) = \frac{1}{x^{2}} - z<math>.
The two roots to <math>g(x)<math> are <math>\frac{1}{\sqrt{z}}<math> and <math>\frac{-1}{\sqrt{z}}<math> .
The derivative of <math>g(x)<math> is <math>g^\prime(x) = -2 \,\, x^{-3}<math>.
Thus iteration for <math>x_{n+1}<math> is derived where:
<math>x_0 = 1\,\!<math> and
| <math>x_{n+1} \,\! <math> | <math>= x_n - {g(x_n) \over g^\prime(x_n)}<math> |
| <math>= x_n - {x_n^{-2} - z \over -2 x_n^{-3}}<math> | |
| <math>= x_n - (-1/2) {x_n^3} (x^{-2} - z)<math> | |
| <math>= x_n + (1/2) (x_n - z x_n^3)<math> | |
| <math>= \frac{ 3 x_n - z x_n^3 }{2}<math> | |
| <math>= 1.5 \, x_n - 0.5 \, z x_n^3 = 0.5 \, x_n \,\, ( 3 - z x_n^2 )<math>. |
Example
Find the <math>\sqrt{7}<math> using both methods.
- <math>Z = 7 \,<math> Because we are looking for the square root of 7
| <math>f(x)\,<math> | <math>g(x)\,<math> | |||
|---|---|---|---|---|
| <math>x_0\,<math> | <math>1\,<math> | <math>x_0\,<math> | <math>0.5\,<math> | |
| <math>x_1\,<math> | <math>\frac{1}{2} + \frac{7}{2 \times 1} = 4 <math> | <math>x_1\,<math> | <math>0.5 \times 0.5 \,\, ( 3 - 7 (0.5)^2 ) = 0.312 <math> | <math>\frac{1}{x_1}= 3.2\,<math> |
| <math>x_2\,<math> | <math>\frac{4}{2} + \frac{7}{2 \times 4} = 2.875 <math> | <math>x_2\,<math> | <math>0.5 \times 0.312 \,\, ( 3 - 7 (0.312)^2 ) = 0.362 <math> | <math>\frac{1}{x_2}= 2.762\,<math> |
| <math>x_3\,<math> | <math>\frac{2.875}{2} + \frac{7}{2 \times 2.875} = 2.654 <math> | <math>x_3\,<math> | <math>0.5 \times 0.362 \,\, ( 3 - 7 (0.362)^2 ) = 0.376 <math> | <math>\frac{1}{x_3}= 2.652\,<math> |
| <math>x_4\,<math> | <math>\frac{2.654}{2} + \frac{7}{2 \times 2.654} = 2.645 <math> | <math>x_4\,<math> | <math>0.5 \times 0.376 \,\, ( 3 - 7 (0.376)^2 ) = 0.378 <math> | <math>\frac{1}{x_4}= 2.645\,<math> |
| <math>\sqrt{7} \approx 2.645<math> | <math>\sqrt{7} \approx 2.645<math> | |||
Comparison
The iteration for <math>f(x)<math> involves a division which is more time consuming than a multiplication in computer integer arithmetic. The iteration for <math>g(x)<math> 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 <math>O(M(n))<math>, 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.
I was after the history of where the square root character is derived like how the page on eight shows where the character was derived from. Question by unknown user.
I believe it was created from radix symbol. Do a search on radix on google. Ohanian 00:57, 2005 May 3 (UTC)
The square root notation originated in Germany, 16th or 17th century or so. They denoted a radical with an "r" in front of the number, like r2 for square root of 2. They then took to putting a line over the top of the number they were talking about. Mathematicians-in-a-hurry eventually took to writing the r and the line without raising their pens from the paper, and the radical sign was born.
Contrary to popular belief, the use of the radical to represent roots can actually be traced to a corruption of the Greek letter "nu" (similar to a Latin v) - which was placed next to the number in question to create a "new" number, the root.
The use of an adjoining bar across the top is analogous to the use of a bar by statisticians to represent the "mean" of a collection of numbers; it indicates the part of the expression we "mean" when creating the new number. Ohanian 01:02, 2005 May 3 (UTC)
Calculating Square Roots - Mentally
Hi, I find the explanation of calculating square roots using Pell's equation hard to follow. Would it be possible to explain what is happening in each step more clearly? -- MattW, 05 June 2005
continued fraction rewrite
Continued fraction methods
Quadratic irrationals, that is numbers involving square roots in the form (a + √b)/c, have periodic 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.
Steps for finding continued fractions
Find <math>\sqrt{r}<math> using continued fractions
- <math>\sqrt{r} = N_0 + \frac{1}{N_1 + \frac{1}{N_2 + \frac{1}{N_3+\,\cdots}}} <math>
Let <math>\sqrt{r}=\sqrt{N_0^2 + d}= N_0 + \frac{1}{X_0} \qquad where \quad X_0 > 1<math>
- <math>X_0 = N_1 + \frac{1}{X_1}<math>
- <math>X_1 = N_2 + \frac{1}{X_2}<math>
- <math>X_2 = N_3 + \frac{1}{X_3}<math>
Step 0. We shall assume that r is not a perfect square. In other words:
- <math>\sqrt{r} = \sqrt{N_0^2 + d} \qquad \mbox{ and } \quad N_0 \in \mathbb{Z} \quad \mbox{ and } 0 < d < 1 <math>
Step 1. Find <math>N_0<math> using some other method. The best method is <math>N_0 = intsqrt(r)<math> using some other algorithmn to determine the integer square root.
- <math>N_0 = intsqrt(r)<math>
Step 2. Find the lower bound (L) and uppper bound (U) for <math>\sqrt{r}<math> where both (L) and (U) are integers.
- <math>L \qquad < \qquad \sqrt{r} \qquad < \qquad U <math>
Hence
- <math>L \qquad = \qquad N_0 <math>
- <math>U \qquad = \qquad N_0 + 1<math>
Step 3. Write <math>X_0<math> in terms of <math>\sqrt{r}<math>.
- <math>X_0 = \frac{1}{\sqrt{r}-N_0} \qquad from \qquad \sqrt{r} = N_0 + \frac{1}{X_0}<math>
- <math>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}<math>
- <math>\downarrow<math>
- <math>\mbox{ substitute } \quad \sqrt{r} \quad \mbox{ with } \quad L \quad \mbox{ or } \quad U<math>
- <math>\downarrow<math>
- <math>X_{0 LowerBound} = \frac{L+N_0}{d} = \frac{2 \, N_0}{d} \qquad \mbox{ Calc the numeric value }<math>
and
- <math>X_{0 UpperBound} = \frac{U+N_0}{d} = \frac{2 \, N_0 + 1}{d} \qquad \mbox{ Calc the numeric value }<math>
Step 4. Substitute <math>X_0<math> with <math>N_1 + \frac{1}{X_1}<math>
- <math>X_{0 LowerBound} \quad < \quad X_0 \quad < \quad X_{0 UpperBound} <math>
after substitution
- <math>X_{0 LowerBound} \quad < \quad N_1 + \frac{1}{X_1} \quad < \quad X_{0 UpperBound} <math>
Since <math>\frac{1}{X_1}<math> is less than one, we can determine <math>N_1<math> from the numeric values of <math>X_{0 LowerBound}<math> and <math>X_{0 UpperBound}<math> because <math>N_1 \quad \in \quad \mathbb{Z}<math>
Step 5. Once we know the value of <math>N_1<math>, we can rework the equation for <math>X_1<math>
- <math>X_0 = N_1 + \frac{1}{X_1} \quad \longrightarrow \quad X_1 = \frac{1}{X_0 - N_1}<math>
- <math>X_1 = \frac{1}{ \frac{ \sqrt{r} + N_0 }{ d } - N_1} = \frac{1}{ \frac{ \sqrt{r} + N_0 + d\,N_1}{ d } } = \frac {d}{\sqrt{r} + N_0 + d\,N_1}<math>
- <math>X_1 = \frac {d}{\sqrt{r} + (N_0 + d\,N_1)} \times \frac {\sqrt{r} - (N_0 + d\,N_1)}{\sqrt{r} - (N_0 + d\,N_1)} = \frac {d\,(\sqrt{r} - (N_0 + d\,N_1))}{r - (N_0 + d\,N_1)^2}<math>
- <math>X_1 = \frac {\sqrt{r} - (N_0 + d\,N_1)}{ \frac {r - (N_0 + d\,N_1)^2} {d}} = \frac {\sqrt{r} + M_1 } {D_1} <math>
- <math>\mbox { where } \quad M_1 = - ( N_0 + d\,N_1 ) <math>
and
- <math>\mbox { where } \quad D_1 = \frac { r - ( N_0 + d\,N_1 )^2 } { d } <math>
Step 6. Write <math>X_1<math> in terms of <math>\sqrt{r}<math>.
- <math>X_1 = \frac {\sqrt{r} + M_1 } {D_1}<math>
- <math>\downarrow<math>
- <math>\mbox{ substitute } \quad \sqrt{r} \quad \mbox{ with } \quad L \quad \mbox{ or } \quad U<math>
- <math>\downarrow<math>
- <math>X_{1 LowerBound} = \frac{L + M_1}{D_1} \qquad \mbox{ Calc the numeric value }<math>
and
- <math>X_{1 UpperBound} = \frac{U + M_1}{D_1} \qquad \mbox{ Calc the numeric value }<math>
Step 7. Substitute <math>X_1<math> with <math>N_2 + \frac{1}{X_2}<math>
- <math>X_{1 LowerBound} \quad < \quad X_1 \quad < \quad X_{1 UpperBound} <math>
after substitution
- <math>X_{1 LowerBound} \quad < \quad N_2 + \frac{1}{X_2} \quad < \quad X_{1 UpperBound} <math>
Since <math>\frac{1}{X_2}<math> is less than one, we can determine <math>N_2<math> from the numeric values of <math>X_{1 LowerBound}<math> and <math>X_{1 UpperBound}<math> because <math>N_2 \quad \in \quad \mathbb{Z}<math>
Step 8. Once we know the value of <math>N_2<math>, we can rework the equation for <math>X_2<math>
- <math>X_1 = N_2 + \frac{1}{X_2} \quad \longrightarrow \quad X_2 = \frac{1}{X_1 - N_2}<math>
- <math>X_2 = \frac{1}{ \frac { \sqrt{r} + M_1 } { D_1 } - N_2 } = \frac{1}{ \frac { \sqrt{r} + M_1 - D_1 \, N_2 } { D_1 } } = \frac { D_1 } { \sqrt{r} + M_1 - D_1 \, N_2 } <math>
- <math>X_2 = \frac { D_1 } { \sqrt{r} + ( M_1 - D_1 \, N_2 ) } \times \frac { \sqrt{r} - ( M_1 - D_1 \, N_2 ) } { \sqrt{r} - ( M_1 - D_1 \, N_2 ) } = \frac { D_1 ( \sqrt{r} - ( M_1 - D_1 \, N_2 ) ) } { r - ( M_1 - D_1 \, N_2 )^2 }<math>
- <math>X_2 = \frac { \sqrt{r} - ( M_1 - D_1 \, N_2 ) } { \frac { r - ( M_1 - D_1 \, N_2 )^2 } { D_1 } } = \frac { \sqrt{r} + M_2 } { D_2 } <math>
- <math>\mbox { where } \quad M_2 = - ( M_1 - D_1 \, N_2 ) <math>
and
- <math>\mbox { where } \quad D_2 = \frac { r - ( M_1 - D_1 \, N_2 )^2 } { D_1 } <math>
Step 9. Repeat step 6 , 7 and 8 .
Rough estimate?
I'm confused by the "rough estimate" section:
"Take the integer part of the number n. Z = int(n) Count the number of digits in Z. Let D be the number of digits. Calculate the value of 3D. The rough estimate is half the value obtained in step 3. E = (3D) / 2 "
But the examples given, the estimate is way out, e.g. the "estimate" for √723.47 is 13.5, when the actual value is 26.89. Why half the value obtained in Step 3, when the unhalved value (27) is much closer? Same for all the other examples, the unhalved value is much nearer the actual √n
Also the estimates obtained in this section do not match the estimates given as a comparison in the next sectiond etailing the more accurate estimate. There has to be an error here somewhere? 143.252.80.124 09:53, 15 Jun 2005 (UTC)
A rough estimate is just that, a rough estimate. It merely provides a starting value for the seed of other algorithmns to start converging on the actual value of the square root of a number. You are mistaking the rough estimate for a "near value". The rough estimate can be nowhere near the actual value, it just have to get the magnitude of the value correct. Choosing the correct seed value will greatly help reduce the number of iterations for the other algorithmns. Ohanian 07:58, 2005 Jun 16 (UTC)
