In this post we will see how to find nth roots of a positive real number. We will use the Newton-Raphson method to deduce an iterative formula, and see its convergence.

The task is to find the real qth root of a real number. Let there be a non-negative real number C, of which the real qth root is to be found. Let the square root of C be x. We represent this with $x=\sqrt[q]{C}$.

Now: $x=\sqrt[q]{C}$ $\Rightarrow x^{q}=C$ $\Rightarrow x^{q}-C=0$

So we are now to find the roots of the qth order function $f(x)=x^{q}-C$

### Finding qth Roots

[tweetmeme source=”phoxis”]

To find the root of $f(x)=x^{q}-C$ we will use the Newton-Raphson method of finding roots. The Newton-Raphson is an iterative method, which starts with a guess root $x_{n}$ and then finds the next guess $x_{n+1}$ by drawing tangent at the first guess point $(x_{n},f(x_{n}))$ and taking the x ordinate of the intersection of the tangent and X axis as $x_{n+1}$. It continues this process till the exact root is found or some root is found within tolerable error. Taking $x_{0}$ as the first guess we can find the next guess by Newton-Raphson method from the below expression.

• $x_{n+1}=x_{n}-\frac{f(x_{n})}{f'(x_{n})}$

For more detail, check this link in Wikipedia, about Newton’s method or check any standard text book.

We will use this method to get roots of real number. In our case the function is: $f(x_{n})=x^{q}-C$
And the first derivative is: $f'(x_{n})=qx^{q-1}$

Putting these values in the Newton-Raphson’s formula we get:

• $x_{n+1}=x_{n}-\frac{x_{n}^{q}-C}{qx_{n}^{q-1}}=\frac{qx_{n}^{q}-x_{n}^{q}+C}{qx_{n}^{q-1}}=\frac{(q-1)x_{n}^{q}+C}{qx_{n}^{q-1}}$
• $\Rightarrow x_{n+1}=\frac{(q-1)x_{n}^{q}+C}{qx_{n}^{q-1}}$

Putting q=2,3,4 …. q in the last equation we can find square, cube, fourth ….. qth root of the real number C.

Finding qth root of a real number: $x_{n+1}=\frac{(q-1)x_{n}^{q}+C}{qx_{n}^{q-1}}$

### Convergence

Now we talk about if this method converges to the root. As per Newton-Raphson’s convergence condition, the method will converge to its root if $\left|\frac{f(x_{n})f''(x_{n})}{(f'(x_{n}))^{2}}\right|<1$

Putting the values for our case we get $\left|\frac{q(q-1)x_{n}^{q-2}(x_{n}^{q}-C)}{q^{2}x_{n}^{2q-2}}\right|=\left|\frac{(q-1)}{q}\times\frac{x_{n}^{q}-C}{x_{n}^{q}}\right|<1$
as $(x_{n}^{q}-C) and $(q-1)

Thus this process converges to its root. If C is negative then the roots of the equation is imaginary, and this process will fail to compute the roots. The initial guess is very important for convergence or the results might oscillate infinitely back and forth the negative and positive side of X axis.

### Square Root

To find the square root of a real number with this method, read this post Evaluating square root of a real number

## 4 thoughts on “Finding qth real root of a real number”

1. jay.me says:

Hi Arjun, I dont get any of that =(
I find Isaac Newtons religious views very interesting, he was anti-trinitarian =)

1. phoxis says:

now what was that, i didn’t either get what was “anti-trinitarian”

2. jay.me says: