
Useful Computational Methods 

pth root algorithms


We consider only real numbers. The pth root of a number N is a number b satisfying b^{p} = N.
A real number N has p pth roots. They are (b)e^{2pki/p}, where i = √1 and k = 0,1,..,p1. If p is odd, the case k = 0 gives the one and only real root, the others being complex roots.
If p is even, there are two real roots which differ only in sign; the others being complex roots. We will be concerned here only with the real root b since the other (complex) roots are (b)e^{2pki/p}.
Notice first that, when p = 4, we are looking at the 4th root which is the squareroot of the squareroot and hence the methods for squareroots can be applied twice to obtain the approximation.
When p > 4, we have to resort to other methods. The longdivisiontype algorithms presented elsewhere on these web pages become complicated for finding higher roots.
However, there are a number of methods that still work. Some of these are the Bisection Method, Regula Falsi, the Secant Method, and the NewtonRaphson method.They use the function f(x) = x^{p}  N. We will briefly describe the NewtonRaphson Method, the method of logarithms and the procedure employed to find the pth root in calculators.
pth roots with NewtonRaphson Method
The NewtonRaphson method finds close approximations to solutions of functional equations f(x) = 0, with the only restriction that the function must be differentiable. You will learn about these matters in calculus.
If you already had an introduction to calculus up to the Taylor formula for the approximation of functions possessing derivates of many orders, you will find useful an elementary introduction on the NewtonRaphson method.
When f(x) = x^{p}  N, we get the formula
x_{1} = ((p1)x_{0} + N/(x_{0}^{p1}))/p
That is, to find N^{1/p}, you substitute your guess x_{0} of N^{1/p} into the formula. The value, x_{1}, thus obtained is the new approximation x_{1} which you plug into the formula again and continue to obtain N^{1/p} to greater and greater precision.
So, another way of writing the formula is
x_{n+1} = ((p1)x_{n} + N/(x_{n}^{p1}))/p
You will notice that the squareroot case is p = 2, and the cuberoot is p = 3.
The first guess, x_{0}, is not critical. So long as you choose a value x_{0} > 0, you will eventually get close to the pth root.
pth root via logarithms
A rule of logarithms in any base b is that log _{b} N^{t} = t log _{b} N, which holds for all real numbers t and positive real numbers b and N. Thus in common logarithms too, log _{10} N^{t} = t log _{10} N.
When t = 1/p, we have log _{b} N^{1/p} = (1/p) log _{b} N.
Let us find the 5th root of 2. We take log 2^{1/5} which is (1/5) log 2 = (1/5) 0.3010 = 0.0602 to four decimal digits. Then 2^{1/5} = antilog 0.0602 = 10^{0.0602} = 1.1486..., to four decimal digits. Observe that antilog x in base 10 is 10^{x}.
The one disadvantage of the method is clear  the approximation we get is limited by the number of digits available for logarithm and antilogarithm.
pth root on a calculator
Scientific calculators have a key that gives pth roots. It is the y^{x} key. Let us find the 5th root of 2. Since the 5th root of 2 is 2^{1/5}, we take
y = 2 and x = 1/5.
Press 2
Enter
Press 5
Press the 1/x key.
Press the y^{x} key.
Answer: 2^{1/5} = 1.1486...
But how does the calculator find y^{x}?
It uses three principles. They are:
(1) x = e^{lnx}
(2) ln(x^{t}) = t(ln x)
(3) (antilog x) = e^{x}
Let us apply these.
Let z = y^{x}.
First, z = e^{ln z}.
But ln(z) = ln(y^{x}).
Applying the second principle,
ln(y^{x}) = x(ln(y)).
So ln(z) = x(ln(y))
Applying the third principle, antilog (ln(z)) = e^{ln(z)} = e^{x(ln(y))}
But z = antilog (ln(z))
So z = e^{x(ln(y))}
Thus, to find y^{1/p}, the calculator looks for e^{(1/p)(ln(y))}.
Let us compute 2^{1/5} the way the calculator does it.
2^{1/5} = e^{(1/5)ln2} = e^{(1/5)0.6931} = e^{0.1386} = 1.1486...
The pth root is obtained up to the number of decimal digits available on the calculator screen.
You will notice that the way of the calculator is really the method of finding using logarithms discussed earlier where we used common logarithms as opposed to the use of natural logarithms by the caculator. Of'course, in the method of logarithms, we could have used natural logarithms using the "ln" key on the calculator. Then antilog(lnz) = e^{z} and the two methods would coincide.
<<Ü BACK
MathPath  "BRIGHT AND EARLY"
Send suggestions to webmaster@mathpath.org
Copyright © 2001 MathPath
Last updated  November 8, 2003

