Chapter 2 Root Finding
Chapter 2 Root Finding
CHAPTER-II
ROOTS OF EQUATIONS
2.1 Introduction
The roots or zeros of equations can be simply defined as the values of x that makes f(x) =0. There are
many ways to solve for roots of equations. For some cases, the roots can be found easily by solving the
equations directly. However, there are also other cases where solving the equations directly or
analytically is not so possible. In such instances, the only alternatives will be approximate solution
techniques. There are several techniques of such type and some of them will be discussed in this
chapter.
One alternative to obtain an approximate solution is to plot the function and determine where it crosses
the x-axis. This point, which represents the x-value for which f(x)=0 is the root.
Graphical techniques are of limited practical value because they are not precise. However, graphical
methods can be utilized to obtain rough estimates of the roots. These estimates can be employed as
starting guesses for numerical methods which will be discussed in the next sections.
The procedure in this method consists of continuously halving the interval that contains the root.
i. Choose two initial guesses a and b which bracket the root. i.e. f(a) and f(b) have opposite signs
[f(a). f(b)<0]. This can be done by evaluating the function at a and b or by plotting the graph of
the function.
iii. Make the following evaluations to determine the interval in which the root lies
• If f(a).f(c) < 0 ,the root lies in the sub interval (a,c); then b=c and return to step ii
• If f(a).f(c) > 0 ,the root lies in the sub interval (c,b); then a=c and return to step ii
• If f(a.)f(c) = 0 , then x= c is an exact solution ; terminate the computation
We repeat this procedure until either the exact root has been found or the interval is smaller than some
specified tolerance.
______________________________________________________________________________
AAiT ADDIS ABABA INSTITUTE OF TECHNOLOGY 1
Numerical Methods (CENG 2084) Lecture Note
Example Find the real solution to the cubic equation x3 + 4x2 -10 = 0.
By plotting the graph of the function we can find that there is a real root between 1 and 2 where the
graph crosses the x-axis and carrying out the Bisection technique on the interval [1,2] using 10
iterations we have the following:
The root lies somewhere in the interval [a,b] the width of which is
If the required accuracy is not yet found we can still increase the number of iterations till our
satisfaction is met.
______________________________________________________________________________
AAiT ADDIS ABABA INSTITUTE OF TECHNOLOGY 2
Numerical Methods (CENG 2084) Lecture Note
An alternative method that exploits a graphical insight over the previous technique is the False position
method where by we join f(a) and f(b) by a straight line and the intersection of this line with the x-axis
represents an improved estimate of the root.
Using similarity of triangles, the intersection point of the line with the x-axis can be estimated as
f (a ) f (b)
=
c−a c−b
cn represents a sequence of points generated by the Regula Falsi process and {cn} will converge to zero
at x = r.
Example Find the real solution to the cubic equation x3 + 4x2 -10 = 0.
Previously we have found out that the graph will cross the x-axis between the interval 1 and 2
Note: - A fixed point of a function g(x) is a number P such that P = g(P) but not a root of the equation
g(x) = 0.
- Geometrically, the fixed points of a function g(x) are the points of intersection of the
curve y = g(x) and the line y = x.
x2
Example Use fixed point iteration to find the fixed point(s) for the function g(x) = 1 + x -
3
By plotting the graph of the function we can find that there is a real root between 3 and 7 where the
graph crosses the x-axis and performing fixed point iteration between 3 and 7 we have:
______________________________________________________________________________
AAiT ADDIS ABABA INSTITUTE OF TECHNOLOGY 4
Numerical Methods (CENG 2084) Lecture Note
If seven iterations are not enough to locate the fixed point we can continue the iteration.
Example Use a fixed point iteration method find the real root of f(x) = x3 + 4x2 -10 .
i.e. X = [(10-x3)1/2]/2
g(x) = [(10-x3)1/2]/2
Previously we have found out that the root lies on the interval (1,2)
Starting point Po = 1
g(Pi)
Po = 1.000000000 1.500000000
P1 = 1.500000000 1.286953768
P2 = 1.286953768 1.402540804
P3 = 1.402540804 1.345458374
P4 = 1.345458374 1.375170253
P5 = 1.375170253 1.360094193
P6 = 1.360094193 1.367846968
P7 = 1.367846968 1.363887004
P8 = 1.363887004 1.365916733
P9 = 1.365916733 1.364878217
P10 = 1.364878217 1.365410061
P11 = 1.365410061 1.365137821
After 11 iterations, the root has been found that x= 1.365137821 with error of 0.02%.
Exercise Use a fixed point iteration method, find the real root of f(x) = x4+2x2-x -10 .Use an error
tolerance of 0.01%.
______________________________________________________________________________
AAiT ADDIS ABABA INSTITUTE OF TECHNOLOGY 5
Numerical Methods (CENG 2084) Lecture Note
If f(x) and f’(x) are continuous near a root P, then this extra information regarding the nature of f(x) can
be used to develop algorithms that will produce sequences {Pk}that converge faster to P than either the
bisection or false position method. The Newton-Raphson (or simply Newton's) method is one of the
most useful and best known algorithms that relies on the continuity of f(x) and f’(x). The method is
attributed to Sir Isaac Newton (1643-1727) and Joseph Raphson (1648-1715).
If the initial guess at the root is P0, a tangent can be extended from the point [P0, f(P0)]. The point where
this tangent crosses the x-axis usually reperesents an improved estimate of the root and the Newton-
Raphson mehtod can be derived based on the basis of this geometrical interpretation and is expressed
by the iteration
f ( Pk )
Pk+1 = g(Pk) = Pk – for k=0, 1, 2,...
f ' ( Pk )
Example Use Newton- Raphson method to find the three roots of the cubic polynomial.
Starting with P0 = 3
______________________________________________________________________________
AAiT ADDIS ABABA INSTITUTE OF TECHNOLOGY 6
Numerical Methods (CENG 2084) Lecture Note
Hence,
If we plot the graph we can see that there are two more real roots, using the starting
values 0.0 and 1.4 we can find them.
______________________________________________________________________________
AAiT ADDIS ABABA INSTITUTE OF TECHNOLOGY 7
Numerical Methods (CENG 2084) Lecture Note
The formula for the secant method is the same one that was used in the regula falsi method, except that
the logical decisions regarding how to define each succeeding term are different and is expressed as:
for
Example Use the secant method to find the three roots of the cubic polynomial.
______________________________________________________________________________
AAiT ADDIS ABABA INSTITUTE OF TECHNOLOGY 8
Numerical Methods (CENG 2084) Lecture Note
______________________________________________________________________________
AAiT ADDIS ABABA INSTITUTE OF TECHNOLOGY 9