0% found this document useful (0 votes)
13 views

Iterative Methods for Simple Roots

Uploaded by

ratangulipilli
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views

Iterative Methods for Simple Roots

Uploaded by

ratangulipilli
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

ITERATIVE METHODS FOR SIMPLE ROOTS

October 5, 2024

1 Introduction
We consider the methods for determining the roots of the equation

f (x) = 0 (1)

which may be given explicitly as a polynomial of degree n in x or f (x) may be defined as a


transcendental function.
There are two types of methods that can be used to find the roots of the equation (1).

1. Direct methods : These methods give the exact value of the roots in a finite number of
steps. These methods determine all the roots at the same time.

2. Iterative methods : These methods are based on the idea of successive approximations.
Starting with one or more initial approximations to the root, we obtain a sequence of
iterates xk which in the limit converges to the root. These methods determine one or
two roots at a time.

1
2 Iterative methods for simple roots
0
Definition : A root ξ is called a simple root of f (x) = 0, if f (ξ) = 0 and f (ξ) 6= 0. Then,
we can also writef (x) = (x − ξ)g(x), where g(x) is bounded and g(ξ) 6= 0.

2.1 Bisection Method


If the function f (x) satisfies f (a0 )f (b0 ) < 0, then the equation f (x) = 0 has atleast one real
root or an odd number of real roots in the interval (a0 , b0 ). If m1 = 21 (a0 + b0 ) is the mid
point of this interval, then the root will lie either in the interval (a0 , m1 ) or in the interval
(m1 , b0 ) provided that f (m1 ) 6= 0. If f (m1 ) = 0, then m1 is the required root. Repeating
this procedure a number of times, we obtain the bisection method
1
mk+1 = ak + (bk − ak ), k = 0, 1, . . .
2
where (
(ak , mk+1 ), if f (ak )f (mk+1 ) < 0
(ak+1 , bk+1 ) =
(mk+1 , bk ), if f (mk+1 )f (bk ) < 0
We take the midpoint of the last interval as an approximation to the root. This method
always converges, if f (x) is continuous in the interval [a, b] which contains the root.
Algorithm

1. Choose initial guesses x0 and x1 such that f (x0 )f (x1 ) < 0

2. Choose pre-specified tolerable error .


(x0 +x1 )
3. Calculate new approximated root as x2 = 2

4. Calculate f (x0 )f (x2 )

(a) if f (x0 )f (x2 ) < 0 then x0 = x0 and x1 = x2


(b) if f (x0 )f (x2 ) > 0 then x0 = x2 and x1 = x1
(c) if f (x0 )f (x2 ) = 0 then goto (8)

5. if |f (x2 )| >  then goto (3) otherwise goto (6)

6. Display x2 as root.

7. Stop.

2
2.2 Secant Method
In this method, we approximate the graph of the function y = f (x) in the neighbourhood
of the root by a straight line (secant) passing through the points (xk–1 , fk–1 ) and (xk , fk ),
where fk = f (xk ) and take the point of intersection of this line with the x-axis as the next
iterate. We thus obtain
xk − xk−1
xk+1 = xk − fk , k = 1, 2, . . .
fk − fk−1
or
xk−1 fk − xk fk−1
xk+1 = , k = 1, 2, . . .
fk − fk−1
where xk–1 and xk are two consecutive iterates. In this method, we need two initial approx-
imations x0 and x1 . This method is also called the chord method. The order of the method
is obtained as
1 √
p = (1 + 5) ≈ 1.62
2
If the approximations are chosen such that f (xk –1)f (xk ) < 0 for each k, then the method is
known as Regula-Falsi method and has linear (first order) rate of convergence. Both these
methods require one function evaluation per iteration.
Algorithm

1. Start

2. Define function as f (x)

3. Input initial guesses x0 and x1 , tolerable error () and maximum iteration (N )

4. Initialize iteration counter i = 1

5. If f (x0 ) = f (x1 ) then print “Mathematical Error” and goto (11) otherwise goto (6)
(x1 −x0 )
6. Calcualte x2 = x1 − f (x1 )−f (x0 )
∗ f (x1 )

7. . Increment iteration counter i = i + 1

8. If i >= N then print “Not Convergent” and goto (11) otherwise goto (9)

9. If |f (x2 )| >  then set x0 = x1 , x1 = x2 and goto (5) otherwise goto (10)

10. Print root as x2

11. Stop

3
2.3 Newton-Raphson method
In this method, we approximate the graph of the function y = f (x) in the neighbourhood of
the root by the tangent to the curve at the point (xk , fk ) and take its point of intersection
with the x-axis as the next iterate. We have the Newton-Raphson method as
fk
xk+1 = xk − 0 , k = 0, 1, . . .
fk

and its order is p = 2. This method requires one function evaluation and one first derivative
evaluation per iteration.
Algorithm

1. Define function as f (x)

2. Define first derivative of f (x) as g(x)

3. Input initial guess (x0 ), tolerable error () and maximum iteration (N )

4. Initialize iteration counter i = 1

5. If g(x0 ) = 0 then print “Mathematical Error” and goto (11) otherwise goto (6)
f (x0 )
6. Calcualte x1 = x0 − g(x0 )

7. Increment iteration counter i = i + 1

8. If i >= N then print “Not Convergent” and goto (11) otherwise goto (9)

9. If |f (x1 )| >  then set x0 = x1 and goto (5) otherwise goto (10)

10. Print root as x1

11. Stop

4
Example: Find the interval of equation x3 − x − 4 = 0. in which the smallest positive
root lies and also, determine the roots correct to two decimal places using the bisection
method.
Solution:
We find f (0) = −4, f (1) = −4, f (2) = 2.
Therefore, the root lies in the interval (1, 2). The sequence of intervals using the bisection
method is obtained as

k ak–1 bk–1 mk f (mk )f (ak–1 )


1 1 2 1.5 >0
2 1.5 2 1.75 >0
3 1.75 2 1.875 <0
4 1.75 1.875 1.8125 >0
5 1.75 1.8125 1.78125 >0
6 1.78125 1.8125 1.796875 <0
7 1.78125 1.796875 1.7890625 >0
8 1.7890625 1.796875 1.792969 >0
9 1.792969 1.796875 1.794922 >0
10 1.794922 1.796875 1.795898 > 0.

After 10 iterations, we find that the root lies in the interval (1.795898, 1.796875). Therefore,
the approximate root is m = 1.796387. The root correct to two decimal places is 1.80.

5
Example: Given the following equation : x4 − x − 10 = 0, determine the initial approx-
imations for finding the smallest positive root. Use these to find the root correct to three
decimal places with the following methods:
(a) Secant method, (b) Regula-Falsi method, (c) Newton-Raphson method.
Solution:
We find that f (0) = −10, f (1) = −10, f (2) = 4.
Hence, the smallest positive root lies in the interval (1, 2).
The Secant method gives the iteration scheme
xk − xk−1
xk+1 = xk − fk , k = 1, 2, . . .
fk − fk−1
With x0 = 1, x1 = 2, we obtain the sequence of iterates

x2 = 1.7143, x3 = 1.8385, x4 = 1.8578, x5 = 1.8556, x6 = 1.8556.


The root correct to three decimal places is 1.856.
The Regula-Falsi method gives the iteration scheme
xk − xk−1
xk+1 = xk − fk , k = 1, 2, . . .
fk − fk−1
and fk fk–1 < 0.
With x0 = 1, x1 = 2, we obtain the sequence of iterates

x2 = 1.7143, f (x2 ) = –3.0776, ξ ∈ (x1 , x2 ),


x3 = 1.8385, f (x3 ) = −0.4135, ξ ∈ (x1 , x3 ),
x4 = 1.8536, f (x4 ) = −0.0487, ξ ∈ (x1 , x4 ),
x5 = 1.8554, f (x5 ) = −0.0045, ξ ∈ (x1 , x5 ),
x6 = 1.8556.

The root correct to three decimal places is 1.856.


The Newton-Raphson method gives the iteration scheme
fk
xk+1 = xk − 0 , k = 0, 1, . . .
fk
With x0 = 2, we obtain the sequence of iterates

x1 = 1.8710, x2 = 1.8558, x3 = 1.8556.

Hence, the root correct to three decimal places is 1.856.

6
2.4 Fixed point Iteration
Fixed point : A point, say, s is called a fixed point if it satisfies the equation x = g(x).

Fixed point Iteration : The transcendental equation f (x) = 0 can be converted alge-
braically into the form x = g(x) and then using the iterative scheme with the recursive
relation
xi+1 = g(xi ), i = 0, 1, 2, . . . ,
with some initial guess x0 is called the fixed point iterative scheme.
Algorithm : Given an equation f (x) = 0

1. Convert f (x) = 0 into the form x = g(x)

2. Let the initial guess be x0

3. Compute
xi+1 = g(xi ), i = 0, 1, 2, . . . ,

4. Repeat till |xi+1 − g(xi )| ≤  (where i is the iteration number)

Example : Find a root of x4 − x − 10 = 0


Solution :
Consider another function g(x) = (x + 10)1/4 and the fixed point iterative scheme

xi+1 = (xi + 10)1/4 , i = 0, 1, 2, . . .

let the initial guess x0 be 1.0, 2.0 and 4.0

i 0 1 2 3 4 5 6
xi 1.0 1.82116 1.85424 1.85553 1.85558 1.85558
xi 2.0 1.861 1.8558 1.85559 1.85558 1.85558
xi 4.0 1.93434 1.85866 1.8557 1.85559 1.85558 1.85558

You might also like