Root
Root
P Majee
1 Introduction
In scientific and engineering studies, a problem of grate importance is that of determining a
root/zero of an equation of the form
f (x) = 0. (1)
To solve cubic equations, one can use Cardon’s method. To solve bi-quadratic equation, one
can use Ferrari method.
Algebraic and transcendental equation: A polynomial equation of the form f (x) =
a0 xn + a1 xn−1 + ... + an−1 x + an = 0 is called algebraic equation.
An equation which contains polynomials, exponential functions, trigonometric functions, log-
arithmic functions or any combinations of them are called transcendental equations.
For examples, x2 + 5x + 7 = 0, x7 − 5x3 + x − 9 = 0 etc. are algebraic equations, and,
xe2x − 1 = 0, cosx − xex = 0, tanx = x etc. are transcendental equations.
In this chapter, we discuss some methods for finding a real root of an algebraic or tran-
scendental equations. We also discuss some methods to determine all real or complex roots
of polynomial equation. Some method to find the solution of a system of nonlinear equations
will also be discussed.
Now, the methods for finding the roots are classified as (i) direct methods, and (ii)
iterative methods.
Direct Methods: These methods give the exact values of all the roots in a finite number
1
Solution of algebraic and transcendental equations: Dr. P Majee
of steps (disregarding the round-off errors). Therefore, for any direct method, we can give
the total number of operations (additions, subtractions, divisions and multiplications). This
number is called the operational count of the method. For example, the roots of the quadratic
equation ax2 + bx + c = 0 can be expressed as
√
−b± b2 −4ac
x= 2a .
For this method, we can give the count of the total number of operations. There are direct
methods for finding all the roots of cubic and bi-quadratic polynomial equations. However,
these formulas are difficult to remember.. Direct methods for finding the roots of polynomial
equations of degree greater than 4 or transcendental equations are not available in the litera-
ture.
Iterative Methods: These methods are based on the idea of successive approximations. We
start with one or two initial approximations to the root and obtain a sequence of approxima-
tions x0 , x1 , ..., xk , ...which in the limit as k → ∞ converge to the exact root α. The iterative
method for finding the root of the equation f (x) = 0 can be written as
This method uses one initial approximation to the root. Suppose the initial approximation is
x0 . Then the sequence of approximations are given by x1 = φ(x0 ), x2 = φ(x1 ), x3 = φ(x2 )
and so on.
In this unit, we shall study some iterative methods to find root of some algebraic and
transcendental equations.
2 Bisection method:
This method is based on the repeated application of intermediate value theorem. Let the
function f (x) be continuous on I0 = [a, b]. For definiteness, let f (a) be (−)ve and f (b) be
a+b
(+)ve. Then the first approximation to the root is x1 = 2 . If f (x1 ) = 0, then x1 is a root
of the equation f (x) = 0. Otherwise, the root lies between a and x1 or x1 and b according to
f (x1 ) is (+)ve or (−)ve. Then, we bisect this subinterval and the process is continued until
the root is found to desired accuracy.
2
Solution of algebraic and transcendental equations: Dr. P Majee
Basically, In each iteration, the length of the subinterval is reduced by half. Continuing the
process, we obtain a sequence of nested subintervals I0 ⊃ I1 ⊃ I2 ... ⊃ In ..... such that each of
the subinterval contains the root. After repeating the bisection process n times, we obtain an
b−a
interval In of length 2n , which contains the root.
Note that the method does not use the value f (x), but only its sign. Hence, if an accuracy
for the root is prescribed, the number of iteration can be determined in advance. For given
b−a ln(b−a)−ln()
accuracy , the number of iteration can be given by 2n ≤⇒n≥ log2 . For example,
if [a, b] = [0, 1] and = 0.01, then we get n ≥ 7, that is, 7 iterations are required so that
|exact root − obtained root| < 0.01.
The convergence of the bisection method is guaranteed. The main drawback to the
bisection method is that this method is relatively to slow to converge as it may take many
iterations before we can guarantee the desired accuracy.
Answer: Let f (x) = x3 − 2x − 5. Then f (2) = −1 and f (3) = 16. Hence, a root lies between
2 and 3 and we take
2+3
x1 = = 2.5
2
Since f (x1 ) = f (2.5) = 5.6250, the root lies between 2 and 2.5
Hence,
2 + 2.5
x2 = = 2.25
2
Since f (x2 ) = f (2.25) = 1.8906, the root lies between 2 and 2.25
Hence,
2 + 2.25
x3 = = 2.125
2
Since f (x3 ) = f (2.125) = 0.3457, the root lies between 2 and 2.125
3
Solution of algebraic and transcendental equations: Dr. P Majee
Hence,
2 + 2.125
x4 = = 2.0625
2
So, after four iterations, the approximate root is 2.0625
b−a
x1 = a − f (a), (2)
f (b) − f (a)
which is the first approximate root of the equation f (x) = 0. Now, if f (x1 ) and f (a) are of
opposite sign, then we replace b by x1 in (2), and obtain the next approximation. Otherwise,
we replace a by x1 (because in this case the root will be lying between a and x1 ) and generate
the next approximation. This process is repeated until the root is obtain to the desired
accuracy. Graphical representation of the method is given bellow.
• One can notice that in regula-falsi method, one of the end point of the initial interval
(a, b) is always fixed and the other end point varies with n.
4
Solution of algebraic and transcendental equations: Dr. P Majee
4 Secant Method
Secant method is similar to the regula-falsi method with some differences. In secant method,
two initial approximation x0 and x1 to the root of the equation f (x) = 0 are chosen. Then
the next iterative values are obtain by the following formula:
xn − xn−1
xn+1 = xn − f (xn ), n = 1, 2, 3, .... (3)
f (xn ) − f (xn−1 )
In regula-falsi method, after each iteration the position of the root was checked. But in secant
method, once the two initial guesses x0 and x1 are chosen, we keep on applying the formula
(3).
Remark 1 Since, after each iteration, position of the root is not checked, for some initial
guesses the method may converge and for some other initial guesses the method may diverge.
Thus the convergence of the secant method is not guaranteed. But, if the secant method con-
verges, the convergence of the secant method is better than that of regula-falsi method. Order
of convergence for the regula-falsi method is 1, while the order of convergence of the secant
method is 1.62.
Example 2 Use regula falsi method and secant method to obtain a root of the equation cosx −
xex = 0. Take the initial approximations as x0 = 0 and x1 = 1. Perform three iterations in
each method.
Solution: By Regula-Falsi Method: Let f (x) = cosx − xex . then f (0) = 1 and f (1) =
cos1 − e = −2.177979. Hence, a root lies between x0 = 0 and x1 = 1 and we take
x1 − x0
x2 = x1 − f (x1 ) = 0.314665
f (x1 ) − f (x0 )
By Secant Method: Let f (x) = cosx − xex . Then f (0) = 1 and f (1) = cos1 − e =
−2.177979. Then
x1 − x0
x2 = x1 − f (x1 ) = 0.314665
f (x1 ) − f (x0 )
5
Solution of algebraic and transcendental equations: Dr. P Majee
x2 − x1
x3 = x2 − f (x2 ) = 0.446728
f (x2 ) − f (x1 )
x3 − x2
x4 = x3 − f (x3 ) = 0.531705
f (x3 ) − f (x2 )
5 Newton-Raphson Method:
Let x0 be an initial approximation to the root of f (x) = 0. Then (x0 , f (x0 )) is a point on the
curve y = f (x). The equation of the tangent to the curve y = f (x) at the point (x0 , f (x0 )) is
0
y − f (x0 ) = f (x0 )(x − x0 ). (4)
The point where it crosses x-axis is called the next approximate value x1 . Putting y = 0 in
(4), we obtain
f (x0 )
x = x0 − .
f 0 (x0 )
Thus,
f (x0 )
x1 = x0 − .
f 0 (x0 )
In general, for n-th iteration,
f (xn )
xn+1 = xn − , n = 0, 1, 2, ...
f 0 (xn )
Alternative proof: Let at n-th iteration, xn be the approximate root of the equation f (x) =
0. Let hn be the error in n-th iteration. Then xn + hn is the exact root. So, f (xn + hn ) = 0.
6
Solution of algebraic and transcendental equations: Dr. P Majee
f (xn + hn ) = 0
0 hn 2 00
=⇒ f (xn ) + hn f (xn ) + f (xn ) + ... = 0 (U sing T aylor series expansion)
2
0
=⇒ f (xn ) + hn f (xn ) ' 0 (Since hn is small, neglecting higher order terms)
f (xn )
=⇒ hn = − .
f 0 (xn )
Since, higher order terms are discarded, we have not obtained the true value of hn . Hence,
xn + hn is not the exact root, it is an approximate root, call it xn+1 .
Hence,
f (xn )
xn+1 = xn − , n = 0, 1, 2, 3, ...
f 0 (xn )
Observation:
1. Newton-Raphson method requires one initial guess.
0
2. Cost of the method is one evaluation of f (x) and one evaluation of f (x) per iteration.
3. The method may fail if the initial guess if far from the exact root or at any iteration the
derivative of the function is close to zero.
4. The order of convergence of the Newton-Raphson method is 2 (it will be discussed later).
1
Example 3 Perform Newton-Raphson method to obtain the approximate value of (17) 3 with
initial guess x0 = 2.
1 1
Solution: Let x = (17) 3 . Then x = (17) 3 =⇒ x3 = 17 =⇒ x3 − 17 = 0.
0
Take f (x) = x3 − 17. Then f (x) = 3x2 .
Hence, by Newton-Raphson method, we obtain
xn 3 − 17
xn+1 = xn − , n = 0, 1, 2, 3, ...
3xn 2
Question:
(i) Does the sequence {xn } always converge to some root of f (x) = 0?
(ii) How to choose the function φ so that the sequence converge to a root of f (x) = 0?
The answers to the above questions are discussed bellow.
We can write the equation f (x) = 0 in the form x = φ(x) in several ways and can have several
7
Solution of algebraic and transcendental equations: Dr. P Majee
For example, the equation x3 − 5x + 1 = 0, which has a root in (0, 1). Consider the following
representations:
x3 +1
(i) x = 5 which will give successive approximation method
xn 3 + 1
xn+1 = , n = 0, 1, 2, 3, ...
5
Taking x0 = 1, we get x1 = 0.4, x2 = 0.2128, x3 = 0.2019, .... which converges to the root in
(0, 1).
1
(ii) x = (5x − 1) 3 which will give successive approximation method
1
xn+1 = (5xn − 1) 3 , n = 0, 1, 2, 3, ...
Taking x0 = 1, we get x1 = −2, x2 = 1, x3 = −2, .... which is not converging to any root, as
the sequence is oscillatory.
Hence, the successive approximation method depends on the suitable choice of the iteration
function φ(x) and the initial approximation x0 . So the question is, how to choose φ(x) so that
the iteration method converges to a root of f (x) = 0 for suitable initial value.
Condition of convergence: Let f (x) = 0 has a root in the interval I = [a, b]. We write
f (x) = 0 as x = φ(x), where φ is a continuous function in the interval I. The iterative method
is written as
xn+1 = φ(xn ) n = 0, 1, 2, 3, ...
8
Solution of algebraic and transcendental equations: Dr. P Majee
Hence,
0
Let |φ (ci )| < K for i = 0, 1, 2, ...n. Thus,
|α − xn+1 | = K n+1 |α − x0 |.
The sequence {xn } will converge to the root α if the terms in the right hand side tends to
zero as n tends to infinity. Since |α − x0 | is fixed quantity, right hand side tends to zero iff
0
K < 1. Hence, the successive approximation method converges iff |φ (x)| ≤ k < 1 for all x ∈ I.
7 Order of convergence
An iterative method is said to have an order of convergence p if p is the largest positive real
number for which there exists a finite positive real constant C such that
|n+1 | ≤ C||p ,
or
|xn+1 − α| ≤ C|xn − α|p ,
9
Solution of algebraic and transcendental equations: Dr. P Majee
In bisection method, in each iteration the original interval is divided in to two sub intervals.
If we take the mid-point of the successive intervals as the approximations of the root, then
one half of the current interval is the upper bound to the error. So, in bisection method,
1
|xn+1 − α| ≤ |xn − α|,
2
or
1
|n+1 | ≤ |n |,
2
where n+1 and n are the errors in the n-th and (n + 1)-th approximations, respectively.
Comparing with the definition of order of convergence
|n+1 | ≤ C|n |p ,
we obtain C = 0.5 and p = 1. Thus the bisection method has order of convergence 1.
xn − xn−1
xn+1 = xn − f (xn ), n = 0, 1, 2, ... (5)
f (xn ) − f (xn−1 )
Let α be the exact root i.e., f (α) = 0 and n be the error in the n-th approximation.
Hence, xn−1 = α + n−1 , xn = α + n and xn+1 = α + n+1 . Putting these values in (5), we
obtain,
α + n − (α + n−1 )
α + n+1 = α + n − f (α + n )
f (α + n ) − f (α + n−1 )
(n − n−1 )f (α + n )
⇒ n+1 = n −
f (α + n ) − f (α + n−1 )
10
Solution of algebraic and transcendental equations: Dr. P Majee
(n − n−1 )f (α + n )
n+1 = n −
f (α + n ) − f (α + n−1 )
0 n 2 00
(n − n−1 )[f (α) + n f (α) + 2 f (α) + ...]
⇒ n+1 = n − 0 2 n−1 2 00
n 00 0
[f (α) + n f (α) + 2 f (α) + ...)] − [f (α) + n−1 f (α) + 2 f (α) + ...)]
0
0
(n − n−1 )f (α)[n + n 2 2ff 00(α)
(α)
+ ...]
⇒ n+1 = n − 00
f (α)
f 0 (α)[(n − n−1 ) + (n 2 − n−1 2 ) 2f 0
(α)
+ ...)]
0
(n + n 2 2ff 00(α)
(α)
+ ...)
⇒ n+1 = n − 00
f (α)
[1 + (n + n−1 ) 2f 0
(α)
+ ...]
0
(n + An 2 + ...) f (α)
⇒ n+1 = n − , where
[1 + A(n + n−1 ) + ...] 2f 00 (α)
⇒ n+1 = n − (n + An 2 + ...)(1 − A(n + n−1 ) + ...)
⇒ n+1 ' An n−1 (neglecting the higher order terms) (6)
− p1 1
Let n+1 = Cn p ⇒ n = Cn−1 p ⇒ n−1 = C n p .
− p1 1
Hence, from (6), we get Cn p = An C n p√. Comparing the power of n , we obtain p =
1 1± 5
1+ p ⇒ p2 − p − 1 = 0. Which gives, p = 2 . Since p is positive, hence p = 1.618. Thus,
the order of convergence for the secant method is 1.618. (super linear order of convergence).
We have earlier noticed that in regula-falsi method, one of the end point of the initial guesses
x0 and x1 of the interval [x0 , x1 ] is always fixed and the other end point varies with n. With
out loss of generality, let us assume that x0 is fixed. Then the formula for regula-falsi method
for finding the root of f (x) = 0 is
xn − x0
xn+1 = xn − f (xn ), n = 0, 1, 2, ... (7)
f (xn ) − f (x0 )
Let α be the exact root i.e., f (α) = 0 and n be the error in the n-th approximation.
Hence, x0 = α + 0 , xn = α + n and xn+1 = α + n+1 . Putting these values in (5), we obtain,
α + n − (α + 0 )
α + n+1 = α + n − f (α + n )
f (α + n ) − f (α + 0 )
(n − 0 )f (α + n )
⇒ n+1 = n −
f (α + n ) − f (α + 0 )
11
Solution of algebraic and transcendental equations: Dr. P Majee
(n − 0 )f (α + n )
n+1 = n −
f (α + n ) − f (α + 0 )
0 n 2 00
(n − 0 )[f (α) + n f (α) + 2 f (α) + ...]
⇒ n+1 = n − 0 n 2 00 0 0 2 00
[f (α) + n f (α) + 2 f (α) + ...)] − [f (α) + 0 f (α) + 2 f (α) + ...)]
0
0
(n − 0 )f (α)(n + n 2 2ff 00(α)
(α)
+ ...)
⇒ n+1 = n − 00
f (α)
f 0 (α)[(n − 0 ) + (n 2 − 0 2 ) 2f 0
(α)
+ ...]
0
(n + n 2 2ff 00(α)
(α)
+ ...)
⇒ n+1 = n − 00
f (α)
[1 + (n + 0 ) 2f 0
(α)
+ ...]
0
(n + An 2 + ...) f (α)
⇒ n+1 = n − where
[1 + A(n + 0 ) + ...] 2f 00 (α)
⇒ n+1 = n − (n + An 2 + ...)(1 − A(n + 0 ) + ...)
⇒ n+1 ' An 0 (neglecting the higher order terms)
⇒ n+1 ' Kn (where K = A0 ) (8)
f (xn )
xn+1 = xn − , n = 0, 1, 2, ... (9)
f 0 (xn )
12
Solution of algebraic and transcendental equations: Dr. P Majee
Let α be the exact root and n be the error in the n-th approximation.
Then, xn = α + n and xn+1 = α + n+1 . Putting these values in (9), we obtain,
f (α + n )
α + n+1 = α + n −
f 0 (α + n )
f (α + n )
⇒ n+1 = n − 0
f (α + n )
0 n 2 00
f (α) + n f (α) + 2 f (α) + ...
= n − n 2 000
f 0 (α) + n f 00 (α) + 2 f (α) + ...
00
f (α)
n + n 2 2f 0
(α)
+ ...
= n − 00
1 + n f 0f(α)+...
(α)
00
n + An 2 + ... f (α)
= n − , where A = 0
1 + 2An + ... 2f (α)
= n − (n + An 2 + ...)(1 + 2An + ...)−1
= n − (n + An 2 + ...)(1 − 2An + ...)
= n − n + 2An 2 − An 2 − 2A2 n 3 + ...
' An 2 (neglecting the higher order terms)
Suppose f (x) = 0 has a root in the interval I = [a, b]. We write f (x) = 0 as x = φ(x), where
φ is a continuous function in the interval I. The iterative method is written as
0 0
|α − xn+1 | = |α − xn ||φ (cn )| ⇒ |α − xn+1 | ≤ |α − xn | (as|φ (cn )| < 1).
0
Hence, if φ (cn ) 6= 0, the order of convergence for successive approximation method is 1.
13
Solution of algebraic and transcendental equations: Dr. P Majee
8 Muller’s Method
Most of the root finding methods (regula-falsi method, secant method, Newton-Raphson
method) we have discussed so far have approximated the function y = f (x) in the neigh-
borhood of a root by a straight line.
Muller’s method is based on approximating the function in the neighborhood of a root by a
quadratic polynomial. This gives much better match to the actual curve than by a straight
line. This method converges almost quadratically and can be used to obtain complex roots.
Let xk−2 , xk−1 and xk be three approximations of the root α of f (x) = 0. Let yk−2 , yk−1 and
yk be the corresponding functional values of y = f (x).
Assume that P (x) = a(x − xk )2 + b(x − xk ) + c is the parabola passing through the points
(xk−2 , yk−2 ), (xk−1 , yk−1 ) and (xk , yk ). Then, we have
yk = c
yk−1 = a(xk−1 − xk )2 + b(xk−1 − xk ) + c
yk−2 = a(xk−2 − xk )2 + b(xk−2 − xk ) + c.
14
Solution of algebraic and transcendental equations: Dr. P Majee
If hk = xk − xk−1 and 4yk = yk − yk−1 , then after little manipulation a, b, c can be written
as
and
4yk
b= + ahk
hk
and
c = yk .
Any one of the above formulas can be used to evaluate a, b and c. Now, to find the next
iterative value xk+1 we solve
a(x − xk )2 + b(x − xk ) + c = 0.
Solving, we obtain
√
−b ± b2 − 4ac
x − xk = .
2a
Thus,
√
−b ± b2 − 4ac
xk+1 = xk + .
2a
which gives
2c
xk+1 = xk − √ .
b± b2 − 4ac
The sign of the denominator should be chosen in such a way that the denominator is largest
in magnitude.
Example 4 Using Muller’s method, find the root of the equation x3 − 2x − 5 = 0, which lies
15
Solution of algebraic and transcendental equations: Dr. P Majee
and
c = 16
2c 2 ∗ 16
x3 = x2 − √ =3− √ = 2.0868
b± 2
b − 4ac 23 ± 232 − 4 ∗ 6 ∗ 16
and
c = −0.0861
16
Solution of algebraic and transcendental equations: Dr. P Majee
2c
x4 = x3 − √
b± b2 − 4ac
2 ∗ (−0.0861)
= 2.0868 − p
12.9556 ± 12.95562 − 4 ∗ 5.1024 ∗ (−0.0861)
= 2.0970
where Qn−2 (x) is a polynomial of degree n−2, say, Qn−2 (x) = bn−1 xn−2 +bn−3 xn−3 +...+b1 x+
b0 , (bn−2 6= 0). So, if we want to find roots of the equation Pn (x) = 0, we have x2 + px + q = 0
and Qn−2 (x) = 0. The equation x2 + px + q = 0 can be easily solved. To solve Qn−2 (x) = 0,
we will again extract a quadratic factor from Qn−2 (x). We will keep on repeating the process
until at the end we get a quadratic polynomial or a linear polynomial. So our main aim is to
learn the method to extract quadratic factor from a given polynomial.
We need to find r and s in such a way that C = 0 and D = 0. Then (x2 + rx + s) will be a
factor of Pn (x).
Let us discuss the method of extracting quadratic factor from a cubic polynomial. Let
the polynomial be
P3 (x) = A3 x3 + A2 x2 + A1 x + A0 . (10)
17
Solution of algebraic and transcendental equations: Dr. P Majee
A3 = B1
A2 = rB1 + B0
A1 = C + rB0 + sB1
A0 = D + sB0
Using forward calculations, we need to find the values of C and D. Doing so, we obtain
Since A0 , A1 , A2 and A3 are known, C and D are functions of r and s, i.e., C = C(r, s) and
D = D(r, s).
Since x2 + Rx + S is the exact factor of the given polynomial, We have
We will create an iterative method and convert the approximate factor x2 + rx + s to the exact
factor x2 + Rx + S. Let R = r + 4r and S = s + 4s. Putting these values in (12), we obtain
Now, expanding in Taylor series and discarding the higher terms, we get
∂C ∂C
C(r, s) + 4r + 4s '0
∂r ∂s
∂D ∂D
D(r, s) + 4r + 4s ' 0,
∂r ∂s
where the C, D and the derivatives are to be computed at the point (r, s). Solve the above
equations to obtain the values of 4r and 4s. Since, we have discarded the higher order terms,
we will not get the exact values of 4r and 4s, instead we will obtain some approximate values.
So, x2 + (r + 4r)x + s + 4s will not be the exact factor, it will be an approximate factor for
P3 (x). The process will be repeated until successive values of R and S shows no significant
changes.
Pn (x) = An xn + ... + A2 x2 + A1 x + A0 ,
consider
18
Solution of algebraic and transcendental equations: Dr. P Majee
and express C and D as functions of r and s. Then, we continue the calculations as above.
B1 = 1, B0 = −2 − r
C = 1 + 2r + r2 − s, D = −2 + 2s + rs.
Here,
∂C ∂C ∂D ∂D
= 2 + 2r, = −1, = s, = 2 + r.
∂r ∂s ∂r ∂s
Iteration 1: Let x2 + (r + 4r)x + (s + 4s) be the next approximate factor. To find 4r and
4s, we need to solve
∂C ∂C
C(r, s) + 4r + 4s =0
∂r ∂s
∂D ∂D
D(r, s) + 4r + 4s = 0,
∂r ∂s
Here, C, D and the derivatives are to be computed at the point (−0.5, 1). So,
Hence, we get
4r − 4s = 0.75
4r + 1.54s = 0.5
Solving we get,
4r = 0.65, 4s = −0.1
19
Solution of algebraic and transcendental equations: Dr. P Majee
Iteration 2: Let the approximate factor be x2 + 0.15x + 0.9. Here, r = 0.15 and s = 0.9. So,
Hence, we get
2.304r − 4s = −0.4225
.94r + 2.154s = −0.65
Solving we get,
4r = −0.1665, 4s = 0.0394
20