Marie's Question from Facebook about Square Roots

  • Context: MHB 
  • Thread starter Thread starter Sudharaka
  • Start date Start date
  • Tags Tags
    Roots Square
Click For Summary

Discussion Overview

The discussion revolves around methods for finding square roots, specifically focusing on the square root of 128. Participants explore various techniques, including prime factorization and recursive algorithms, while also discussing the Newton-Raphson method and its applications.

Discussion Character

  • Exploratory
  • Mathematical reasoning
  • Technical explanation

Main Points Raised

  • Marie asks for a step-by-step method to find the square root of 128.
  • One participant suggests using prime factorization, noting that $128 = 2^7$ and thus $\sqrt{128} = 8\sqrt{2}$ for an exact answer.
  • Another participant provides two recursive algorithms for approximating $\sqrt{2}$, emphasizing the need for an initial guess.
  • A different method is introduced for approximating square roots, which involves averaging an initial guess and the ratio of the number to the guess.
  • One participant identifies the method described as the Newton-Raphson method, noting its rapid convergence but also its potential for failure depending on the initial guess.
  • Another participant points out that the methods discussed are essentially variations of the Newton-Raphson technique, with specific forms for finding square roots.
  • There is a mention of the Babylonian method as a related approach to finding square roots.

Areas of Agreement / Disagreement

Participants present multiple methods for calculating square roots, with some overlap in techniques. However, there is no consensus on a single preferred method, and the discussion remains open to various approaches and refinements.

Contextual Notes

Some methods rely on specific initial guesses, which may affect convergence. The discussion includes various mathematical techniques without resolving which is the most effective or universally applicable.

Sudharaka
Gold Member
MHB
Messages
1,558
Reaction score
1
Marie on Facebook writes:

I was wondering how to find square root for numbers like 128. Can you do it step by step please? :)
 
Mathematics news on Phys.org
Sudharaka said:
Marie on Facebook writes:

I was wondering how to find square root for numbers like 128. Can you do it step by step please? :)

I would use Prime Factorisation to find the prime roots and then take advantage of the rule $\sqrt{ab} = \sqrt{a}\sqrt{b}$. The numbers are positive so this is allowed. To that end if decimal approximations are needed, it's best to learn some of the simple prime roots like $\sqrt{2},\ \sqrt{3}\ \sqrt{5}$

Using 128 as an example (this one is relatively simple as an integer power of 2)

$128 \div 2 = 64$ -- so 2 is one prime factor
$64 \div 2 = 32$

and so on until
$4 \div 2 = 2$

Thus we can say that $128 = 2^7$ and so $\sqrt{128} = \sqrt{2^7}$

Using the rule above I then say that $\sqrt{2^7} = \sqrt{2^6}\sqrt{2} = 2^3\sqrt{2} = 8\sqrt{2}$

I would leave it as $8\sqrt{2}$ for an exact answer
 
If you now wish to compute rational approximations for $\sqrt{2}$ by hand, here are two recursive algorithms (the second converges more rapidly):

i) $\displaystyle x_{n+1}=\frac{x_n+2}{x_n+1}$

ii) $\displaystyle x_{n+1}=\frac{x_n}{2}+\frac{1}{x_n}$

You simply need to "seed" both recursions with some initial guess.

We know $\displaystyle 1<\sqrt{2}<2$ so $\displaystyle \frac{3}{2}$ will work just fine.
 

Here's another recursive approximation for a square root.

Suppose we want \sqrt{N}.

Let a_1 be the first approximation to \sqrt{N}.

Then: a_2 \:=\:\frac{N+a_1^2}{2a_1} is an even better approximation.

Repeat the process with a_2 . . . and so on.This procedure converges very quickly
. . depending on a_1.

Find \sqrt{3}, using a_1 = 1.7

a_2 \:=\:\frac{3 + 1.7^2}{2(1.7)} \:=\:1.732352941 \:\approx\:1.732353

a_3 \:=\:\frac{3 + 1.732353^3}{2(1.732353)} \:=\:1.732050834

ChecK: .1.732050834^2 \:=\:3.000000091\;\;\checkmark~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~Here is the reasoning behind this procedure.

We want \sqrt{N}.

We approximate the square root, a_1.

Suppose our approximation is correct.
Then a_1 and \tfrac{N}{a_1} would be equal, right?

Chances are, they are not equal.
One is larger than the square root, one is smaller.

What is a better approximation of the square root?
. . . the average of the two numbers!

Hence: .a_2 \:=\:\frac{a_1 + \frac{N}{a_1}}{2} \:=\:\frac{\frac{a_1^2 + N}{a_1}}{2}

Therefore: a_2 \:=\:\frac{N +a_1^2}{2a_1}
 
Soroban's method is called the Newton-Raphson method, by the way (if someone wants to search for more information on it). It tends to work most of the time, and converges remarkably quickly (twice as many correct digits per iteration, in general) but can also fail sometimes. This is related to chaos theory and notably used in fractal rendering, but can be mitigated by appropriately choosing the initial guess. It should be noted it cannot fail for polynomials of order less than 3.

Its general form is:

$$a_{n + 1} = a_n - \frac{f(a_n)}{f'(a_n)}$$

To converge to a root of $f(x)$. Which root it converges to is dependent on the initial guess $a_1$.
 
Mark's method ii, soroban's averaging method, and Newton-Raphson are all identical.

Generally, Newton-Raphson finds a root of $f(x)=0$.
The algorithm is:
$x_{k+1} = x_k - \dfrac{f(x_k)}{f'(x_k)}$​

With $f(x)=x^2-N$ this becomes:
$x_{k+1} = x_k - \dfrac{x_k^2-N}{2x_k}$

$x_{k+1} = \dfrac{x_k}{2} + \dfrac{N}{2x_k} \quad$ or $\quad x_{k+1} = \dfrac{N + x_k^2}{2x_k}$​

The initial guess should be above the root for fastest results.
If the initial guess is below the root, the first iteration will jump to the other side of the root and it will worsen the approximation.

The second form is the one soroban presented.

If we pick N=2 as Mark did, the first form becomes:
$x_{k+1} = \dfrac{x_k}{2} + \dfrac{1}{x_k}$​
 
Yes, the second method I gave is just a slight rewriting of the so-called Babylonian method, which Newton's root finding technique also gives.

The first method is discussed http://www.mathhelpboards.com/f49/pell-sequence-2905/ in post #7.
 

Similar threads

  • · Replies 15 ·
Replies
15
Views
2K
Replies
2
Views
2K
Replies
1
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 16 ·
Replies
16
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 16 ·
Replies
16
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K