0% found this document useful (0 votes)
25 views14 pages

Chapter Two

Chapter Two discusses methods for solving non-linear equations, focusing on finding roots of the function f(x) = 0. It outlines direct and indirect methods, including bracketing and open methods, with the Newton-Raphson method being the most popular due to its rapid convergence. The chapter also explains the bisection method, which reliably narrows down the interval containing the root using the intermediate value theorem.
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)
25 views14 pages

Chapter Two

Chapter Two discusses methods for solving non-linear equations, focusing on finding roots of the function f(x) = 0. It outlines direct and indirect methods, including bracketing and open methods, with the Newton-Raphson method being the most popular due to its rapid convergence. The chapter also explains the bisection method, which reliably narrows down the interval containing the root using the intermediate value theorem.
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/ 14

Chapter Two

Solving Non Linear Equations


Introduction
One of the most common problem encountered in engineering analysis is that given a function
f(x), find the values of x for which f(x) = 0. The solution (values of x) are known as the roots of
the equation f(x) = 0, or the zeroes of the function f(x). The roots of equations may be real or
complex. In general, an equation may have any number of (real) roots, or no roots at all. For
example, sin x – x = 0 has a single root, namely,x = 0, whereas tan x – x = 0 has infinite
number of roots (x = 0, ± 4.493, ± 7.725, … ). There are two types of methods available to find
the roots of algebraic and transcendental equations of the form f(x) = 0.

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

 Successive Approximation Method (Iteration method)

 Newton-Raphson Method (Needs the derivative of the function)

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.

Compiled by Zerihun M. Page 1


Simple root: A number α is a simple root of f(x) = 0, if f(α) = 0 and f (α) ≠ 0. Then, we can
write f(x) as f(x) = (x – α) g(x), g(α) ≠ 0.

For example, since (x – 1) is a factor of f(x) = x + x – 2 = 0, we can write f(x) =


(x – 1)(x + x + 2) = (x – 1) g(x), g(1) ≠ 0.

Alternately, we find f(1) = 0, f ′(x) = 3x + 1, f ′(1) = 4 ≠ 0. Hence, x = 1 is a simple


root of f(x) = x + x – 2 = 0.

Multiple root: A number is a multiple root, of multiplicity m, of f(x) = 0, if f(α) =


f ′(α) = ⋯ = f(m – 1) (α) = 0, and f ( ) (α) ≠ 0. Then, we can write f(x) as f(x) =
(x – α) g(x), g(α) ≠ 0.

For example, consider the equation f(x) = x – 3x + 4 = 0. We find

f(2) = 8 – 12 + 4 = 0, f ′(x) = 3x – 6x, f ′(2) = 12 – 12 = 0,

f ″(x) = 6x – 6, f ″(2) = 6 ≠ 0.

Hence, x = 2 is a multiple root of multiplicity 2 (double root) of f(x) = x – 3x + 4 = 0.

We can write f(x) = (x – 2) (x + 1) = (x – 2) g(x), g(2) = 3 ≠ 0.

Convergence of iterative methods: The sequence of iterates {x } is said to converge to the

exact root α, if lim →∞ x = α,or lim →∞ |x − α| = 0.

Criterion to terminate iteration procedure


Since, we cannot perform infinite number of iterations; we need a criterion to stop the iterations.
We use one or both of the following criterion:

i. The equation f(x) = 0 is satisfied to a given accuracy or f(x ) is bounded by an error


tolerance ε. i.e. |f(x )| ≤ ε.
ii. The magnitude of the difference between two successive iterates is smaller than a given
accuracy or an error bound ε. i.e. |x – x | ≤ ε.

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)

Compiled by Zerihun M. Page 2


to start the iteration procedure. In the next section, we give a method to find initial
approximation(s).

Choosing initial approximation to the root


(i) Graphical method
Since the values of x at which the graph of y = f(x) intersects the x-axis gives the root of
f(x) = 0 any value in the neighborhood of this point may be taken as an initial approximation to
the root. If the equation f(x) = 0 is conveniently written in the form f (x) = f (x), then the
point of intersection of the graph of y = f (x) and y = f (x) gives the root of f(x) = 0 and any
value in the neighborhood of this point can be taken as an initial approximation. Another
commonly method to find the initial approximation is to the root is based on the intermediate
value theorem.

(ii) Intermediate value theorem


Theorem 1.1: If f(x) is continuous on some interval [a, b] and f(a)f(b) < 0, then the equation
f(x) = 0 has at least one real root or an odd number of real roots in the interval (a, b).
Example 1.1: Determine the maximum number of positive and negative roots and intervals of
length one unit in which the real roots lie for the following equations.

(i) 8x – 12x – 2x + 3 = 0
(ii) 3x – 2x – x – 5 = 0

Solution: (i) Let f(x) = 8x – 12x – 2x + 3 = 0

We have the following table of values for f(x)

−2 −1 0 1 2 3
( ) −105 −15 3 −3 15 105
Since

(– 1) (0) < 0, there is a root in the interval (– 1, 0),

(0) (1) < 0, there is a root in the interval (0, 1),

(1) (2) < 0, there is a root in the interval (1, 2).

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.

Compiled by Zerihun M. Page 3


2.1 Bisection method
This method is based on the repeated application of the intermediate value theorem.
Bisection method is also known as the interval halving method. Bisection method is not the
fastest method available for finding roots of a function, but it is the most reliable method.
Once a has been bracketed, Bisection method will always close in on it.

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.

Fig. 3.1: Solution or root of f(x) = 0 between x = a and x = b


If f(a)f(b) < 0, then we bisect I = (a, b) at a point x =
 If f (a) f (x ) < 0, the true solution is between a and x .
 If f (a) f (x ) > 0, the true solution is between x and b.
 If f(x ) ≤ ∈, then accept x as the root and stop. ∈ is the error tolerance, ∈> 0.
Now the interval I = (a, x ) or I = (x , b) also contains the root. We bisect I and we get I .
Continuing this procedure, we obtain a sequence of nested subintervals I ⊃ I ⊃ I ⊃ ⋯ such
that each subinterval contains the root. After repeating the bisection method n times we either
find the root or finding the interval I of length which contains the root. If ϵ is the prescribed
error tolerance, then the approximate number of iterations required may be determined from the
( )
relation ≤ ϵ or n ≥ . Since n is an integer, we take n as the next nearest integer.
Bisection Method
 It always converge to the true root

 ( ) ∗ ( ) < 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.

Compiled by Zerihun M. Page 4


Example 1: Using Bisection Method determine a real root of the equation

f(x) = 8x − 2x − 1 = 0 correct up to two decimal places..

Solution: It is given that f(x) = 8x − 2x − 1. Then f(0) = −1 and f(1) = 5

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.

The second approximation:


0.5 + 1
x = = 0.75
2
f(0.75) = 0.875, which is positive.
Since f(0.5) is negative, while f(0.75) is positive. Therefore, the root lies between 0.5 and 0.75.
The third approximation:
0.5 + 0.75
x = = 0.625
2
f(0.75) = −0297, which is negative.
Therefore f(0.75) is positive, while f(0.625) is obtained negative. Therefore, the root lies
between 0.625 and 0.75.
The fourth approximation:
0.625 + 0.75
x = = 0.688
2

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:

= 2.269 – 2.314 = – 0.045, which is negative.


Therefore f(0.657) is negative and f(0.688) is positive so the root lies between 0.657 and
0.688.
The sixth approximation:

Compiled by Zerihun M. Page 5


Therefore f (0.673) is positive and f(0.657) is negative so the root lies between
0.657and 0.673.
The seventh 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.

The second approximation:

Compiled by Zerihun M. Page 6


Thus, f (2.75) is positive and f (2.5) is negative, therefore, the root lies between 2.5 and 2.75.
The third approximation:

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.

Compiled by Zerihun M. Page 7


Eighth approximation:

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.

Compiled by Zerihun M. Page 8


2.2 Method of False Position
The method of False Position (also called the Regular Falsi method, and the linear interpolation
method) is another well-known bracketing method. It is very similar to Bisection method with
the exception that it uses a different strategy to end up with its new root estimate. Rather than
bisecting the interval (a, b), it locates the root by joining f(a) and f(b) with a straight line. The
intersection of this line with the x-axis represents an improved estimate of the root.
In this method, we choose two points and such that ( ) and ( ) are of opposite signs.
Since the graph of = ( ) crosses the x-axis between these two points, a root must lie in
between these points. Consequently, ( ) ( ) < 0. Equation of theline joining points
( , ( )) and ( , ( )) is given by
f(x ) − f(x )
y − f(x ) = x − (x − x )
x −x
The point of intersection of this line with the x-axis is taken as the next approximation to the
root. Setting = 0 and replace by , we get
x −x
=x − f(x )
f(x ) − f(x )

The value of can also be put in the following form:


x f(x ) − x f(x )
=
f(x ) − f(x )

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:

Compiled by Zerihun M. Page 9


Second approximation:

Third approximation:

Fourth approximation:

Fifth approximation:

Compiled by Zerihun M. Page 10


Hence the root is approximated by 3.646 correct to three decimal places.
False-Position Method
 It always converge to the true root

 ( ) ∗ ( ) < 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

Compiled by Zerihun M. Page 12


f (5) = 2(5) – log (5) – 9 = 10 – 0.69897 – 9 = 0.30103
Therefore, a root of the equation lies between 4 and 5. Rewriting the equation as
1
= (log x + 9) = φ(x)
2
We start with x = 4.
1
x = φ(x ) = (log 4 + 9) = 4.80103
2
1
x = φ(x ) = (log 4.80103 + 9) = 4.84067
2
1
x = φ(x ) = (log 4.84067 + 9) = 4.84245
2
1
x = φ(x ) = (log 4.84245 + 9) = 4.84253
2
1
x = φ(x ) = (log 4.84253 + 9) = 4.84254
2
Hence, x = 4.8425 is the root correct to four decimal places.
Exercise
1. Find the smallest positive root of x = e– , correct to two decimal places.
2. Find the real root of the equation cos x = 3x – 1 correct to three decimal places.
3. Find the cube root of 15 correct to four significant figures by iterative method.
2.5 Newton - Rapson Method
Let f(x) = 0 be the equation for which we are assuming x be the initial approximation an h be
a small corrections to x , so that f(x + h) = 0.
Expanding it by Taylor’s series, we get
h
f(x + h) = f(x ) + hf ′(x ) + f (x ) + ⋯ = 0
2!
Since h is small, we can neglect second and higher degree terms in h and therefore, we get
f(x ) + hf ′ (x ) = 0
( )
From which we have, h = – ( )
Hence, if x be the initial approximation, then next (or first) approximation x is given by
f(x )
x =x +h =x −
f ′ (x )
The next and second approximation x is given by
f(x )
x =x −
f ′ (x )
( )
In general,x = x − ( ). This formula is well known as Newton-Raphson formula.
Geometrically, Newton Raphson formula is the point of intersection of the tangent line through
the point ( , f( ))with the x-axis. The process is repeated until the required accuracy is
obtained.

Compiled by Zerihun M. Page 13


Example1: Use Newton-Raphson method to find the real root near 2 of the equation
– 11 + 8 = 0 accurate to fivedecimal places.
Solution: Heref(x) = x – 11x + 8, f (x) = 4x – 11, =2
and ( ) = (2) = 24 – 11(2) + 8 = 2
( ) = ′(2) = 4(2)3 – 11 = 21
Therefore,
f(x )
x =x − = 1.90476
f ′ (x )
f(x )
x =x − = 1.89209
f ′ (x )
f(x )
x =x − = 1.89188
f ′ (x )
f(x )
x =x − = 1.89188
f ′ (x )
Hence the root of the equation is 1.89188.
Example 2: Evaluate √29 to five decimal places by Newton-Raphson iterative method.
Solution: Let x = √29 then x – 29 = 0.
We consider f (x) = x – 29 = 0 and f′(x) = 2x
The Newton-Raphson iteration formula gives
Now f(5) = 25 – 29 = – 4 < 0 and f(6) = 36 – 29 = 7 > 0.
Hence, a root of f(x = 0) lies between 5 and 6.
Taking x = 5.3 and by Newton-Raphson iteration formula
f(x )
x =x −
f ′ (x )
f(x )
x =x − = 5.38585
f ′ (x )
f(x )
x =x − = 5.38516
f ′ (x )
f(x )
x =x − = 5.38516
f ′ (x )
Since x = x up to five decimal places, √29 = 5.38516.
Exercise
1. √12 to four decimal places by Newton’s iterative method.
2. Find a positive root of (17) / correct to four decimal places by Newton-Raphson’s
method.
3. Find the real root of the equation x = e– using the Newton-Raphson’s method correct to four
decimal places.
4. Find the smallest real root of f(x) = 3x + sinx – e = 0, if we begin with x = 0 correct to
three decimal places.

Compiled by Zerihun M. Page 14

You might also like