Chapter Two
Chapter Two
1. Direct Methods: Direct methods give the exact value of the roots in a finite number of steps.
We assume here that there is no round off errors. Direct methods determine all the roots at the
same time.
2. Indirect or Iterative Methods: Indirect or iterative methods are based on the concept of
successive approximations. The general procedure is to start with one or more initial
approximation to the root and obtain a sequence of iterates ( ) which in the limit converges to
the actual or true solution to the root. Indirect or iterative methods determine one or two roots at
a time. The indirect or iterative methods are further divided into two categories: bracketing and
open methods.
Bracketing Methods (Need two initial estimates that will bracket the root. Always
converge.)
Bisection Method
False-Position Method
Open Methods (Need one or two initial estimates. May diverge, or converge very rapidly)
Secant Method
The bracketing methods require the limits between which the root lies, whereas the open
methods require the initial estimation of the solution. Bisection and False position methods are
two known examples of the bracketing methods. Among the open methods, the Newton-Raphson
and the method of successive approximation are most commonly used. The most popular method
for solving a non-linear equation is the Newton-Raphson method and this method has a high rate
of convergence to a solution.
General Idea of Bracketing Methods
Rule 1: If ( ) ∗ ( ) < 0, then there are odd number of roots.
Rule 2: If ( ) ∗ ( ) > 0, then there are
i. even number of roots
ii. no roots
Root/zero: A number α for which f(α) = 0 is called a root of the equation f(x) = 0, or a zero of
f(x). Geometrically, a root of an equation f(x) = 0 is the value of x at which the graph of the
equation y = f(x) intersects the x-axis.
f ″(x) = 6x – 6, f ″(2) = 6 ≠ 0.
For example, if we require two decimal place accuracy, then we iterate until x –x ≤
0.005. If we require three decimal place accuracy, then we iterate until |x – x | ≤ 0.0005. As
we have seen earlier, we require a suitable iteration function and suitable initial approximation(s)
(i) 8x – 12x – 2x + 3 = 0
(ii) 3x – 2x – x – 5 = 0
−2 −1 0 1 2 3
( ) −105 −15 3 −3 15 105
Since
Therefore, there are three real roots and the roots lie in the intervals (– 1, 0), (0, 1), (1, 2).
(ii) Let ( ) = 3x – 2x – x – 5 = 0.
−3 −2 −1 0 1 2 3
( ) −101 −35 −9 −5 −5 9 55
From the table, we find that there is one real positive root in the interval (1, 2). The equation has
no negative real root.
We assume that f(x) is a function that is real-valued function. Suppose that f(x) is continuous
on an interval a ≤ x ≤ b and that f(a) f(b) < 0. When this is the case, f(x) will have
opposite signs at the end points of the interval (a, b). As shown in Fig. 3.1 (a) and (b), if f(x)
is continuous and has a root between the points x = a and x = b, then either f(a) > 0 and
f(b) < 0 or f(a) < 0 and f(b) > 0. In other words, if there is a solution or a root between
x = a and x = b, then f(a) f(b) < 0.
( ) ∗ ( ) < 0 is true if the interval has odd number of roots, not necessarily one
root.
Example: Determine approximately how many iterations are necessary to solve f(x) = x +
4x − 10 = 0 with accuracy of ϵ = 10 in the interval [1,2].
( ) ( )
Solution:n ≥ = = 16.6
n = 17 iterations.
Therefore, f(0) is negative and f(1) is positive so that the root lies between 0 and 1.
The first approximation:
0+1
x = = 0.5
2
∴ f(0.5) = −1, which is negative.
Thus, f(0.5) is negative and f(1) is positive. Then the root lies between 0.5and 1.
Therefore f(0.688) is obtained positive, while f(0.625) is negative. Therefore, the root
liesbetween 0.625 and 0.688.
The fifth approximation:
Therefore f(0.665) is positive and f(0.657) is negative so that the root lies between 0.657
and 0.665.
The eighth approximation:
From last two approximations, i.e., x = 0.665 and x = 0.661 it is observed that the
approximate value of the root of f(x) = 0 up to two decimal places is 0.66.
Example 2: Find the real root of equation x log x = 1.2 by Bisection Method correct to two
decimal places.
Solution: let f(x) = x log x − 1.2. So that
Thus f (2) is negative and f (3) is positive, therefore, the root will lie between 2 and 3.
The first approximation:
Thus, f (2.5) is negative and f (3) is positive, therefore, the root lies between 2.5 and 3.
Thus, f(2.625) is found to be negative and f(2.75) is positive, therefore, the root lies between
2.625 and 2.75.
The fourth approximation:
Thus, f(2.6875) is negative and f(2.75) is positive, therefore, the root lies between 2.6875 and
2.75.
The fifth approximation:
Thus, f(2.7188) is negative and f(2.75) is positive, therefore, the root lies between 2.7188 and
2.75.
The sixth approximation:
Thus, f(2.734) is negative and f(2.75) is positive, therefore, the root lies between 2.734 and
2.75.
The seventh approximation:
Thus, f(2.742) is positive and f(2.734) is negative, therefore, the root lies between 2.734 and
2.742.
Hence, from the approximate value of the roots x and x , we observed that, up to two places of
decimal, the root is 2.74 approximately.
Problems with the Bisection Method
Multiple roots in an interval [ , ]
If ( ) ( ) < 0, then the bisection method will find one of the roots.
Either use another method or provide better intervals. You can use graphical methods
or tables to find intervals
Double roots
The bisection method will not work since the function does not change sign.
e.g. ( ) = ( − 2)
Singularities
The bisection method will solve for a singularity as if it were a root. Therefore we must
check the functional values to ensure convergence to see if it is indeed a root.
Exercise
a) Determine the largest root of ( ) = – – 1 = 0 accurate to within ∈ = 0.001.
Use the Bisection method.
b) Find the smallest positive real root of the equation = 1 correct to three decimal
places.
Graphically
If ( ) ( ) < 0, the root lies between and . The next approximation by method of false
( )
position is given by x = x − ( ) ( ) f(x )
If ( ) ( ) < 0, the root lies between and . The next approximation is
(x − x )
x =x − f(x )
f(x ) − f(x )
We repeat this procedure until we arrive at the desired accuracy.
Example1: Find a real root of the equation x – ln x – 12 = 0 using Regula-Falsi method
correct to three places of decimals.
Solution: Let ( ) = x – ln x – 12 = 0. So that (3) = −4.0986 and (4) = 2.6137
Therefore, f(3) and f(4) are of opposite signs. Therefore, a real root lies between 3 and 4.
The first approximation:
Third approximation:
Fourth approximation:
Fifth approximation:
( ) ∗ ( ) < 0 is true if the interval has odd number of roots, not necessarily one
root.
Generally converges faster than the bisection method
Exercise
1. Find a real root of the equation f(x) = xe – 3 = 0, using Regula-Falsi method correct
to three decimal places.
2. Find a real root of cos x – 3x + 5 = 0. Correct to four decimal places using the method
of False Position method.
3. Find the root correct to two decimal places of the equation xe = cos x, using the Secant
method.
2.3 Secant Method
The Secant method is similar to the Regula-Falsi method, except for the fact that we drop the
condition that f(x) should have opposite signs at the two points used to generate the next
approximation. Instead, we always retain the last two points to generate the next. Thus, if
and are two approximations to the root, then the next approximation to root is given by
( − )
= − f(x ), n = 1,2,3, ⋯
f(x ) − f(x )
Geometrically, in Secant method we replace the function f(x) by a straight line passing through
the points , ( ) and ( , f( )) and take the point of intersection of the straight line
with the x-axis as the next approximation to the root. In contrast to the Regula-Falsi method, the
Secant iteration does not bracket the root and it is not even necessary to bracket the root to start
the iteration. Hence, it is obvious that the iteration may not always coverage on the other hand, it
generally converges faster. Thus, by dropping the necessity of bracketing the root, we improve
the rate of convergence, however, in some cases, the iteration may not converge at all.
Example1. Find the smallest real root of the equation x – 5x – 17x + 20 = 0 by Secant
method correct to five decimal places.
Solution: Taking initial approximations as, x = 0, x = 1and f(x ) = 20, f(x ) = – 1, then by
Secantmethod the next approximation is given by
x −x
x =x − f(x )
f(x ) − f(x )
1−0
x = 1− (−1) = 0.95238
−1 − 20
Hence, f(x ) = 0.13824
Now the next approximation can be obtained by using x and x in Secant method.Similarly,
other approximations can be obtained by using two recent approximations inSecant method.
These are x = 0.95816, f(x ) = 0.00059
x = 0.95818, f(x ) = 0.00011
Compiled by Zerihun M. Page 11
x = 0.95818.
Thus the approximate root can be taken as 0.65818, which is correct up to five decimals.
Example2: Find the positive real root correct to three decimal places for − − 10 = 0 by
using Secant method.
Solution: Here f(x) = x − x − 10, f(0) = −10, f(1) = −10, f(2) = 4
Hence, the positive real root lies in (1,2).
By Secant method
x −x
x =x − f(x ), n = 1,2, ⋯
f(x ) − f(x )
Let x = 1, x = 2.
x = 1.7143, x = 1.8385, x = 1.8578, x = 1.8556, x = 1.8556
Hence, the root correct to three decimal place is 1.856.
2.4 Iteration Method (Method of Successive Approximation)
This method is also known as the direct substitution method or method of fixed iterations. To
find the root of the equation f(x) = 0 by successive approximations, we rewrite the given
equation in the form
x = g(x)
Now, first we assume the approximate value of root (let x ) , then substitute it in g(x) to have a
first approximation given by
= g(x )
Similarly, the second approximation is given by
= g(x )
In general,
= g(x )
The function φ(x) is called the iteration function.
Convergence of Iterative Method
Note. The iteration method x = g(x) is convergent if |g (x)| < 1 otherwise divergent.
Example 1.Find the smallest positive root of the equation – – 10 = 0, using the general
iteration method with accuracy 0.001.
Solution: We have
f(x) = x – x – 10, f(0) = – 10, f(1) = – 10,
f(2) = 8 – 2 – 10 = – 4, f(3) = 27 – 3 – 10 = 14.
Since,f(2) f(3) < 0, the smallest positive root lies in the interval(2, 3).
Write = + 10, and x = (x + 10) / = φ(x). We define the iteration method as
x = (x + 10) / .
We obtain φ′(x) = ( ) /
We find |φ′(x) | < 1 for all x in the interval(2, 3). Hence, the iteration converges.
Letx = 2.5. We obtain the following results.
x = (12.5) / = 2.3208, x = (12.3208) / = 2.3097,
x = (12.3097) / = 2.3090, x = (12.3090) / = 2.3089.
Since, |x – x | = 2.3089 – 2.3090 = 0.0001, we take the required root as x ≈ 2.3089.
Note: If we write x = 10 − x = φ(x), then φ (x) = 3x for all in the interval(2, 3).
Thus, the iteration method does not work in this case. It diverges.
Example2. Find a real root correct up to four decimal places of the equation 2x – log x – 9 = 0
using iteration method.
Solution: Here 2x – log x – 9
f (4) = 2(4) – log (4) – 9 = 8 – 0.60206 – 9 = – 1.60206