You are on page 1of 58

Root Finding Methods for Nonlinear

Equations

Dr. Sukanta Deb


Department of Physics
Cotton College State University
College Hostel Road, Panbazar
Guwahati, Pin 781001
Assam
1

Learning Objectives:

• Numerical Methods for the Root Finding


2

Solution of Algebraic and Transcendental Equations


A variable x is said to be a root of the function f (x) if

f (x) = 0 (1)

A root of this equation is also called a zero of the function. For example, the the two roots of a quadratic
equation of the form
ax2 + bx + c = 0 (2)
are given by √
−b ± b2 − 4ac
x= , (3)
2a

where a, b, c are real numbers. The quatitity b2 − 4ac is called the discriminant and is denoted by D.
The value of D determines the nature of root of the equation (2).

• If D = 0, then both the two roots are real and equal (repeated roots).

• If D > 0, the roots are real and distinct.

• If D < 0, then the roots are imaginary.

Although the quadratic equation (2) can be solved exactly there exist many functions for which the exact
solution does not exist. For an instance the function

f (x) = e−x − x (4)

cannot be solved analytically. For the solutions of those functions one has to resort to the approximate
numerical methods (called iterative methods) which provides an efficient means to obtain the answer.
Generically, an approximate solution of a function f (x) having any form can be obtained using the
iterative method. Hence based on the above two cases, there are two methods that can be used to find the
roots of the equation (1).

1. Direct methods: These methods provide the exact value of the roots without any round-off error)
in a finite number of steps. All the roots can be determined at the same time using these methods.

2. Iterative methods: Iterative methods, also known as trial and error, are based on the idea of
succesive approximations. These methods provide an approximate value of the roots. They start
with one or more initial approximations and obtain a sequence of approximations by repeating a
fixed sequence of steps till the result within a prescribed tolerance (or accuracy) is obtained.

In this chapter, numerical methods for finding the roots nonlinear equations using the methods of itera-
tions will be discussed.
3

Rate of convergence of an iterative method


The rate of convergence of an iterative process is determined by the number of iterations taken to converge
to the result. An iterative method is said to be of order p or has the rate of convergence p, if p is the
largest positive number for which |ǫi+1 | ≤ k|ǫi |p , where ǫi , ǫi+1 are the absolute errors in the ith , (i+1)th
iterations, respectively. The constant k is called the asymptotic error constant. The higher the value of
p, the faster will be the rate of convergence. If p = 1, the convergence is linear. If p = 2, the convergence
is quadratic and so on. The efficiency of an iterative procedure increases with smaller value of k. For
the bisection method k = 0.5.

Criteria for convergence


One of the most important questions regarding the iterative methods is when the iteration should be
stopped. The most obvious answer is that the procedure should be stopped when the error on the solution
has been reduced to a prescribed tolerance. In other words, we say that the iteration should be stopped
when the numerical algorithm has converged on a solution. Let ǫ be the prescribed tolerance, i.e., we
would like to obtain the root with at most of ǫ. Given following are some of the commonly used criteria
for convergence

(a) |f (xi ) < ǫ| , where ǫ is the tolerance limit close to zero.


(b) |xi+1 − xi | ≤ ǫ, where ǫ is called the absolute tolerance.

xi+1 − xi
(c) ≤ ǫ, xi+1 6= 0. where ǫ is called relative tolerance.
xi+1
The criteria (a) provides an way to determine if the convergence has reached by monitoring the value
of the function for the solution at each and every iteration. if a zero of the function is sought, then the
approach of the function towards zero can be used as the test for termination of the iterative method. On
the other hand xi+1 >> 1, then condition (b) is more stringent. If xi+1 << 1, condition (c) gives more
strict convergence crterion than condition (a). However, one has the option of applying one or multiple
criteria for convergnce as deemed to be appropriate.

Algebraic and Transcendental Equations


1. Albebraic Equations: An algebraic function of degree n in one variable is a function y = f (x) if
it satisfies an equation of the form

a0 (x) + a1 (x)y + · · · + an−1 (x)y n−1 + an (x)y n = 0, (5)

where ai ’s are ith order (i = 1, 2, . . . , n) polynomials in x. Polynomials are a simple class of


algebraic function that are represented genereally by

fn (x) = a0 + a1 x + a2 x2 + · · · + an−1 xn−1 + an xn , (6)


4

where n is the order of the polynomial and ai ’s are constants (i = 0, 1, . . . , n) and are called the
coefficients of the polynomial.

2. Transcendental Equation: A function which is nonalgebraic is called a transcendental function.


These include trigonometric, exponential, logarithmic, and other less familiar functions. Examples
are f (x) = log x2 − 1 and f (x) = e−0.2x sin(3x − 5). Although the roots of the algebraic and
transendental equations may be either real or complex, we will be dealing only with the methods
which give real roots in this course.

Broadly, these two classes of equations fall into the category of nonlineear equations, since the functions
belonging to either of these classes are nonlinear in x. This chapter focusses on finding the roots of non-
linear equations applying the rules of numerical techniques. Numerical techniques for solving nonlinear
equations in one variable through iterative methods can be broadly classified into categories:

(i) Bracketing methods. Examples include the bisection method and the regula-falsi method.

(ii) open interval methods. Examples include Newton raphson method and the secant method.

In bracketing methods, two initial guesses for the roots are required which must bracket the root, i.e, they
should be on either side of the root. After each and every iteration, the width of the bracket which include
the root is reduced until it approximates the correct answer. The bracketing method usually guarantees
the convergence if the specified bracket contains the root. Brackting methods provide reliable soltions but
converge slowly. But in numerical computation, faster methods of convergence are ususllay preferred.
Open interval methods yield faster rate of converegence which explains their popularity. Nontheless,
open interval methods do not always guarantee a solution.

Fixed-Point Iteration Method


A number p is a fixed point of a function φ(x) if φ(p) = p.
Let us suppose that the equation f (x) = 0 is written in the form x = φ(x), i.e., f (x) = x − φ(x) = 0.
Then any fixed point p of φ(x) is a root of f (x) = 0, because f (p) = p − φ(p) = 0. Thus a root of
f (x) = 0 can be found by finding a fixed point of x = φ(x), which corresponds to f (x) = 0.
Finding a root of f (x) = 0 by finding a fixed point of x = φ(x) clearly suggests an iterative procedure
of the following type.
Let x0 be an initial approximation to the root, and form a sequence xk defined by

xk+1 = φ(xk ), k = 0, 1, 2 . . . .

If the sequence xk converges, then


lim xk = p
k→∞

will be a root of of f (x) = 0. Figure 3 shows the working of the fixed point iteration method.
5

Figure 1: Working of fixed point interation method

Example 1. When does Fixed point iteration converge?

Solution 1. The following theorem gives us a sufficient condition on φ(x) which ensures the convergence
of the sequence xk .

Theorem (1) (Fixed-Point Iteration Theorem). Let f (x) be written in the form

x = φ(x).

Let us assume that φ(x) has the following properties:

1. For all x in [a, b], φ(x) ∈ [a, b]; that is φ(x) takes every value between a and b.
′ ′
2. φ (x) exists on (a, b) with the property that there exists a positive constant r < 1 such that |φ (x)| ≤
r, for all x in (a, b).

Then

(i) there is a unique fixed point x = p of φ(x) in [a, b].

(ii) For any point x0 in [a, b], the sequence xk defined by

xk+1 = φ(xk ), k = 0, 1, 2 . . . .

converges to the fixed point x = p; that is to the root p of f (x) = 0. The proof of this Theorem
requires Mean Value Theorem of calculus:
Let f (x) be a continuous function in [a, b], and be differentiable on (a, b). Then there is number
c ∈ (a, b) such that
′ f (b) − f (a)
f (c) = .
b−a
6

Proof of the Fixed point Theorem:


The proof comes in three parts: Existence, Uniqueness and Convergence. We first prove that
there is a root of f (x) = 0 in [a, b] and it is unique. Since a fixed point of x = φ(x) is a root of
f (x) = 0, this amounts to proving that there is a fixed point in [a, b] and it is unique. We then prove
that the sequence xk+1 = φ(x) converges to the root.
Existence:
If a = φ(a), then a is a fixed point. If b = φ(b), then b is a fixed point. Since φ(x) ∈ [a, b] for all
x ∈ [a, b], we have

a ≤ φ(a) and φ(b) ≤ b.

Thus, we have

f (a) = φ(a) − a ≥ 0 and f (b) = φ(b) − b ≤ 0

Therefore, by the Intermediate Value Theorem to f (x) in [a, b], we conclude that there is a root
of f (x) in [a, b]. This proves the existence.
Uniqueness (by contradiction):
To prove uniqueness, let us suppose that p1 and p2 are two fixed points in [a, b], and p1 6= p2 . Now,
let us apply the MVT to φ(x). We can find a number c in (p1 , p2 ) such that

′ φ(p2 ) − φ(p1 )
φ (c) = .
p2 − p1
Since φ(p1 ) = p1 , and φ(p2 ) = p2 , we have
′ p2 − p1
φ (c) = .
p2 − p1

That is φ (c) = 1, which is a contradiction to our assumption 2. Thus, p1 cannot be different from
p2 . Therefore, p1 = p2 .
Convergence:
Let p be the root of f (x) = 0. Then the absolute error at step (k + 1) is given by

ek+1 = |p − xk+1 |.

To prove that the sequence converges, we need to show that

lim ek+1 = 0.
k→∞

To show this, we apply the MVT to φ(x) in [xk , p]. Then


′ φ(p) − φ(xk )
φ (c) = , wherexk < c < p.
p − xk
7

That is
′ p − xk+1
φ (c) = (note that φ(p) = p and xk+1 = φ(x))
p − xk
Taking absolute values on both sides, we have

′ |p − xk+1|
|φ (c)| =
|p − xk |
or
′ ek+1
|φ (c)| =
ek

Since φ (c) ≤ r, we have ek+1 ≤ rek . Similarly, we have

ek ≤ rek−1 .

Thus, ek+1 ≤ r 2 ek−1 . Continuing in this way, we finally have ek+1 ≤ r k+1 e0 , where e0 is the
initial error (That is, e0 = |x0 − p|).
Since r < 1, we have r k+1 → 0 as k → ∞. Thus,

lim ek+1 = lim |xk+1 − p|


k→∞ k→∞

≤ lim r k+1e0
k→∞

=0.

This proves that the sequence xk converges to x = p and x = p is the only fixed point of φ(x).

Algorithm 1. The algorithm for the fixed point iteration is given below
Given f (x) = 0, ǫ and an initial point x0 ;
Given max=maximum number of iterations;

Find a suitable equation x = φ(x) from f (x) = 0 where −1 ≤ φ (x) ≤ 1;
For i = 0 to max
Compute xi+1 = φ(xi );
If |xi+1 − xi | < ǫ;
Solution=xi+1 ;
Stop the iterations;
Endif
Endfor

Example 2. Find the root of f (x) = x3 − x2 − 2 using the fixed-point iteration method, given the initial
value of x0 = 1 with iterations until |xi+1 − xi | < ǫ where, ǫ = 0.005.
8

Table 1: Numerical results for the above problem



i xi φ(xi ) |φ (xi )| |xi+1 − xi |
0 1.000000 1.442250 0.320500 0.442250
1 1.442250 1.597925 0.376562 0.155675
2 1.597925 1.657464 0.387772 0.059539
3 1.657464 1.680656 0.391197 0.023192
4 1.680656 1.689743 0.392416 0.009087
5 1.689743 1.693311 0.392877 0.003568
6 1.693311

Solution 2. Setting f (x) = 0 suggests several representations in the form of x = φ(x), including
p
x = ± (x3 − 2), x = x22−x and x = (x2 + 2)1/3 . The first two functions are not suitable as they are not
defined at x0 = 1.
′ 2x
Obviously φ(x) = (x2 + 2)1/3 is a good choice as φ (x) = 3(x2 +2) 2/3 is a monotonically increasing

function with values between 0 and 1. Hence xi+1 = φ(xi ) = (xi + 2)1/3 is a suitable choice here.
2

For i = 0, x1 = (x0 2 + 2)1/3 = (12 + 2)1/3 = 1.442250, with φ (x0 ) = 0.320500. The error is
|x1 − x0 | = |1.442250 − 1.000| = 0.442250 > ǫ.

For i = 1, x2 = (x1 2 + 2)1/3 = (1.4422502 + 2)1/3 = 1.597925, with φ (x1 ) = 0.376562. The error
is |x2 − x1 | = |1.597925 − 1.442250| = 0.155675 > ǫ.
Therefore, the process continues with the next iteration. The iterations stop at i = 5, where |x6 −x5 | =
0.003568 < ǫ. The final solution is x⋆ = x6 = 1.693311 . Table 27 shows the complete results from this
method.

Example 3. Find a real root of the following equation correct to three decimal places using the fixed
point iteration method:
cos x = 3x − 1.

Solution 3. The given equation is


cos x = 3x − 1.
Let us rewrite the given equation as
1
x = (cos x + 1)
3
⇒ x =φ(x),
9

Table 2: Numerical results for the above problem



i xi φ(xi ) |φ (xi )| |xi+1 − xi |
0 1.00000 0.51343 0.16372 0.48657
1 0.51343 0.62369 0.19468 0.11025
2 0.62369 0.60391 0.18929 0.01978
3 0.60391 0.60771 0.19033 0.00380
4 0.60771 0.60699 0.19013 0.00072
5 0.60699 0.60712 0.19017 0.00014

where
1
φ(x) = (cos x + 1)
3
sin(x)
⇒ φ′ (x) = −
3

⇒ |φ (x)| ≤1.

Therefore, the fixed point interation method can be applied. Let us take the first approximation as x0 = 1.
Then the successive approximations of the root can be obtained as follows:
1
x1 =φ(x0 ) = [cos(1) + 1] = 0.51343
3
1
x2 =φ(x1 ) = [cos(0.51343) + 1] = 0.62369
3
1
x3 =φ(x2 ) = [cos(0.62369) + 1] = 0.60391
3
1
x4 =φ(x3 ) = [cos(0.60391) + 1] = 0.60771
3
1
x5 =φ(x4 ) = [cos(0.60771) + 1] = 0.60699
3
1
x6 =φ(x5 ) = [cos(0.60699) + 1] = 0.60712
3

In the fifth and the sixth iterations, the successive approximations of the roots are obtained as 0.60699
and 0.60712, respectively. Therefore, the required root of the equation correct to three decimal places is
0.607. Table 2 shows the complete results from this method.

Example 4. Find a real root of the following equation correct to two decimal places using the fixed point
iteration method:
xex = 1.
10

Solution 4. The given equation is


xex = 1.
Let us rewrite the given equation as

x =e−x
⇒ x =φ(x),

where

φ(x) =e−x
⇒ φ′ (x) = − e−x
⇒ |φ′ (x)| <1, ∀x < 1.

Therefore, the fixed point interation method can be applied. Let us take the first approximation as x0 =
0.5. Then the successive approximations of the root can be obtained as follows:

x1 =φ(x0 ) = exp(0.50000) = 0.60653


x2 =φ(x1 ) = exp(0.60653) = 0.54524
x3 =φ(x2 ) = exp(0.54524) = 0.57970
x4 =φ(x3 ) = exp(0.57970) = 0.56006
x5 =φ(x4 ) = exp(0.56006) = 0.57117
x6 =φ(x5 ) = exp(0.57117) = 0.56486
x7 =φ(x6 ) = exp(0.56486) = 0.56844

In the sixth and the seventh iterations, the successive approximations of the roots are obtained as 0.56486
and 0.56844, respectively. Therefore, the required root of the equation correct to three decimal places is
0.56. Table 4 shows the complete results from this method.

Example 5. Find a real root of the following equation correct to three decimal places using the fixed
point iteration method:
2x − log10 x − 7 = 0.

Solution 5. The given equation is


2x − log10 x − 7 = 0.
Let us rewrite the given equation as
1
x = (log10 x + 7)
2
⇒ x =φ(x),
11

Table 3: Numerical results for the above problem



i xi φ(xi ) |φ (xi )| |xi+1 − xi |
0 0.50000 0.60653 0.54524 0.10653
1 0.60653 0.54524 0.57970 0.06129
2 0.54524 0.57970 0.56006 0.03446
3 0.57970 0.56006 0.57117 0.01964
4 0.56006 0.57117 0.56486 0.01111
5 0.57117 0.56486 0.56844 0.00631
6 0.56486 0.56844 0.56641 0.00358

where
1
φ(x) = (log10 x + 7)
2
log e
⇒ φ′ (x) = 10
2x

⇒ |φ (x)| <1, ∀x < 1.

Therefore, the fixed point interation method can be applied. Let us take the first approximation as x0 = 1.
Then the successive approximations of the root can be obtained as follows:
1
x1 =φ(x0 ) = [log10 (1.00000) + 7] = 3.50000
2
1
x2 =φ(x1 ) = [log10 (3.50000) + 7] = 3.77203
2
1
x3 =φ(x2 ) = [log10 (3.77203) + 7] = 3.78829
2
1
x4 =φ(x3 ) = [log10 (3.78829) + 7] = 3.78922
2
1
x5 =φ(x4 ) = [log10 (3.78922) + 7] = 3.78927
2

In the fourth and the fifth iterations, the successive approximations of the roots are obtained as 3.78922
and 3.78927, respectively. Therefore, the required root of the equation correct to three decimal places is
3.789. Table 4 shows the complete results from this method.
Example 6. Find a real root of the follwing equation correctto three decimaal places:

sin x = 5x − 2.

Solution 6. Let us first express the given equation in the form x = φ(x) and then find out which of this
form will give a convergent solution of the given equation.
12

Table 4: Numerical results for the above problem



i xi φ(xi ) |φ (xi )| |xi+1 − xi |
0 1.00000 3.50000 0.06204 2.50000
1 3.50000 3.77203 0.05757 0.27203
2 3.77203 3.78829 0.05732 0.01625
3 3.78829 3.78922 0.05731 0.00093
4 3.78922 3.78927 0.05731 0.00005

FormI :
sin x =5x − 2
⇒ x = sin−1 (5x − 2)
⇒ x = φ(x),
where
φ(x) = sin−1 (5x − 2)
5
⇒ φ′ (x) = p .
1 − (5x − 2)2
Now, |φ′ (x)| > 1 ∀x for which
(5x − 2)2 < 1
3
⇒x<
5
⇒ x < 0.6
Thus the method will not give a convergent solution.

FormII :
sin x =5x − 2
1
⇒ x = (sin x + 2)
5
⇒ x =φ(x),
where
1
φ(x) = (sin x + 2)
5
1
⇒ φ′ (x) = cos x
5
1
⇒ |φ′ (x) ≤ < 1, ∀x ∵ | cos x| ≤ 1.
5
13

Table 5: Numerical results for the above problem



i xi φ(xi ) |φ (xi )| |xi+1 − xi |
0 1.00000 0.56829 0.16856 0.43171
1 0.56829 0.50764 0.17478 0.06066
2 0.50764 0.49722 0.17578 0.01042
3 0.49722 0.49540 0.17596 0.00183
4 0.49540 0.49508 0.17599 0.00032

Therefore, we find that the φ(x) obtained from Form II will give a convergent solution. Therefore,
we choose φ(x) = 15 (sin x + 2). Let us take the first approximation as x0 = 1. Then the successive
approximations of the root can be obtained as follows:
1
x1 =φ(x0 ) = [sin (1.00000) + 2] = 0.56829
5
1
x2 =φ(x1 ) = [sin (0.56829) + 2] = 0.50764
5
1
x3 =φ(x2 ) = [sin (0.50764) + 2] = 0.49722
5
1
x4 =φ(x3 ) = [sin (0.49722) + 2] = 0.49540
5
1
x5 =φ(x4 ) = [sin (0.49540) + 2] = 0.49508
5

In the fourth and the fifth iterations, the successive approximations of the roots are obtained as 0.49540
and 0.49508, respectively. Therefore, the required root of the equation correct to three decimal places is
0.495. Table 5 shows the complete results from this method.

//C++ program to find root by fixed point iteration method using for loop
//Written by Dr. Sukanta Deb, ANDC, University of Delhi
#include < iostream >
#include < cmath >
#include < iomanip >
#define iter 30
using namespace std;
double f(double x)
{double p, d;
d = pow(x, 2.0) + 2;
p = pow(d, 1./3);
14

return p;
}
double g(double x)
{
double r, s;
s = pow(x, 2.0) + 2;
r = (2 ∗ x)/(3 ∗ pow(s, 2./3));
return r;
}
int main()
{
int i, n;
double t, x = 1.0;
double eps = 0.005;
cout.precision(6);
cout.setf(ios :: fixed);
for(i = 0; i < iter; i + +)
{
t = x;
x = f(x);
if(fabs(x − t) < eps)
break;
}
cout << ”The solution is : ” << endl;
cout << setw(10) << x;
cout << endl;
return 0;
}
The same program is implemented below using the do-while loop.
//C++ program to find root by fixed point iteration method using do-while loop
//Written by Dr. Sukanta Deb, ANDC, University of Delhi
#include < iostream >
#include < cmath >
#include < iomanip >
using namespace std;
double f(double x)
{
double p, d;
15

d = pow(x, 2.0) + 2;
p = pow(d, 1./3);
return p;
}
int main()
{
double t, x = 1.0;
double eps = 0.005;
cout.precision(6);
cout.setf(ios :: fixed);
do
{
t = x;
x = f(x);
}while(fabs(t − x) > eps);
cout << ”x = ” << x;
cout << endl;
return 0;
}

Bisection Method (Bolzano Method)


In this topic and in the other forthcoming topics of root finding, we will need to use one or a combination
of the following theorems. These theorems find their importance in the root finding methods such as
bisection in particular and other methods.

Theorem (2) (Intermediate Mean-Value Theorem). Let f (x) be continuous on [a, b] and let k be any
number between f (a) and f (b). Then there exists a number x ∈ [a, b] such that k = f (x).

Theorem (3) (Mean-Value Theorem). Let f (x) be a continuous function defined on [a, b], such that
f (a)f (b) < 0 (i.e., f (a) and f (b) are of opposite sign). Then there exists at least one root c ∈ [a, b] of
f (x) = 0.

Theorem (4) (Rolle’s Theorem). If


(i) f (x) is continuous in [a, b],

(ii) f (x) exists in (a, b), and
(iii) f (a) = f (b) = 0,
then, there exists at least one value of x, say c such that

f (c) = 0, where c ∈ (a, b).
16

Theorem (5) (Mean Value Theorem for Derivatives). If


(i) f (x) is continuous in [a, b],

(ii) f (x) exists in (a, b), and
then, there exists at least one value of x, say c such that

′ f (b) − f (a)
f (c) = , where c ∈ (a, b).
b−a
Bisection method is one of the simplest iterative methods for nonlienar root finding. This method
is based on the mean value theorem 3 which states that if a function f (x) is continuous in [xl , xu ] and
f (xl )f (xu ) < 0 (i.e., f (xl ) and f (xu ) are of opposite sign). Then there exists at least one root xm ∈
[xl , xu ] of f (x) = 0.
As the title suggests, the method is based on repeated bisections of an interval containing the root.
Let us suppose that f (xl ) and f (xu ) are such that f (xl ) × f (xu ) < 0. This ensures that the root lies
between xl and xu .
Then bisect the interval [xl , xu ] and let xm = xl +x
2
u
be the middle point of [xl , xu ]. Then, there are
three possibilities that can aries

(i) If f (xm ) = 0, then xm is the root.

(ii) If f (xl ) × f (xm ) < 0, then the root lies in the interval (xl , xm ). Then xl = xl ; xu = xm . Therefore,
the new interval now becomes [xl , xm ] which is half of the current interval is again bisected.

(iii) If f (xl )×f (xm ) > 0, then the root lies in the interval (xm , xu ). Then xl = xm ; xu = xu . Therefore,
the new interval now becomes [xm , xu ] which is again bisected.

Therfore, by repeating this interval bisection procedure, we keep on enclosing the root in a new search
interval, which is halved in each iteration. This iterative cycle is terminated when the search interval
becomes smaller that the prescribed tolerance or the value of the function nearly vanishes at the new
x−value. Let ǫ be the prescribed tolerance in the required root. Then, the iterative cycle terminates when
the absolute error becomes less than or equal to the prescribed tolerance, i.e.,

|xu − xl | ≤ ǫ

Example 7. How many iterations are needed in order that the length interval is less than ǫ in bisection
method?

Solution 7. Let L0 = xu − xl be the initial search interval that contains the root. After bisecting the
interval n times, the search interval is reduced to the length given by
L0
Ln = .
2n
17

Bisection method
40

30
f(xu)
20
f(x)

10
xl xm
0
xu
f(xm)
-10
f(xl)
-20
1.0 1.5 2.0 2.5 3.0 3.5 4.0
x

Figure 2: Root finding using the bisection method.

We require
L0 (xu − xl )
Ln ≤ ǫ ⇒ ≤ ǫ ⇒ ≤ǫ
2n 2n

Taking logarithm on both sides of the inequality, we get


 
(xu − xl )
loge ≤ loge ǫ ⇒ loge (xu − xl ) − loge ǫ ≤ n log 2
2n

h i
(xu −xl )
loge ǫ
⇒n≥ loge 2

Example 8. What is the minimum number of iterations needed in the bisection algorithm, given xl = 2.5,
xu = 3.5 and ǫ = 10−3.
Solution 8. We know that the minimum number of iterations needed to obtain a root of desired accuracy
is given by h i
(xu −xl )
loge ǫ
⇒n≥ = 10
loge 2
18

Table 6: Minimum number of iterations required

ǫ 10−2 10−3 10−4 10−5 10−6


n 7 10 14 17 20

Let us assume that the root lies in the interval (1, 2), then the minimum number of iterations required to
find the root within the prescribed tolerance ǫ are listed in Table 6.

Algorithm 1. The algorithm for the bisection method is given below


Given f (x) = 0, ǫ and the initial end points [xl , xu ], where f (xl )f (xu ) < 0;
Given max=maximum number of iterations;
For i = 0 to max
Compute xm = (xl2.0 +xu )
;
If f (xl )f (xm ) < 0
Update xl = xl and xu = xm ;
If f (xl )f (xm ) > 0
Update xl = xm and xu = xu ;
If |xu − xl | < ǫ
Solution = xm ;
Stop the iterations;
Endfor

Example 9. Find a real root of the following equation correct upto two decimal places:

x3 − 2x − 5 = 0.

Solution 9. Let f (x) = x3 − 2x − 5 = 0. Let us try to calculate f (x) for the values of x given in
Table (16). It can be seen from the table that the interval [2, 3] gives the accurate and precise location of
the root among the other two intervals such as [0, 3], [1, 3]. Therfore, we choose xl = 2 and xu = 3 as the
initial two guesses for bracketing the root.

First Iteration : The interval [xl , xu ] = [2, 3] and f (xl ) = f (2) = −1 < 0, f (xu ) = f (3) =
16 > 0. |xu − xl | = |3 − 2| = 1. Therefore,

(xl + xu ) (2 + 3)
xm = = = 2.50
2 2
⇒ f (xm ) = f (2.50) = 5.6250 > 0.
⇒ f (2) ∗ f (2.5) < 0
⇒ Root lies between [2, 2.50].
19

Table 7: This table shows how to select the bracketing interval [a, b] so as to include the root of the
equation x3 − 2x − 5 = 0. It can be seen that the interval [2, 3] gives the accurate and precise location
of the root among the other two intervals such as [0, 3], [1, 3]. Therfore, we choose xl = 2 and xu = 3 as
the initial two guesses for bracketing the root.
x f (x) = x3 − 2x − 5 sign[f (x)]
0 −5 <0
1 −6 <0
2 −1 <0
3 16 >0

Second Iteration : The interval [xl , xu ] = [2, 50] and f (xl ) = f (2) = −1 < 0, f (xu ) =
f (2.50) = 5.6250 > 0. |xu − xl | = |2.5 − 2| = 0.5. Therefore, Now

(xl + xu ) (2 + 2.5)
xm = = = 2.25
2 2
⇒ f (xm ) = f (2.25) = 1.8906 > 0.
⇒ f (2) ∗ f (2.25) < 0
⇒ Root lies between [2, 2.25].

Third Iteration : The interval [xl , xu ] = [2, 2.25] and f (xl ) = f (2) = −1 < 0, f (xu ) =
f (2.25) = 1.8906 > 0. |xu − xl | = |2.25 − 2| = 0.25 Now,

(xl + xu ) (2 + 2.25)
xm = = = 2.125
2 2
⇒ f (xm ) = f (2.125) = 0.3457 > 0.
⇒ f (2) ∗ f (2.125) < 0
⇒ Root lies between [2, 2.1250].

Fourth Iteration : The interval [xl , xu ] = [2, 2.1250] and f (xl ) = f (2) = −1 < 0, f (xu ) =
f (2.1250) = 0.3457 > 0. |xu − xl | = |2.1250 − 2| = 0.1250 Now,

(xl + xu ) (2 + 2.1250)
xm = = = 2.0625
2 2
⇒ f (xm ) = f (2.0625) = −0.3513 < 0.
⇒ f (2.0625) ∗ f (2.125) < 0
⇒ Root lies between [2.0625, 2.1250].

Fifth Iteration : The interval [xl , xu ] = [2.0625, 2.1250] and f (xl ) = f (2) = −1 < 0, f (xu ) =
20

f (2.1250) = 0.3457 > 0. |xu − xl | = |2.1250 − 2.0625| = 0.0625 Now,


(xl + xu ) (2.0625 + 2.1250)
xm = = = 2.0938
2 2
⇒ f (xm ) = f (2.0938) = −0.0089 < 0.
⇒ f (2.0938) ∗ f (2.125) < 0
⇒ Root lies between [2.0938, 2.1250].

Sixth Iteration : The interval [xl , xu ] = [2.0938, 2.1250] and f (xl ) = f (2.0938) = −0.0089 <
0, f (xu ) = f (2.1250) = 0.3457 > 0. |xu − xl | = |2.1250 − 2.0938| = 0.0312 Now,
(xl + xu ) (2.0938 + 2.1250)
xm = = = 2.1094
2 2
⇒ f (xm ) = f (2.1094) = 0.1668 > 0.
⇒ f (2.0938) ∗ f (2.1094) < 0
⇒ Root lies between [2.0938, 2.1094].

Seventh Iteration : The interval [xl , xu ] = [2.0938, 2.1094] and f (xl ) = f (2.0938) = −0.0089 <
0, f (xu ) = f (2.1094) = 0.1668 > 0. |xu − xl | = |2.1094 − 2.0938| = 0.0156 Now,
(xl + xu ) (2.1094 + 2.0938)
xm = = = 2.1016
2 2
⇒ f (xm ) = f (2.1016) = 0.0786 > 0.
⇒ f (2.0938) ∗ f (2.1016) < 0
⇒ Root lies between [2.0938, 2.1016].

Eighth Iteration : The interval [xl , xu ] = [2.0938, 2.1016] and f (xl ) = f (2.0938) = −0.0089 <
0, f (xu ) = f (2.1016) = 0.0786 > 0. |xu − xl | = |2.1016 − 2.0938| = 0.0078 Now,
(xl + xu ) (2.1016 + 2.0938)
xm = = = 2.0977
2 2
⇒ f (xm ) = f (2.0977) = 0.0347 > 0.
⇒ f (2.0938) ∗ f (2.0977) < 0
⇒ Root lies between [2.0938, 2.0977].

Ninth Iteration : The interval [xl , xu ] = [2.0938, 2.0977] and f (xl ) = f (2.0938) = −0.0089 <
0, f (xu ) = f (2.0977) = 0.0347 > 0. |xu − xl | = |2.0977 − 2.0938| = 0.0039 Now,
(xl + xu ) (2.0977 + 2.0938)
xm = = = 2.0957
2 2
⇒ f (xm ) = f (2.0957) = 0.0129 > 0.
⇒ f (2.0938) ∗ f (2.0957) < 0
⇒ Root lies between [2.0938, 2.0957].
21

Tenth Iteration : The interval [xl , xu ] = [2.0938, 2.0957] and f (xl ) = f (2.0938) = −0.0089 <
0, f (xu ) = f (2.0957) = 0.0129 > 0. |xu − xl | = |2.0957 − 2.0938| = 0.0020 Now,
(xl + xu ) (2.0957 + 2.0938)
xm = = = 2.0947
2 2

Iteration xl xu xm f (xl ) f (xu ) f (xm ) |xu − xl |


1 2.0000 3.0000 2.5000 -1.0000 16.0000 5.6250 1.0000
2 2.0000 2.5000 2.2500 -1.0000 5.6250 1.8906 0.5000
3 2.0000 2.2500 2.1250 -1.0000 1.8906 0.3457 0.2500
4 2.0000 2.1250 2.0625 -1.0000 0.3457 -0.3513 0.1250
5 2.0625 2.1250 2.0938 -0.3513 0.3457 -0.0089 0.0625
6 2.0938 2.1250 2.1094 -0.0089 0.3457 0.1668 0.0312
7 2.0938 2.1094 2.1016 -0.0089 0.1668 0.0786 0.0156
8 2.0938 2.1016 2.0977 -0.0089 0.0786 0.0347 0.0078
9 2.0938 2.0977 2.0957 -0.0089 0.0347 0.0129 0.0039
10 2.0938 2.0957 2.0947 -0.0089 0.0129 0.0020 0.0020

Example 10. Find a real root of the following equation correct using ǫ = 0.001 if the root lies in the
interval [0, 1]:
x = cos x.
Solution 10. Let f (x) = x − cos x. Here f (0) = −1.0000 and f (b) = 0.4597.
First Iteration : The interval [xl , xu ] = [0, 1] and f (xl ) = f (0) = −1.0000 < 0, f (xu ) = f (1) =
0.4597 > 0. |xu − xl | = |1 − 0| = 1. Therefore,
(xl + xu ) (0 + 1)
xm = = = 0.5000
2 2
⇒ f (xm ) = f (0.5000) = −0.3776 < 0.
⇒ f (0.5000) ∗ f (1.0000) < 0
⇒ Root lies between [0.5000, 1.0000].

Second Iteration : The interval [xl , xu ] = [0.5000, 1.0000] and f (xl ) = f (0.5000) = −0.3776 <
0, f (xu ) = f (1.0000) = 0.4597 > 0. |xu − xl | = |1.0000 − 0.5000| = 0.5000. Therefore, Now
(xl + xu ) (0.5000 + 1.0000)
xm = = = 0.7500
2 2
⇒ f (xm ) = f (0.7500) = 0.0183 > 0.
⇒ f (0.5000) ∗ f (0.7500) < 0
⇒ Root lies between [0.5000, 0.7500].
22

Third Iteration : The interval [xl , xu ] = [0.5000, 0.7500] and f (xl ) = f (0.5000) = −0.3776 <
0, f (xu ) = f (0.7500) = 0.0183 > 0. |xu − xl | = |0.7500 − 0.5000| = 0.25 Now,

(xl + xu ) (0.5000 + 0.7500)


xm = = = 0.6250
2 2
⇒ f (xm ) = f (0.6250) = −0.1860 < 0.
⇒ f (0.6250) ∗ f (0.7500) < 0
⇒ Root lies between [0.6250, 0.7500].

Fourth Iteration : The interval [xl , xu ] = [0.6250, 0.7500] and f (xl ) = f (0.6250) = −0.1860 <
0, f (xu ) = f (0.0183) => 0. |xu − xl | = |0.7500 − 0.6250| = 0.1250 Now,

(xl + xu ) (0.6250 + 0.7500)


xm = = = 0.6875
2 2
⇒ f (xm ) = f (0.6875) = −0.0853 < 0.
⇒ f (0.6875) ∗ f (0.7500) < 0
⇒ Root lies between [0.6875, 0.7500].

Fifth Iteration : The interval [xl , xu ] = [0.6875, 0.7500] and f (xl ) = f (0.6875) = −0.0853 <
0, f (xu ) = f (0.7500) = 0.0183 > 0. |xu − xl | = |0.7500 − 0.6875| = 0.0625 Now,

(xl + xu ) (0.6875 + 0.7500)


xm = = = 0.7188
2 2
⇒ f (xm ) = f (0.7188) = −0.0339 < 0.
⇒ f (0.7188) ∗ f (0.7500) < 0
⇒ Root lies between [0.7188, 0.7500].

Sixth Iteration : The interval [xl , xu ] = [0.7188, 0.7500] and f (xl ) = f (0.7188) = −0.0339 <
0, f (xu ) = f (0.7500) = 0.0183 > 0. |xu − xl | = |0.7500 − 0.7188| = 0.0312 Now,

(xl + xu ) (0.7188 + 0.7500)


xm = = = 0.7344
2 2
⇒ f (xm ) = f (0.7344) = −0.0079 > 0.
⇒ f (0.7344) ∗ f (0.7500) < 0
⇒ Root lies between [0.7344, 0.7500].

Seventh Iteration : The interval [xl , xu ] = [0.7344, 0.7500] and f (xl ) = f (0.7344) = −0.0079 <
23

0, f (xu ) = f (0.7500) = 0.0183 > 0. |xu − xl | = |0.7500 − 0.7344| = 0.0156 Now,


(xl + xu ) (0.7344 + 0.7500)
xm = = = 0.7422
2 2
⇒ f (xm ) = f (0.7422) = 0.0052 > 0.
⇒ f (0.7344) ∗ f (0.7422) < 0
⇒ Root lies between [0.7344, 0.7422].

Eighth Iteration : The interval [xl , xu ] = [0.7344, 0.7422] and f (xl ) = f (0.7344) = −0.0079 <
0, f (xu ) = f (0.7422) = 0.0052 > 0. |xu − xl | = |0.7422 − 0.7344| = 0.0078 Now,
(xl + xu ) (0.7344 + 0.7422)
xm = = = 0.7383
2 2
⇒ f (xm ) = f (0.7383) = −0.0013 < 0.
⇒ f (0.7383) ∗ f (0.7422) < 0
⇒ Root lies between [0.7383, 0.7422].

Ninth Iteration : The interval [xl , xu ] = [0.7383, 0.7422] and f (xl ) = f (0.7383) = −0.0013 <
0, f (xu ) = f (0.7422) = 0.0052 > 0. |xu − xl | = |0.7422 − 0.7383| = 0.0039 Now,
(xl + xu ) (0.7383 + 0.7422)
xm = = = 0.7402
2 2
⇒ f (xm ) = f (0.7402) = 0.0019 > 0.
⇒ f (0.7383) ∗ f (0.7422) < 0
⇒ Root lies between [0.7383, 0.7402].

Tenth Iteration : The interval [xl , xu ] = [0.7383, 0.7402] and f (xl ) = f (0.7383) = −0.0013 <
0, f (xu ) = f (0.7402) = 0.0019 > 0. |xu − xl | = |0.7402 − 0.7383| = 0.0020 Now,
(xl + xu ) (0.7383 + 0.7402)
xm = = = 0.7393
2 2

Newton-Raphson Method
The Newton-Raphson method is one of the most powerful and well-known numerical methods for solving
a root-finding problem. Let x0 be an initial approximation of the root to f (x) = 0, whose real root is
α(say). Then α = x0 + h, where h is the small correction to be applied to x0 to give the exact value of
the root. Therefore,
f (α) = 0
⇒ f (x0 + h) = 0
h2
⇒ f (x0 ) + hf ′ (x0 ) + + . . . = 0 (By Taylor series expansion)
2!
24

Iteration xl xu xm f (xl ) f (xu ) f (xm ) |xu − xl |


1 0.0000 1.0000 1.0000 -1.0000 0.4597 -0.3776 1.0000
2 0.5000 1.0000 1.0000 -0.3776 0.4597 0.0183 0.5000
3 0.5000 0.7500 0.7500 -0.3776 0.0183 -0.1860 0.2500
4 0.6250 0.7500 0.7500 -0.1860 0.0183 -0.0853 0.1250
5 0.6875 0.7500 0.7500 -0.0853 0.0183 -0.0339 0.0625
6 0.7188 0.7500 0.7500 -0.0339 0.0183 -0.0079 0.0312
7 0.7344 0.7500 0.7500 -0.0079 0.0183 0.0052 0.0156
8 0.7344 0.7422 0.7422 -0.0079 0.0052 -0.0013 0.0078
9 0.7383 0.7422 0.7422 -0.0013 0.0052 0.0019 0.0039
10 0.7383 0.7402 0.7402 -0.0013 0.0019 0.0003 0.0020

Since h is quite small, the higher powers of h, i.e., h2 , h3 ,etc., can be neglected. Therefore

f (x0 ) + hf ′ (x0 ) ≈ 0
f (x0 )
⇒h=− .
f ′ (x0 )

Substituting this value of h in α = x0 + h, we get a better approximation to the root α of f (x) = 0 as

f (x0 )
x1 = x0 − .
f ′ (x0 )

The successive approximations are

f (x1 )
x2 = x1 −
f ′ (x1 )
f (x3 )
x3 = x3 − ′
f (x3 )
...
f (xn )
xn+1 = xn −
f ′ (xn )

This iterative formula is known as the Newton Raphson method.

Newton Raphson method: Geometrical Significance


The Newton Raphson method is an open interval method that requires only one initial guess. Let the
initial guess at the root be x0 . A tangent line is drawn from the point (x0 , f (x0 )) which intersects the
x-axis at (x1 , 0). The value x = x1 is the new value at iteration i = 1. At i = 2, another tangent is
drawn from (x1 , f (x1 )) which intersects the x-axis at (x2 , 0) to produce an improved value of x = 2.
25

The same step is repeated for i = 3, 4 . . . until the error e = |xi+1 − xi | is smaller then a preset value ǫ.
The final value of x obtained at the last iteration where e < ǫ becomes the final root of the equation. The
computational steps in the Newton-raphson method are summarized as follows. The algorithm requires
calculations of both f (x) and f ′ (x).

Algorithm 1. The algorithm for the Newton-Raphson method is given below


Given f (x) = 0, ǫ and the initial points x0 ;
Given max=maximum number of iterations;
Find f ′ (x);
For i = 0 to max
Compute xi+1 = xi − ff′(x i)
(xi )
;
If |xi+1 − xi | < ǫ
Solution = xi+1 ;
Stop the iterations;
Endif
Endfor

Newton-Raphson method
20

10
f(x)

0 (x2,f(x2)) (x1,f(x1))

-10 (x0,f(x0))

-20
1.5 2.0 2.5 3.0 3.5
x

Figure 3: Working of Newton Raphson method


26

Example 11. Find a real root of the following equation using the Newton-Raphson method for ǫ =
0.0005 using the initial approximation of the root as x0 = 2.

3x − cos x − 1 = 0 (7)

Solution 11. Let f (x) = 3x − cos x − 1. Therefore, f ′ (x) = 3 + sin x. Given x0 = 2.

First Iteration : x0 = 2.00000, f (x0 ) = 5.41615, f ′ (x0 ) = 3.90930 We know from the Newton-
Raphson method that

f (x0 )
x =x0 −
f ′ (x0 )
5.41615
⇒ x =2.00000 −
3.90930
⇒ x =0.61455

Second Iteration : x0 = x = 0.61455, f (x0 ) = 0.02661, f ′ (x0 ) = 3.57659 Therefore,

f (x0 )
x =x0 −
f ′ (x0 )
0.02661
⇒ x =0.61455 −
3.57659
⇒ x =0.60711

Third Iteration : x0 = x = 0.60711, f (x0 ) = 0.00002, f ′ (x0 ) = 3.57049 Therefore,

f (x0 )
x =x0 −
f ′ (x0 )
0.00002
⇒ x =0.60711 −
3.57049
⇒ x =0.60710

From the second and the third iteration, we find that the successive approximations of the root are 0.60711
and 0.60710. Hence the required root of the given equation correct to four decimal places is 0.6071.
The successive approximations of the root as computed above using the Newton-Raphson method are
displayed in the following table:

Example 12. Find a real root of the following equation correct upto five decimal places

ln(x) = cos(x).

1
Solution 12. Here f (x) = ln(x) − cos(x). Therefore, f ′ (x) = x
+ sin(x).
27

Table 8: Numerical results for the above problem

i xi f (xi ) f ′ (xi ) h = − ff′(x i)


(xi )
xi+1 |xi+1 − xi |
1 2.00000 5.41615 3.90930 1.38545 0.61455 1.38545
2 0.61455 0.02661 3.57659 0.00744 0.60711 0.00744
3 0.60711 0.00002 3.57049 0.00001 0.60710 0.00001

First Iteration : x0 = 2.0, f (x0 ) = −2.00000, f ′ (x0 ) = 12.00000 We know from the Newton-
Raphson method that
f (x0 )
x =x0 −
f ′ (x0 )
−2.00000
⇒ x =2.00000 −
12.00000
⇒ x =2.16667

Second Iteration : x0 = x = 2.16667, f (x0 ) = 0.17130, f ′ (x0 ) = 14.08333 Therefore,


f (x0 )
x =x0 −
f ′ (x0 )
0.17130
⇒ x =2.16667 −
14.08333
⇒ x =2.15450

Third Iteration : x0 = x = 2.15450, f (x0 ) = 0.00096, f ′ (x0 ) = 13.92566 Therefore,


f (x0 )
x =x0 −
f ′ (x0 )
0.00096
⇒ x =2.15450 −
13.92566
⇒ x =2.15443

Fourth Iteration : x0 = x = 2.15443, f (x0 ) = 0.00000, f ′ (x0 ) = 13.92477 Therefore,


f (x0 )
x =x0 −
f ′ (x0 )
0.00000
⇒ x =2.15443 −
13.92477
⇒ x =2.15443

From the third and the fourth iteration, we find that the successive approximations of the root are 2.15443
and 2.15443. Hence the required root of the given equation correct to four decimal places is 2.1544.
28

The successive approximations of the root as computed above using the Newton-Raphson method are
displayed in the following table:

Example 13. Find the cubic root of 10, i.e., 3 10 correct to four decimal places.

Solution 13. Let x = 3 10. Then x3 − 10 = 0. Let f (x) = x3 − 10 ⇒ f ′ (x) = 3x2 .

First Iteration : x0 = 2.0, f (x0 ) = −2.00000, f ′ (x0 ) = 12.00000 We know from the Newton-
Raphson method that
f (x0 )
x =x0 −
f ′ (x0 )
−2.00000
⇒ x =2.00000 −
12.00000
⇒ x =2.16667

Second Iteration : x0 = x = 2.16667, f (x0 ) = 0.17130, f ′ (x0 ) = 14.08333 Therefore,

f (x0 )
x =x0 −
f ′ (x0 )
0.17130
⇒ x =2.16667 −
14.08333
⇒ x =2.15450

Third Iteration : x0 = x = 2.15450, f (x0 ) = 0.00096, f ′ (x0 ) = 13.92566 Therefore,

f (x0 )
x =x0 −
f ′ (x0 )
0.00096
⇒ x =2.15450 −
13.92566
⇒ x =2.15443

Fourth Iteration : x0 = x = 2.15443, f (x0 ) = 0.00000, f ′ (x0 ) = 13.92477 Therefore,

f (x0 )
x =x0 −
f ′ (x0 )
0.00000
⇒ x =2.15443 −
13.92477
⇒ x =2.15443

From the third and the fourth iteration, we find that the successive approximations of the root are 2.15443
and 2.15443. Hence the required root of the given equation correct to four decimal places is 2.1544.
The successive approximations of the root as computed above using the Newton-Raphson method are
displayed in the following table:
29

Table 9: Numerical results for the above problem

i xi f (xi ) f ′ (xi ) h = − ff′(x i)


(xi )
xi+1 |xi+1 − xi |
1 2.00000 -2.00000 12.00000 -0.16667 2.16667 0.16667
2 2.16667 0.17130 14.08333 0.01216 2.15450 0.01216
3 2.15450 0.00096 13.92566 0.00007 2.15443 0.00007
4 2.15443 0.00000 13.92477 0.000000 2.15443 0.00000

Thus x = 2.15443 is a root of f (x) = 0 correct upto five decimal places.

Example 14. Find a real root of the following equation correct to three decimal places using the Newton-
Rephson method taking the initial approximation to the root as x0 = 2:

x3 − 2x − 5 = 0.

Solution 14. Given f (x) = x3 − 2.0x − 5, x0 = 2. Therefore, f ′ (x) = 3x2 − 2.0.

First Iteration : x0 = 2.0, f (x0 ) = x30 − 2.0x0 − 5 = 8 − 4 − 5 = −1, f ′ (x0 ) = 3x20 − 2 = 10


We know from the Newton-Raphson method that
f (x0 )
x =x0 −
f ′ (x0 )
−1
⇒ x =2 −
10
⇒ x =2.10000

Second Iteration : x0 = x = 2.10000, f (x0 ) = x30 − 2.0x0 − 5 = 0.06100, f ′ (x0 ) = 3x20 − 2 =


11.23000 Therefore,
f (x0 )
x =x0 −
f ′ (x0 )
0.06100
⇒ x =2.10000 −
11.23000
⇒ x =2.09457

Third Iteration : x0 = x = 2.09457, f (x0 ) = x30 − 2x0 − 5 = 0.00019, f ′ (x0 ) = 3x20 − 2 =


11.16165 Therefore,
f (x0 )
x =x0 −
f ′ (x0 )
0.00019
⇒ x =2.09457 −
11.16165
⇒ x =2.09455
30

From the second and the third iteration, we find that the successive approximations of the root are 2.09457
and 2.09455. Hence the required root of the given equation correct to three decimal places is 2.094.
The successive approximations of the root as computed above using the Newton-Raphson method are
displayed in the following table:

Table 10: Numerical results for the above problem

i xi f (xi ) f ′ (xi ) h = − ff′(x i)


(xi )
xi+1 |xi+1 − xi |
1 2.00000 -1.00000 10.00000 -0.10000 2.10000 0.10000
2 2.10000 0.06100 11.23000 0.00543 2.09457 0.00543
3 2.09457 0.00019 11.16165 0.00002 2.09455 0.00002

Example 15. Find a real root of the following equation correct to three decimal places using the Newton-
Rephson method taking the initial approximation to the root as x0 = 2:

xx + 2x − 6 = 0.

Solution 15. Given f (x) = xx + 2x − 6, x0 = 2. Therefore, f ′ (x) = xx (1 + ln x) + 2.


First Iteration : x0 = 2.0, f (x0 ) = 2.00000, f ′ (x0 ) = 8.77259. We know from the Newton-
Raphson method that
f (x0 )
x =x0 −
f ′ (x0 )
2.00000
⇒ x =2.00000 −
8.77259
⇒ x =1.77202

Second Iteration : x0 = x = 2.10000, f (x0 ) = 0.30010, f ′ (x0 ) = 6.33286. Therefore,


f (x0 )
x =x0 −
f ′ (x0 )
0.30010
⇒ x =1.77202 −
6.33286
⇒ x =1.72463

Third Iteration : x0 = x = 1.72463, f (x0 ) = 0.00910, f ′ (x0 ) = 5.95498. Therefore,


f (x0 )
x =x0 −
f ′ (x0 )
0.00910
⇒ x =1.72463 −
5.95498
⇒ x =1.72310
31

Fourth Iteration : x0 = x = 1.72310, f (x0 ) = 0.00001, f ′ (x0 ) = 5.94340. Therefore,


f (x0 )
x =x0 −
f ′ (x0 )
0.00001
⇒ x =1.72310 −
5.94340
⇒ x =1.72310

From the third and the fourth iteration, we find that the successive approximations of the root are 1.72310
and 1.72310. Hence the required root of the given equation correct to three decimal places is 1.723.
The successive approximations of the root as computed above using the Newton-Raphson method are
displayed in the following table:

Table 11: Numerical results for the above problem

i xi f (xi ) f ′ (xi ) h = − ff′(x i)


(xi )
xi+1 |xi+1 − xi |
1 2.00000 2.00000 8.77259 0.22798 1.77202 0.22798
2 1.77202 0.30010 6.33286 0.04739 1.72463 0.04739
3 1.72463 0.00910 5.95498 0.00153 1.72310 0.00153
4 1.72310 0.00001 5.94340 0.00000 1.72310 0.00000

Secant Method
One of the important difficulties with the Newton Raphson method is that it requires the computation of
the derivative of f (x) at the iterated points. This requirement causes hardship to the computer by causing
computational cost in solving the problem. The secant method helps eliminating the calculation of the
derivative by replacing it with a secant line. The term “secant” denotes a straight line that intersects a
curve in two or more parts.
In secant method, two initial guesses say, x1 and x2 are provided, where f (x1 ) 6= f (x2 ). These two
points can be any points which are reliably close to the solution and they do not necessarily have to be on
the opposite sides of the x-axis. A good choice for the two initial points x1 and x2 will be f (x1 f (x2 ) < 0
abiding by the mean value theorem. The first iteration with i = 1 produces an approximation at x = x2
which is the x-intercept of the chord that passes through the points (x1 , f (x1 )) and (x2 , f (x2 )). The next
approximated value x = x3 is obtained from the x-intercept of the chord that passes through the points
(x2 , f (x2 )) and (x3 , f (x3 )). The same step is repeated until the convergence to the solution is obtained
through the stopping criteria e = |xi+1 − xi | < ǫ. The secant method is derived as follows: The gradient
of the line from (x1 , f (x1 )) to (x3 , 0) is
f (x1 − 0)
m1 = .
x1 − x3
32

which is equal to the the gradient of the line from (x2 , f (x2 ) to (x3 , 0) given by

f (x1 − 0)
m2 =
x1 − x3
f (x2 ) − 0
⇒ m2 = .
x2 − x3
Therefore,

f (x1 )(x2 − x3 ) = f (x2 )(x1 − x3 )


x1 f (x2 ) − x2 ∗ f (x1 )
⇒ x3 = .
f (x2 ) − f (x1 )

Replacing x1 with xi , x2 with xi+1 and x3 with xi+2 the iterative formula for the secant method can be
written as:
xi f (xi+1 ) − xi+1 f (xi )
xi+2 = .
f (xi+1 ) − f (xi )
Algorithm 1. The algorithm for the secant method is given below
Given f (x) = 0, ǫ and the initial points [x1 , x2 ];
Given max=maximum number of iterations;
For i = 0 to max
Compute xi+2 = xi f f(x(xi+1 )−xi+1 f (xi )
i+1 )−f (xi )
;
If |xi+2 − xi+1 | < ǫ
Solution = xi+2 ;
Stop the iterations;
Endif
Endfor

Example 16. Find the root of the following equation using the secant method with the initial values
x1 = 1 and x2 and accuracy ǫ = 0.0005.

x3 − x2 − 2 = 0.

Solution 16. Let f (x) = x3 − x2 − 2. Given x1 = 1 and x2 = 2.

First Iteration : x1 = 1, x2 = 2. Therefore, f (x1 ) = −2.000000, f (x2 ) = 2.000000. We know


from the secant method that
x1 f (x2 ) − x2 ∗ f (x1 )
x3 =
f (x2 ) − f (x1 )
1.000000 ∗ 2.000000 − 2.000000 ∗ (−2.000000)
⇒ x3 =
2.000000 − (−2.000000)
⇒ x3 =1.500000.
33

Second Iteration : x1 = x2 = 2.000000, x2 = x3 = 1.500000. Therefore, f (x1 ) = 2.000000,


f (x2 ) = −0.875000. Therefore,

x1 f (x2 ) − x2 ∗ f (x1 )
x3 =
f (x2 ) − f (x1 )
2.000000 ∗ 2.000000 − 1.500000 ∗ (−0.875000)
⇒ x3 =
−0.875000 − (2.000000)
⇒ x3 =1.652174.

Third Iteration : x1 = x2 = 1.500000, x2 = x3 = 1.652174. Therefore, f (x1 ) = −0.875000,


f (x2 ) = −0.219775. Therefore,

x1 f (x2 ) − x2 ∗ f (x1 )
x3 =
f (x2 ) − f (x1 )
1.500000 ∗ (−0.219775) − 1.652174 ∗ (−0.875000)
⇒x=
−0.219775 − (−0.875000)
⇒ x3 =1.703216.

Fourth Iteration : x1 = x2 = 1.652174, x2 = x3 = 1.703216. Therefore, f (x1 ) = −0.219775,


f (x2 ) = 0.039990. Therefore,

x1 f (x2 ) − x2 ∗ f (x1 )
x3 =
f (x2 ) − f (x1 )
1.652174 ∗ (0.039990) − 1.703216 ∗ (−0.219775)
⇒x=
0.039990 − (−0.219775)
⇒ x3 =1.695358

Fifth Iteration : x1 = x2 = 1.703216, x2 = x3 = 1.695358. Therefore, f (x1 ) = 0.039990,


f (x2 ) = −0.001375. Therefore,

x1 f (x2 ) − x2 ∗ f (x1 )
x3 =
f (x2 ) − f (x1 )
1.703216 ∗ (−0.001375) − 1.695358 ∗ (0.039990)
⇒x=
−0.001375 − (0.039990)
⇒ x3 =1.695619

From the fourth and the fifth iteration, we find that the successive approximations of the root are 1.695358
and 1.695619. Hence the required root of the given equation correct to three decimal places is 1.695.
The successive approximations of the root as computed above using the Newton-Raphson method are
displayed in the following table:
34

Table 12: Numerical results for the above problem

i xi xi+1 xi+2 f (xi ) f (xi+1 ) f (xi+2 ) |xi+2 − xi+1 |


1 1.000000 2.000000 1.500000 -2.000000 2.000000 -0.875000 0.500000
2 2.000000 1.500000 1.652174 2.000000 -0.875000 -0.219775 0.152174
3 1.500000 1.652174 1.703216 -0.875000 -0.219775 0.039990 0.051042
4 1.652174 1.703216 1.695358 -0.219775 0.039990 -0.001375 0.007858
5 1.703216 1.695358 1.695619 0.039990 -0.001375 -0.000008 0.000261

Secant method
3
f(xu)
2

1
xl xm
f(x)

0 xu

-1 f(xm)

-2
f(xl)
-3
0.8 1.0 1.2 1.4 1.6 1.8 2.0 2.2
x

Figure 4: Root finding using the secant method.

Example 17. Compute the root of the following equation in the interval [0, 2] using the secant method
correct upto three decimal places:
x
x2 e− 2 − 1 = 0.
x
Solution 17. Let f (x) = x2 e− 2 − 1. Given x1 = 0 and x2 = 2.

First Iteration : x1 = 0, x2 = 2. Therefore, f (x1 ) = −1.000000, f (x2 ) = 0.471518. We know


35

from the secant method that


x1 f (x2 ) − x2 ∗ f (x1 )
x3 =
f (x2 ) − f (x1 )
0.000000 ∗ 0.471518 − 2.000000 ∗ (−1.000000)
⇒ x3 =
0.471518 − (−1.000000)
⇒ x3 =1.359141.

Second Iteration : x1 = x2 = 2.000000, x2 = x3 = 1.359141. Therefore, f (x1 ) = 0.471518,


f (x2 ) = −0.063743. Therefore,
x1 f (x2 ) − x2 ∗ f (x1 )
x3 =
f (x2 ) − f (x1 )
2.000000 ∗ (−0.063743) − 1.359141 ∗ (0.471518)
⇒ x3 =
(−0.063743) − (0.471518)
⇒ x3 =1.435459.

Third Iteration : x1 = x2 = 1.359141, x2 = x3 = 1.435459. Therefore, f (x1 ) = −0.063743,


f (x2 ) = 0.005254. Therefore,
x1 f (x2 ) − x2 ∗ f (x1 )
x3 =
f (x2 ) − f (x1 )
1.359141 ∗ (0.005254) − 1.435459 ∗ (−0.063743)
⇒x=
0.005254 − (−0.063743)
⇒ x3 =1.429648.

Fourth Iteration : x1 = x2 = 1.435459, x2 = x3 = 1.429648. Therefore, f (x1 ) = 0.005254,


f (x2 ) = 0.000032. Therefore,
x1 f (x2 ) − x2 ∗ f (x1 )
x3 =
f (x2 ) − f (x1 )
1.435459 ∗ (0.000032) − 1.429648 ∗ (0.005254)
⇒x=
0.000032 − (0.005254)
⇒ x3 =1.429612

From the third and the fourth iteration, we find that the successive approximations of the root are 1.429648
and 1.429612. Hence the required root of the given equation correct to three decimal places is 1.430 (after
rounding off). The successive approximations of the root as computed above using the secant method are
displayed in the following table:

Example 18. Compute the root of the following equation in the interval [2, 3] using the secant method
correct upto three decimal places:
x3 − 2x − 5 = 0.
36

Table 13: Numerical results for the above problem

i xi xi+1 xi+2 f (xi ) f (xi+1 ) f (xi+2 ) |xi+2 − xi+1 |


1 0.000000 2.000000 1.359141 -1.000000 0.471518 -0.063743 0.640859
2 2.000000 1.359141 1.435459 0.471518 -0.063743 0.005254 0.076318
3 1.359141 1.435459 1.429648 -0.063743 0.005254 0.000032 0.00581 1
4 1.435459 1.429648 1.429612 0.005254 0.000032 -0.000000 0.000036

Solution 18. Let f (x) = x3 − 2x − 5. Given x1 = 2 and x2 = 3.

First Iteration : x1 = 2, x2 = 3. Therefore, f (x1 ) = −1.000000, f (x2 ) = 16.000000. We know


from the secant method that
x1 f (x2 ) − x2 ∗ f (x1 )
x3 =
f (x2 ) − f (x1 )
2.000000 ∗ 16.000000 − 3.000000 ∗ (−1.000000)
⇒ x3 =
16.000000 − (−1.000000)
⇒ x3 =2.058824.

Second Iteration : x1 = x2 = 3.000000, x2 = x3 = 2.058824. Therefore, f (x1 ) = 16.000000,


f (x2 ) = −0.390800. Therefore,

x1 f (x2 ) − x2 ∗ f (x1 )
x3 =
f (x2 ) − f (x1 )
3.000000 ∗ (−0.390800) − 2.058824 ∗ (16.000000)
⇒ x3 =
(−0.390800) − (16.000000)
⇒ x3 =2.081264.

Third Iteration : x1 = x2 = 2.058824, x2 = x3 = 2.081264. Therefore, f (x1 ) = −0.390800,


f (x2 ) = −0.147204. Therefore,

x1 f (x2 ) − x2 ∗ f (x1 )
x3 =
f (x2 ) − f (x1 )
2.058824 ∗ (−0.147204) − 2.081264 ∗ (−0.390800)
⇒x=
−0.147204 − (−0.390800)
⇒ x3 =2.094824.

Fourth Iteration : x1 = x2 = 2.081264, x2 = x3 = 2.094824. Therefore, f (x1 ) = −0.147204,


37

f (x2 ) = 0.003044. Therefore,

x1 f (x2 ) − x2 ∗ f (x1 )
x3 =
f (x2 ) − f (x1 )
2.081264 ∗ (0.003044) − 2.094824 ∗ (−0.147204)
⇒x=
0.003044 − (−0.147204)
⇒ x3 =2.094549

From the third and the fourth iteration, we find that the successive approximations of the root are 2.094824
and 2.094549. Hence the required root of the given equation correct to three decimal places is 2.094. The
successive approximations of the root as computed above using the secant method are displayed in the
following table:

Table 14: Numerical results for the above problem

i xi xi+1 xi+2 f (xi ) f (xi+1 ) f (xi+2 ) |xi+2 − xi+1 |


1 2.000000 3.000000 2.058824 -1.000000 16.000000 -0.390800 0.941176
2 3.000000 2.058824 2.081264 16.000000 -0.390800 -0.147204 0.022440
3 2.058824 2.081264 2.094824 -0.390800 -0.147204 0.003044 0.013560
4 2.081264 2.094824 2.094549 -0.147204 0.003044 -0.000023 0.000275

Example 19. Compute the root of the following equation in the interval [1, 2] using the secant method
correct upto three decimal places:
x4 − x − 10 = 0.

Solution 19. Let f (x) = x4 − x − 10. Given x1 = 1 and x2 = 2.

First Iteration : x1 = 1, x2 = 2. Therefore, f (x1 ) = −10.000000, f (x2 ) = 4.000000. We know


from the secant method that
x1 f (x2 ) − x2 ∗ f (x1 )
x3 =
f (x2 ) − f (x1 )
1.000000 ∗ (4.000000) − 2.000000 ∗ (−10.000000)
⇒ x3 =
4.000000 − (−1.000000)
⇒ x3 =1.714286.

Second Iteration : x1 = x2 = 2.000000, x2 = x3 = 1.714286. Therefore, f (x1 ) = 4.000000,


38

f (x2 ) = −3.077884. Therefore,

x1 f (x2 ) − x2 ∗ f (x1 )
x3 =
f (x2 ) − f (x1 )
2.000000 ∗ (−3.077884) − 1.714286 ∗ (4.000000)
⇒ x3 =
(−3.077884) − (4.000000)
⇒ x3 =1.838531.

Third Iteration : x1 = x2 = 1.714286, x2 = x3 = 1.838531. Therefore, f (x1 ) = −3.077884,


f (x2 ) = −0.412799. Therefore,

x1 f (x2 ) − x2 ∗ f (x1 )
x3 =
f (x2 ) − f (x1 )
1.714286 ∗ (−0.412799) − 1.838531 ∗ (−3.077884)
⇒x=
−0.412799 − (−3.077884)
⇒ x3 =1.857776.

Fourth Iteration : x1 = x2 = 1.838531, x2 = x3 = 1.857776. Therefore, f (x1 ) = −0.412799,


f (x2 ) = 0.053909. Therefore,

x1 f (x2 ) − x2 ∗ f (x1 )
x3 =
f (x2 ) − f (x1 )
1.838531 ∗ (0.053909) − 1.857776 ∗ (−0.412799)
⇒x=
0.053909 − (−0.412799)
⇒ x3 =1.855553

Fifth Iteration : x1 = x2 = 1.857776, x2 = x3 = 1.855553. Therefore, f (x1 ) = 0.053909,


f (x2 ) = −0.000778. Therefore,

x1 f (x2 ) − x2 ∗ f (x1 )
x3 =
f (x2 ) − f (x1 )
1.857776 ∗ (−0.000778) − 1.855553 ∗ (0.053909)
⇒x=
−0.000778 − (0.053909)
⇒ x3 =1.855584

From the fourth and the fifth iteration, we find that the successive approximations of the root are 1.855553
and 1.855584. Hence the required root of the given equation correct to three decimal places is 1.855. The
successive approximations of the root as computed above using the secant method are displayed in the
following table:
39

Table 15: Numerical results for the above problem

i xi xi+1 xi+2 f (xi ) f (xi+1 ) f (xi+2 ) |xi+2 − xi+1 |


1 1.000000 2.000000 1.714286 -10.000000 4.000000 -3.077884 0.285714
2 2.000000 1.714286 1.838531 4.000000 -3.077884 -0.412799 0.124246
3 1.714286 1.838531 1.857776 -3.077884 -0.412799 0.053909 0.019245
4 1.838531 1.857776 1.855553 -0.412799 0.053909 -0.000778 0.002223
5 1.857776 1.855553 1.855584 0.053909 -0.000778 -0.000001 0.000032

Order of convergence of bisection method:


In the bisection method, the root is searched by bisecting the original interval in each iteration. The
midpoints of the successive intervals are taken to be the approximations of the root and hence one half
the current interval is the upper bound to the error. Let ǫn and ǫn+1 denote the absolute errors in the nth
and (n + 1)th iterations, respectively, then we have from the bisection method

ǫn+1 =0.5ǫn

Comparing with ǫn+1 = kǫpn , we have k = 0.5 and p = 1. p = 1 indicates that the bisection method is
linearly convergent.

Order (or Rate) of convergence of Newton-raphson method:


Let α be the actual root of the equation f (x) = 0, i.e., f (α) = 0. Let xn and xn+1 be two successive
approximations to the actual root α. Let ǫn and ǫn+1 be the corresponding errors. Then we have xn =
40

α + ǫn and xn+1 = α + ǫn+1 . From Newton-Raphson’s method, we have


f (xn )
xn+1 =xn −
f ′ (xn )
f (α + ǫn )
⇒ α + ǫn+1 =α + ǫn − ′
f (α + ǫn )
ǫ2n ′′
f (α) + ǫn f ′ (α) + 2!
f (α) + . . .
⇒ ǫn+1 =ǫn − 2
ǫn ′′′
(By Taylor series expansion)
f ′ (α) + ǫn f ′′ (α) + 2!
f (α) + . . .
ǫ2n ′′
ǫn f ′ (α) + 2!
f (α) + . . .
⇒ ǫn+1 =ǫn − 2 (Since f (α) = 0)
ǫn f ′′ (α) + ǫ2!n f ′′′ (α) +
f ′ (α) + ...
ǫ2n f ′′ (α)
⇒ ǫn+1 = (Neglecting higher powers of ǫn )
2 [f ′ (α) + ǫn f ′′ (α)]
ǫ2 f ′′ (α)
⇒ ǫn+1 = n h i
2 f ′ (α) 1 + ǫ f ′′ (α)
n f ′ (α)
−1
ǫ2n f ′′ (α) f ′′ (α)

⇒ ǫn+1 = 1 + ǫn ′
2 f ′ (α) f (α)
2 ′′
f ′′ (α)
 
ǫn f (α)
⇒ ǫn+1 = 1 − ǫn ′ + ...
2 f ′ (α) f (α)

2
ǫ2n f ′′ (α) ǫ3n f ′′ (α)

⇒ ǫn+1 = − + ...
2 f ′(α) 2 f ′ (α)
2
1 f ′′ (α) ǫn f ′′ (α)

ǫn+1
⇒ = ′ −
ǫ2n 2 f (α) 2 f ′(α)
ǫn+1 1 f ′′ (α)
⇒ 2 ≈ ′ Neglecting terms containing powers of ǫn
ǫn 2 f (α)
ǫn+1
⇒ 2 ≈k,
ǫn
1 f ′′ (α)
where k = 2 f ′ (α)
is the asymptotic error constant. Therefore,

ǫn+1 = kǫ2n

Comparing with

ǫn+1 = kǫpn ,

we have p = 2 which indicates that the order of convergence of Newton-Raphson method is 2, i.e.,
Newton-Raphson method is quadratic convergent. This means that the successive error at each step is
proportional to the square of the previous error indicating that the number of correct decimal places
almost doubles after every iteration. However, the Newton-Raphson method suffers from certain draw-
backs:
41

• It cannot handle repeated roots

• The solution diverges near a point of infection

• The solution may oscillate near local minima or maxima

• With non-zero slope, the solution may diverge or reach a diffferent root.

Order of convergence of Fixed point method


Let α be the actual root of the equation f (x) = 0, i.e., f (α) = 0. Since f (x) = x − φ(x) = 0 therefore

f (α) =0
⇒ α =φ(α)

Let xn−1 and xn be the two successive approxiations to the actual root α. The absolute error at step (n)
is given by

ǫn = |xn − α| .

Also, we have

xn =φ(xn−1 ) (8)
xn − α =φ(xn−1 ) − φ(α)

Applying MVT to φ(x) in [xn−1 , α], we have


φ(xn−1 ) − φ(α)
=φ′ (c), where xn−1 < c < α
xn−1 − α
⇒ φ(xn−1 ) − φ(α) =(xn−1 − α)φ′(c)

Therefore, Eq. (8) becomes

xn − α =(xn−1 − α)φ′ (c)

But |φ′ (xn )| ≤ k < 1, ∀n. So

|xn − α| ≤k |xn−1 − α|
⇒ ǫn ≤ kǫn−1
⇒ ǫn+1 ≤ kǫn

Comparing with
ǫn+1 ≤ kǫpn ,
we have p = 1 which indicates that the fixed point iteration is linearly convergent.
42

Order of convergence of secant method


Let α be the actual root of f (x) = 0. Let xn−1 , xn and xn+1 be the successive approximations to the root
in the (n − 1)th , nth and (n + 1)th iterations, respectively. Let ǫn−1 , ǫn and ǫn+1 be the corresponding
absolute errors.Then, we have xn−1 = α + ǫn−1 , xn = α + ǫn and xn+1 = α + ǫn+1 . From the secant
method, we have
xn − xn−1
xn+1 =xn − f (xn )
f (xn ) − f (xn−1 )
α + ǫn − α − ǫn−1
⇒ α + ǫn+1 =α + ǫn − f (α + ǫn )
f (α + ǫn ) − f (α + ǫn−1 )
f (α + ǫn )(ǫn − ǫn−1 )
⇒ ǫn+1 =ǫn −
f (α + ǫn ) − f (α + ǫn−1 )
n o
′ ǫ2n ′′
f (α) + ǫn f (α) + 2! f (α) + . . . (ǫn − ǫn−1 )
⇒ ǫn+1 =ǫn − n 2
o n
ǫ2
o
f (α) + ǫn f ′ (α) + ǫ2!n f ′′ (α) + . . . − f (α) + ǫn−1 f ′ (α) + n−1 2!
f ′′ (α) + . . .
n 2
o
f (α) + ǫn f ′ (α) + ǫ2!n f ′′ (α) + . . . (ǫn − ǫn−1 )
⇒ ǫn+1 =ǫn − n (e2n −e2n−1 ) ′′
o (Expanding by Taylor series expansion)
(ǫn − ǫn−1 )f (α) +′ f (α) + . . .
2!
n 2
o
ǫn f ′ (α) + ǫ2!n f ′′ (α) + . . . (ǫn − ǫn−1 )
⇒ ǫn+1 =ǫn − n (e2 −e2 )
o (∵ f (α) = 0)
(ǫn − ǫn−1 )f ′ (α) + n 2!n−1 f ′′ (α) + . . .
n o
ǫ2n f ′′ (α)
ǫn + 2! f ′ (α)
+ . . . (ǫn − ǫn−1 )
⇒ ǫn+1 =ǫn − n (e2n −e2n−1 ) f ′′ (α)
o
(ǫn − ǫn−1 ) + 2! f ′ (α)
+ ...
n 2 ′′ (α)
o
ǫn + ǫ2!n ff ′ (α) + ...
⇒ ǫn+1 =ǫn − n o
(en +en−1 ) f ′′ (α)
1+ 2!
+ ...
f ′ (α)
−1
ǫ2n f ′′ (α) (en + en−1 ) f ′′ (α)
 
⇒ ǫn+1 =ǫn − ǫn + + ... 1+ + ...
2! f ′(α) 2! f ′ (α)

ǫ2n f ′′ (α) (ǫn + ǫn−1 ) f ′′ (α)


  
⇒ ǫn+1 =ǫn − ǫn + + ... 1− + . . . (Expanding by Binomial expansion)
2! f ′(α) 2! f ′(α)
(ǫn + ǫn−1 ) f ′′ (α) ǫ2n f ′′ (α) ǫ2n f ′′ (α) (ǫn + ǫn−1 ) f ′′ (α)
 
⇒ ǫn+1 =ǫn − ǫn − ǫn + − + ...
2! f ′ (α) 2! f ′ (α) 2! f ′(α) 2! f ′ (α)
(ǫn + ǫn−1 ) f ′′ (α) ǫ2n f ′′ (α) ǫ2n f ′′ (α) (ǫn + ǫn−1 ) f ′′ (α)
 
⇒ ǫn+1 = ǫn − + − ...
2! f ′ (α) 2! f ′ (α) 2! f ′ (α) 2! f ′(α)
✚✚ ǫn ǫn−1 f ′′ (α) ✚✚
2 2
ǫ2n f ′′ (α) ǫ2n f ′′ (α) ǫ3n f ′′ (α) ǫ2n ǫn−1 f ′′ (α)
 
⇒ ǫn+1 = ✚ + − ✚ + + + ...
2! ✚f ′ (α) 2! f ′ (α) 2! ✚f ′ (α) 2!2! f ′ (α) 2!2! f ′ (α)
✚ ✚
ǫn ǫn−1 f ′′ (α)
⇒ ǫn+1 ≈ (Neglecting the terms of ǫ higher than 2)
2! f ′(α)
43

In order to determine the order of convergence, let us now suppose an asymptotic relation of the form

ǫn+1 =kǫpn
ǫn ǫn−1 f ′′ (α)
⇒ =kǫpn (9)
2! f ′(α)
This relation also requires

ǫn =kǫpn−1
1/p
⇒ ǫn−1 = k −1 ǫn

Therefore, Eq, (9) becomes


ǫn (k −1 ǫn )1/p f ′′ (α)
=kǫpn
2! f ′(α)
1 f ′′ (α) −1/p 1+1/p
⇒ k ǫn =kǫpn
2 f ′(α)
⇒ Ak −1/p−1 =ǫp−1−1/p
n

⇒ A−1 k 1+1/p =ǫ1−p+1/p


n ,
′′
where A = 12 ff ′ (α)
(α)
is a constant. SInce the left hand side is a product of constants, the right hand side
must also be a constant as n → ∞. In order to have this happened, we must have

0 =1 − p + 1/p
⇒ p2 − p − 1 =0

1± 5
⇒p=
2√ √
1+ 5 1− 5
⇒ p1 = , p2 =
2 2
⇒ p1 =1.618, p2 = −0.618

Since we must have p ≥ 1, the rate of convergence is 1.618. Thus we find that the rate of covergence

of secant method is superlinear (1 < p < 2). The ratio 1+2 5 is called the golden ratio. The rate of
convergence of the secant method is more than the bisection method but less than the Newton-Raphson
method. The secant method involves one function evaluation per iteration, whereas the Newton-Raphson
method requires two function evaluations f (x) and its derivative f ′ (x). For this reason, the secant method
is often faster in time despite more oiterations are required as compared to the Newton-Raphson method
to attain a similar accuracy. However, there exist certain disadvantages of secant method as well. Since
the secant method does not require the root remain bracketed, it may not always converge. The method
is likely to have difficulty of f ′ (α) = 0, i.e., the x-axis is tangent to the graph of y = f (x) at x = α. The
secant method cannot be used in the generalisation of new methods for solving simultaneous system of
equations, whereas the Newton-Raphson method can be easily used for such purpose.
44

Method of False Position or Regula-Falsi method


The approximations to the root finding in the case of the method of False position (also called Regula
Falsi) are generated in the same manner as the Secant method, but a test is included to ensure that the
root is always bracketed between successive approximations. The method starts with the end points x0
and x1 in the interval [x0 , x1 ] where f (x0 )f (x1 ) < 0. A secant line is drawn connecting x0 and x1 . The
secant line intersects the x-axis at x2 which is closer to the true root than either of x0 and x1 . The point x2
divides the intial interval into two subintervals [x0 , x2 ] and [x2 , x1 ], only one of which contains the root.
If f (x0 )f (x2 ) < 0, then the interval [x0 , x2 ] contains the root, else the root is contained in the interval
[x2 , x1 ]. The slope of the secant line joining the points (x0 , f (x0 )) and (x2 , 0) is given by
0 − f (x0 )
m1 =
x2 − x0
On the other hand, the slope of the secant line joining the points (x2 , 0) and (x1 , f (x1 )) is given by
f (x1 ) − 0
m2 =
x1 − x2
Since the two lines arecolinear, we have

m1 =m2
0 − f (x0 ) f (x1 ) − 0
⇒ =
x2 − x0 x1 − x2
x0 f (x1 ) − x1 f (x0 )
⇒ x2 = .
f (x1 ) − f (x0 )
The illustration of Regula Falsi method is depicted in Fig.(). Let [x0 , x1 ] be the interval containing the
root, where f (x0 )f (x1 ) < 0. A secant line is drawn from (x0 , f (x0 )) to (x1 , f (x1 )). The line intersects
the x-axis at (x2 , 0). The interval [x0 , x1 ] is now subdivided into [x0 , x2 ] and [x2 , x1 ]. If f (x0 )f (x2 ) < 0,
the root lies in the interval [x0 , x2 ]. In this case, an update is performed with x1 = x2 . On the other
hand, if f (x0 )f (x2 ) > 0, the root lies within [x2 , x1 ]. In this case, an update is performed with x0 = x2 .
These two steps are repeated until we get a convergent solution of the root is obtained. The criteria of
convergence may be be obtained in either of the following two ways or both:

(a) |xnew − xold | < Tol(x)

(b) f (xnew ) < Tol(f(x)).

One of the important disadvantages of the Regula Falsi method is that if the root lies initially in the
interval [x0 , x1 ], then one of the end points is fixed for all iterations and the other end point moves
towards the required root. The shifting of only one end point while the other remaining fixed causes slow
convergence and hence many iterartions are required to reach a solution within tolerable error. However,
the method guarantees the convergence of the solution as the subsequent estimates of the root moves
closer and closer to the actual root.
45

Table 16: This table shows how to select the bracketing interval [a, b] so as to include the root of the
equation 3x − cos x − 1 = 0. It can be seen that the root lies in the interval [0, 1] as f (x) changes sign
within this interval.
x f (x) = 3x − cos x − 1 sign[f (x)]
0 −2.00000 <0
1 1.45970 >0

Example 20. Find a real root of the equation 3x − cos x − 1 = 0 using Regula Falsi method correct to
three decimal places.

Solution 20. Let f (x) = 3x − cos x − 1. Let us take x0 = 0 and x1 = 1.

First Iteration :
x0 f (x1 ) − x1 f (x0 )
x2 =
f (x1 ) − f (x0 )
0 ∗ 1.45970 − 1 ∗ (−2.00000)
⇒ x2 =
1.45970 − (−2.00000)
⇒ x2 =0.57809.

Now

f (x2) = − 0.10325 < 0


⇒ f (x2) × f (x1) = < 0
⇒ The root lies between [x2 , x1] = [0.57809, 1.00000]

Now, we take x0 = x2 = 0.57809 and x1 = 1.00000. Also, f (x0 ) = −0.10325, f (x1 ) = 1.45970.

Second Iteration :
x0 f (x1 ) − x1 f (x0 )
x2 =
f (x1 ) − f (x0 )
0.57809 ∗ 1.45970 − 1.00000 ∗ (−0.10325)
⇒ x2 =
1.45970 − (−0.10325)
⇒ x2 =0.60596.

Now

f (x2) = − 0.00408 < 0


⇒ f (x2) × f (x1) = < 0
⇒ The root lies between [x2 , x1 ] = [0.60596, 1.00000]

Now, we take x0 = x2 = 0.60596 and x1 = 1.00000. Also f (x0 ) = −0.00408, f (x1 ) = 1.45970.
46

Third Iteration :

x0 f (x1 ) − x1 f (x0 )
x2 =
f (x1 ) − f (x0 )
0.60596 ∗ 1.45970 − 1.00000 ∗ (−0.00408)
⇒ x2 =
1.45970 − (−0.00408)
⇒ x2 =0.60706.

Now

f (x2) = − 0.00016 < 0


⇒ f (x2) × f (x1) = < 0
⇒ The root lies between [x2 , x1 ] = [0.60706, 1.00000]

Now, we take x0 = x2 = 0.60706 and x1 = 1.00000. Also f (x0 ) = −0.00016, f (x1 ) = 1.45970.

Fourth Iteration :

x0 f (x1 ) − x1 f (x0 )
x2 =
f (x1 ) − f (x0 )
0.60706 ∗ 1.45970 − 1.00000 ∗ (−0.00016)
⇒ x2 =
1.45970 − (−0.00016)
⇒ x2 =0.60710.

Therefore, from the third and fourth iteration, we have the values of x2 as 0.60706 and 0.60710, re-
spectively which are correct to three decimal places. Hence, the required root of the given equation
correct to three decimal places is 0.607. The successive approximations of the root as computed
above using the Regula Falsi method are displayed in the following table:

Table 17: Numerical results for the above problem

Iteration x0 x1 f (x0 ) f (x1 ) x2 f (x2 )


1 0.00000 1.00000 -2.00000 1.45970 0.57809 -0.10325
2 0.57809 1.00000 -0.10325 1.45970 0.60596 -0.00408
3 0.60596 1.00000 -0.00408 1.45970 0.60706 -0.00016
4 0.60706 1.00000 -0.00016 1.45970 0.60710 -0.00001

Example 21. Find a real root of the equation 2x − log x − 7 = 0 using Regula Falsi method correct to
three decimal places.
47

Table 18: This table shows how to select the bracketing interval [a, b] so as to include the root of the
equation 2x − log x − 7 = 0. It can be seen that the interval [3, 4] gives the accurate and precise location
of the root among the other two intervals such as [1, 2], [2, 3]. Therfore, we choose x0 = 2 and x1 = 3 as
the initial two guesses for bracketing the root.
x f (x) = 2x − log x − 7 sign[f (x)]
1 −5.00000 <0
2 −3.30103 <0
3 −1.47712 <0
4 0.397940 >0

Solution 21. Let f (x) = 2x − log x − 7. Let us take x0 = 3 and x1 = 4. Also f (x0 ) = −1.47712 and
f (x1 ) = 0.39794.
First Iteration :
x0 f (x1 ) − x1 f (x0 )
x2 =
f (x1 ) − f (x0 )
3 ∗ 0.39794 − 4 ∗ (−3.30103)
⇒ x2 =
0.39794 − (−3.30103)
⇒ x2 =3.78484.

Now

f (x2) = − 0.00837 < 0


⇒ f (x2) × f (x1) = < 0
⇒ The root lies between [x2 , x1 ] = [3.78484, 4.00000]

Now, we take x0 = x2 = 3.78484 and x1 = 4.00000. Also, f (x0 ) = −0.00837, f (x1 ) = 0.39794.

Second Iteration :
x0 f (x1 ) − x1 f (x0 )
x2 =
f (x1 ) − f (x0 )
3.78484 ∗ 0.39794 − 4.00000 ∗ (−0.00837)
⇒ x2 =
0.39794 − (−0.00837)
⇒ x2 =3.78927.

Now

f (x2) = − 0.00001 < 0


⇒ f (x2) × f (x1) = < 0
⇒ The root lies between [x2 , x1 ] = [3.78927, 4.00000]
48

Now, we take x0 = x2 = 3.78927 and x1 = 4.00000. Also f (x0 ) = −0.00001, f (x1 ) = 0.39794.

Third Iteration :

x0 f (x1 ) − x1 f (x0 )
x2 =
f (x1 ) − f (x0 )
3.78927 ∗ 0.39794 − 4.00000 ∗ (−0.00001)
⇒ x2 =
0.39794 − (−0.00001)
⇒ x2 =3.78928.

Therefore, from the second and third iterations, we have the values of x2 as 3.78927 and 3.78928,
respectively which are correct to three decimal places. Hence, the required root of the given equa-
tion correct to three decimal places is 3.789. The successive approximations of the root as computed
above using the Regula Falsi method are displayed in the following table:

Table 19: Numerical results for the above problem

Iteration x0 x1 f (x0 ) f (x1 ) x2 f (x2 )


1 2.00000 4.00000 -3.30103 0.39794 3.78484 -0.00837
2 3.78484 4.00000 -0.00837 0.39794 3.78927 -0.00001
3 3.78927 4.00000 -0.00001 0.39794 3.78928 -0.00000

Example 22. Find a real root of the equation xx + 2x − 6 = 0 using Regula Falsi method correct to two
decimal places.

Solution 22. Let f (x) = xx + 2x − 6. Let us take x0 = 1 and x1 = 2. Also f (x0 ) = −3.00000 and
f (x1 ) = 2.00000.

Table 20: This table shows how to select the bracketing interval [a, b] so as to include the root of the
equation xx + 2x − 6 = 0. It can be seen that the interval [1, 2] gives the accurate and precise location
of the root among the other two intervals such as [0, 1], [2, 3]. Therfore, we choose x0 = 1 and x1 = 2 as
the initial two guesses for bracketing the root.
x f (x) = xx + 2x − 6 sign[f (x)]
0 −5.00000 <0
1 −3.00000 <0
2 2.00000 >0
3 27.0000 >0
49

First Iteration :
x0 f (x1 ) − x1 f (x0 )
x2 =
f (x1 ) − f (x0 )
1 ∗ 2.00000 − 2 ∗ (−3.00000)
⇒ x2 =
2.00000 − (−3.00000)
⇒ x2 =1.60000.
Now
f (x2) = − 0.67875 < 0
⇒ f (x2) × f (x1) = < 0
⇒ The root lies between [x2 , x1 ] = [1.60000, 2.00000]
Now, we take x0 = x2 = 1.60000 and x1 = 2.00000. Also, f (x0 ) = −0.67875, f (x1 ) = 2.00000.

Second Iteration :
x0 f (x1 ) − x1 f (x0 )
x2 =
f (x1 ) − f (x0 )
1.60000 ∗ 2.00000 − 2.00000 ∗ (−0.67875)
⇒ x2 =
2.00000 − (−0.67875)
⇒ x2 =1.70135.
Now
f (x2) = − 0.12749 < 0
⇒ f (x2) × f (x1) = < 0
⇒ The root lies between [x2 , x1 ] = [1.70135, 2.00000]
Now, we take x0 = x2 = 1.70135 and x1 = 2.00000. Also f (x0 ) = −0.12749, f (x1 ) = 2.00000.

Third Iteration :
x0 f (x1 ) − x1 f (x0 )
x2 =
f (x1 ) − f (x0 )
1.70135 ∗ 2.00000 − 2.00000 ∗ (−0.12749)
⇒ x2 =
2.00000 − (−0.12749)
⇒ x2 =1.71925.

Fourth Iteration :
x0 f (x1 ) − x1 f (x0 )
x2 =
f (x1 ) − f (x0 )
1.71925 ∗ 2.00000 − 2.00000 ∗ (−0.02283)
⇒ x2 =
2.00000 − (−0.02283)
⇒ x2 =1.72242.
50

Therefore, from the third and fourth iterations, we have the values of x2 as 1.71925 and 1.72242,
respectively which are correct to two decimal places. Hence, the required root of the given equation
correct to three decimal places is 1.72. The successive approximations of the root as computed
above using the Regula Falsi method are displayed in the following table:

Table 21: Numerical results for the above problem

Iteration x0 x1 f (x0 ) f (x1 ) x2 f (x2 )


1 1.00000 2.00000 -3.00000 2.00000 1.60000 -0.67875
2 1.60000 2.00000 -0.67875 2.00000 1.70135 -0.12749
3 1.70135 2.00000 -0.12749 2.00000 1.71925 -0.02283
4 1.71925 2.00000 -0.02283 2.00000 1.72242 -0.00405

Example 23. Find a real root of the equation x3 − 2x − 5 = 0 using Regula Falsi method correct to three
decimal places.

Solution 23. Let f (x) = x3 − 2x − 5. Let us take x0 = 2 and x1 = 3. Also f (x0 ) = −1.00000 and
f (x1 ) = 16.00000.

First Iteration :

x0 f (x1 ) − x1 f (x0 )
x2 =
f (x1 ) − f (x0 )
2 ∗ 16.00000 − 3 ∗ (−1.00000)
⇒ x2 =
16.00000 − (−1.00000)
⇒ x2 =2.058824.

Table 22: This table shows how to select the bracketing interval [a, b] so as to include the root of the
equation x3 − 2x − 5 = 0. It can be seen that the interval [2, 3] gives the accurate and precise location
of the root among the other two intervals such as [0, 3], [1, 3]. Therfore, we choose x0 = 2 and x1 = 3 as
the initial two guesses for bracketing the root.
x f (x) = x3 − 2x − 5 sign[f (x)]
0 −5 <0
1 −6 <0
2 −1 <0
3 16 >0
51

Now

f (x2) = − 0.390800 < 0


⇒ f (x2) × f (x1) = < 0
⇒ The root lies between [x2 , x1 ] = [2.05882, 3.00000]

Now, we take x0 = x2 = 2.05882 and x1 = 3.00000. Also, f (x0 ) = −0.390800, f (x1 ) =


16.000000.

Second Iteration :

x0 f (x1 ) − x1 f (x0 )
x2 =
f (x1 ) − f (x0 )
2.05882 ∗ 16.00000 − 3.00000 ∗ (−0.39080)
⇒ x2 =
16.00000 − (−0.39080)
⇒ x2 =2.08126.

Now

f (x2) = − 0.14721 < 0


⇒ f (x2) × f (x1) = < 0
⇒ The root lies between [x2 , x1 ] = [2.08126, 3.00000]

Now, we take x0 = x2 = 2.08126 and x1 = 3.00000. Also f (x0 ) = −0.14721, f (x1 ) = 16.00000.

Third Iteration :

x0 f (x1 ) − x1 f (x0 )
x2 =
f (x1 ) − f (x0 )
2.08126 ∗ 16.00000 − 3.00000 ∗ (−0.14721)
⇒ x2 =
16.00000 − (−0.14721)
⇒ x2 =2.08964.

Now

f (x2) = − 0.14721 < 0


⇒ f (x2) × f (x1) = < 0
⇒ The root lies between [x2 , x1 ] = [2.08126, 3.00000]

Now, we take x0 = x2 = 2.08964 and x1 = 3.00000. Also f (x0 ) = −0.05468, f (x1 ) = 16.00000.
52

Fourth Iteration :
x0 f (x1 ) − x1 f (x0 )
x2 =
f (x1 ) − f (x0 )
2.08964 ∗ 16.00000 − 3.00000 ∗ (−0.05468)
⇒ x2 =
16.00000 − (−0.05468)
⇒ x2 =2.09274.

Now

f (x2) = − 0.02020 < 0


⇒ f (x2) × f (x1) = < 0
⇒ The root lies between [x2 , x1 ] = [2.09274, 3.00000]

Now, we take x0 = x2 = 2.09274 and x1 = 3.00000. Also f (x0 ) = −0.00745, f (x1 ) = 16.00000.

Fifth Iteration :
x0 f (x1 ) − x1 f (x0 )
x2 =
f (x1 ) − f (x0 )
2.09274 ∗ 16.00000 − 3.00000 ∗ (−0.02020)
⇒ x2 =
16.00000 − (−0.02020)
⇒ x2 =2.09388.

Now

f (x2) = − 0.00745 < 0


⇒ f (x2) × f (x1) = < 0
⇒ The root lies between [x2 , x1 ] = [2.09388, 3.00000]

Now, we take x0 = x2 = 2.09388 and x1 = 3.00000. Also f (x0 ) = −0.00745, f (x1 ) = 16.00000.

Sixth Iteration :
x0 f (x1 ) − x1 f (x0 )
x2 =
f (x1 ) − f (x0 )
2.09388 ∗ 16.00000 − 3.00000 ∗ (−0.00745)
⇒ x2 =
16.00000 − (−0.00745)
⇒ x2 =2.09431.

Therefore, from the fifth and sixth iterations, we have the values of x2 as 2.09388 and 2.09431, re-
spectively which are correct to three decimal places. Hence, the required root of the given equation
correct to three decimal places is 2.094. The successive approximations of the root as computed
above using the Regula Falsi method are displayed in the following table:
53

Table 23: Numerical results for the above problem

Iteration x0 x1 f (x0 ) f (x1 ) x2 f (x2 )


1 2.00000 3.00000 -1.00000 16.00000 2.05882 -0.39080
2 2.05882 3.00000 -0.39080 16.00000 2.08126 -0.14721
3 2.08126 3.00000 -0.14721 16.00000 2.08964 -0.05468
4 2.08964 3.00000 -0.05468 16.00000 2.09274 -0.02020
5 2.09274 3.00000 -0.02020 16.00000 2.09388 -0.00745
6 2.09388 3.00000 -0.00745 16.00000 2.09388 -0.00274

Table 24: Comparision of various root finding methods

Method Type Update based on


Fixed point iteration Open interval formulation of x = φ(x) from f (x) = 0
Bisection method Closed Interval bisecting the original interval
Newton-Raphson method Open interval the tangent line intersection with the x-axis
Secant method Open interval the secant line intersection with the x-axis
False position method Closed interval secant line between two end points
of the interval which enclose the root

Modified Newton-Raphson method


None of the methods discussed so far deal with the multiple roots efficiently. A function having multiple
root does not even change sign at mutiple roots. This rules out the use of the bracketing methods and only
open methods can be applied in such situations. But the open methods are likey to diverge. Apart from
that, not only f (x) but also f ′ (x) goes to zero at the root. In such situtation, use of the open methods
such as the Newton-Raphson method and secant methods becomes difficult. This is because the methods
such as Newton-Raphson and secant method contain derivative or its estimate in the denominator which
could result in division by zero when the solution converges very close to the root. This can be alleviated
by a slight change in the Newton-Raphson formula. If f (x) has a root of multiplicity of m, it was
suggested by Ralsoton and Robinowitz (1978) that the folllowing modification to the Newton-Raphson
method will ensure quadratic converegnce. Let x = α be a root of f (x) = 0 of multiplicity m, then
f (x) = (x − α)m φ(x), where φ(α) = 0, then the iteration formula is given by
f (xn )
xn+1 =xn − m , n = 0, 1, 2, . . . ,
f ′ (xn )
where m is the multiplicity of the root. m = 2 denotes a double root, m = 3 corresponds to a triple root
and so on. However, this method may not be a satisfactory as it depends on the previous knowledge of
54

the multiplicity of the root. The other way of handling the problem of mutiple roots of a function f (x) is
to define
f (x)
u(x) = ′ .
f (x)
It can be shown that this function yields the same roots as that of f (x). Also,we have
f ′ (x)f ′ (x) − f (x)f ′′ (x)
u′ (x) = .
[f ′ (x)]2
Since Newton’s method can be applied to u(x), we have
u(x)
xn+1 =xn −
u′ (x)
f (xn )f ′ (x)
⇒ xn+1 =xn −
[f ′ (xn )]2 − f (xn )f ′′ (xn )
Example 24. Find the multiple root of the following equation with an initial guess of x0 = 0:

x3 − 5x2 + 7x − 3.

Solution 24. Let f (x) = x3 − 5x2 + 7x − 3. Therefore, f ′ (x) = 3x2 − 10x + 7. Given x0 = 2. The
function f (x) can be factorized as follows:

f (x) =x3 − 5x2 + 7x − 3


⇒ f (x) =(x − 3)(x − 1)(x − 1)

Thus the above equation has a double root (m = 2).


First Iteration : x0 = 0.00000, f (x0 ) = −3.00000, f ′ (x0 ) = 7.00000 We know from the modi-
fied Newton-Raphson method that
f (x0 )
x =x0 − m
f ′ (x0 )
f (x0 )
x =x0 − 2 ′
f (x0 )
(−3.00000)
⇒ x =0.00000 − 2
(7.00000)
⇒ x =0.85714

Second Iteration : x0 = x = 0.85714, f (x0 ) = −0.04373, f ′ (x0 ) = 0.63265 Therefore,


f (x0 )
x =x0 − 2
f ′ (x0 )
(−0.04373)
⇒ x =0.85714 − 2
(0.63265)
⇒ x =0.99539
55

Third Iteration : x0 = x = 0.99539, f (x0 ) = −0.00004, f ′ (x0 ) = 0.01850 Therefore,

f (x0 )
x =x0 − 2
f ′ (x0 )
(−0.00004)
⇒ x =0.99539 − 2
(0.01850)
⇒ x =0.99999

Fourth Iteration : x0 = x = 0.99999, f (x0 ) = −0.00000, f ′ (x0 ) = 0.00002 Therefore,

f (x0 )
x =x0 − 2
f ′ (x0 )
(−0.00004)
⇒ x =0.99539 − 2
(0.01850)
⇒ x =1.00000

From the third and the fourth iteration, we find that the successive approximations of the root are 0.99999
and 1.00000. Hence the required root of the given equation correct to three decimal places is 1.000.
The successive approximations of the root as computed above using the Newton-Raphson method are
displayed in the following table:

Table 25: Numerical results for the above problem

i xi f (xi ) f ′ (xi ) h = − ff′(x i)


(xi )
xi+1 |xi+1 − xi |
1 0.00000 -3.00000 7.00000 -0.42857 0.85714 0.85714
2 0.85714 -0.04373 0.63265 -0.06912 0.99539 0.13825
3 0.99539 -0.00004 0.01850 -0.00230 0.99999 0.00460
4 0.99999 -0.00000 0.00002 -0.00000 1.00000 0.00001

Example 25. Find the multiple root of the following equation with an initial guess of x0 = 0:

x3 − x2 − x + 1.

Solution 25. Let f (x) = x3 − x2 − x + 1. Therefore, f ′ (x) = 3x2 − 2x − 1. Given x0 = 2. The function
f (x) can be factorized as follows:

f (x) =x3 − x2 − x + 1
⇒ f (x) =(x + 1)(x − 1)(x − 1)

Thus the above equation has a double root (m = 2).


56

First Iteration : x0 = 2.00000, f (x0 ) = 3.00000, f ′ (x0 ) = 7.00000 We know from the modified
Newton-Raphson method that
f (x0 )
x =x0 − m
f ′ (x0 )
f (x0 )
x =x0 − 2 ′
f (x0 )
(3.00000)
⇒ x =2.00000 − 2
(7.00000)
⇒ x =1.14286

Second Iteration : x0 = x = 1.14286, f (x0 ) = 0.04373, f ′ (x0 ) = 0.63265 Therefore,


f (x0 )
x =x0 − 2
f ′ (x0 )
(0.04373)
⇒ x =1.14286 − 2
(0.63265)
⇒ x =1.00461

Third Iteration : x0 = x = 1.00461, f (x0 ) = 0.00004, f ′ (x0 ) = 0.01850 Therefore,


f (x0 )
x =x0 − 2
f ′ (x0 )
(0.00004)
⇒ x =1.00461 − 2
(0.01850)
⇒ x =1.00001

Fourth Iteration : x0 = x = 1.00001, f (x0 ) = 0.00000, f ′ (x0 ) = 0.00002 Therefore,


f (x0 )
x =x0 − 2
f ′ (x0 )
(0.00000)
⇒ x =1.00001 − 2
(0.00002)
⇒ x =1.00000

From the third and the fourth iteration, we find that the successive approximations of the root are 1.00001
and 1.00001. Hence the required root of the given equation correct to three decimal places is 1.000.
The successive approximations of the root as computed above using the Newton-Raphson method are
displayed in the following table:
Example 26. Find the multiple root of the follwing equation using x0 without use of the knowledge of
multiplicity of the root:

f (x) = x3 − 5x2 + 7x − 3
57

Table 26: Numerical results for the above problem

i xi f (xi ) f ′ (xi ) h = − ff′(x i)


(xi )
xi+1 |xi+1 − xi |
1 2.00000 3.00000 7.00000 0.42857 1.14286 0.85714
2 1.14286 0.04373 0.63265 0.06912 1.00461 0.13825
3 1.00461 0.00004 0.01850 0.00230 1.00001 0.00460
4 1.00001 0.00000 0.00002 0.00000 1.00000 0.00001

Solution 26. From the third and the fourth iteration, we find that the successive approximations of the
root are 1.00001 and 1.00001. Hence the required root of the given equation correct to three decimal
places is 1.000. The successive approximations of the root as computed above using the Newton-Raphson
method are displayed in the following table:

Table 27: Numerical results for the above problem

i xi f (xi ) f ′ (xi ) f ′′ (x) xi+1 |xi+1 − xi |


1 0.000000 -3.000000 7.000000 -10.000000 1.105263 1.105263
2 1.105263 -0.020994 -0.387812 -3.368421 1.003082 0.102181
3 1.003082 -0.000019 -0.012298 -3.981510 1.000002 0.003079
4 1.000002 -0.000000 -0.000010 -3.999986 1.000000 0.000002

You might also like