Num Chap 2 Edited
Num Chap 2 Edited
Numerical Methods
CEng2112
Chapter 2
Solving non-linear equations of one variable
Contents:-
2.1 Locating roots
2.2 Numerical methods of solving a non-linear equation
I. Bracketing Methods
Bisection Method
Method of false position
II. Open Methods
Iteration Method (Fixed point Iteration)
Secant Method
Newton - Raphson Method
Page 1 of 16
Numerical Methods [CEng2112] – Chapter 2: Solving non-linear equations
Introduction:
A problem of great importance in science and engineering is that of determining the roots/zeros of an
equation of the form ( ) .
Polynomial equations
Transcendental equations:
Exponential equations
Logarithmic equations
Trigonometric equations
Hyperbolic equations
b. ( ) d. ( )
Page 3 of 16
Numerical Methods [CEng2112] – Chapter 2: Solving non-linear equations
These methods are based on the idea of successive approximations. We start with one or two initial
approximations to the root and obtain a sequence of approximations * + which will converge to the
exact root.
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 ( ) is satisfied to a given accuracy or ( ) is bounded by an error
tolerance ε.
| ( )|
(ii) The magnitude of the difference between two successive iterates is smaller than a given
accuracy or an error bound ε.
| |
For example, if we require two decimal place accuracy, then we iterate until
| | .
If we require three decimal places accuracy, then we iterate until| | .
Here, we will see each iterative methods of solving a given non-linear equation ( )
Page 4 of 16
Numerical Methods [CEng2112] – Chapter 2: Solving non-linear equations
Let be the first estimate of the root, given by , which is the midpoint of
the interval
Make the following evaluations to determine the subinterval in which the root lies:
i. If ( ) then is the root of .
ii. If ( ) ( ) then the root lies in the subinterval , -
iii. If ( ) ( ) then the root lies in the subinterval , -
Continue the process until either we get the exact root or we may have an approximate
root with the required degree of accuracy.
The Bisection method generates a sequence * + of mid points of the reduced interval. i.e
( ) where
Absolute error ( ) | |
Now, to have an absolute error with tolerance of error and number of iteration ( ) should
satisfy:
( )
( )
Page 5 of 16
Numerical Methods [CEng2112] – Chapter 2: Solving non-linear equations
( )
1 2 3 2.5 5.6250 > 0
2 2 2.5 2.25 1.8906 > 0
3 2 2.25 2.125 0.3457 > 0
4 2 2.125 2.0625 -0.3513 < 0
5 2.0625 2.125 2.09375 -0.0089 < 0
( )
One of the shortcoming of bisection method is that, in dividing the interval , - no account is
taken of the magnitude of ( ) ( ) For example if ( ) is much closer to zero than
( ) then it is likely that the root is closer to than .
Page 6 of 16
Numerical Methods [CEng2112] – Chapter 2: Solving non-linear equations
An alternative method, false position that exploits this graphical insight is to join
( ) ( ) by a straight line (chord).
The intersection of this line with x-axis represents an improved estimate of the root.
The intersection of this line with the x-axis is the -intercept let which is the first
estimate of the root;
( ) ( )
( ) ( )
( )
( )
( ) ( )
Check the functional value of ( )
If ( ) then x3 is the exact root of ( )
If ( ) the root is in [x3, x2] (considering ( ) ), In this case join the
points ( ( )) & ( ( )) using st. line to get a better approximate root .
If ( ) then the root is in [x1, x3]. If so, join the points ( ( ))
( ( )) using straight line to get a better approximate root .
Continue the process by bracketing the root until the root is estimated adequately by;
Page 7 of 16
Numerical Methods [CEng2112] – Chapter 2: Solving non-linear equations
( )
( ) , for the interval , - that contains the root
( ) ( )
Assume that is continuous on [a, b] and there exists a number , - such that ( )
. If ( ) ( ) have opposite signs, and
( )
( ) ( ) ( )
represents the sequence of points generated by the false position process, then the sequence
converges to the zero .
That is, .
Termination criteria for a given tolerance of error : Here, we use the size of | ( )| as the
stopping criterion for it. | ( )|
Now find ( ) ( ) ( )
The root is in , -
Now use
( )
( ) ( ) ( )
( )( )
Page 8 of 16
Numerical Methods [CEng2112] – Chapter 2: Solving non-linear equations
etc.
II. Open Methods: these methods do not contain the root by an interval.
Page 9 of 16
Numerical Methods [CEng2112] – Chapter 2: Solving non-linear equations
Procedure:
A function ( ) for computing successive terms is needed, together with a starting value ,
Such that ( ). Then a sequence of values * + is obtained using the iterative rule
( ).
( )
Convergence of an iteration method depends on the choice of the iteration function ( ), and a
suitable initial approximation , to the root.
Page 10 of 16
Numerical Methods [CEng2112] – Chapter 2: Solving non-linear equations
The following two theorems establish conditions for the existence of a fixed point and the
convergence of the fixed-point iteration process to a fixed point.
Theorem (Existence and uniqueness): Assume that ( ) is continuous on [a, b], Then we
have the following conclusions.
(i). If the range of the mapping ( ) satisfies , - for all , -, then has
a fixed point in , -.
(ii). Furthermore, suppose that ( ) is defined over ( ) and that a positive constant
exists with | ( )| for all ( ) , then has a unique fixed point in
, -.
Theorem (conditions of convergence): Assume that the following hypothesis hold true.
Example: Use the method of simple iteration to find the root of the function ( ) ,
use
Solution
Take ( )
( )
Page 11 of 16
Numerical Methods [CEng2112] – Chapter 2: Solving non-linear equations
( )
( )
( )
( )
( )
Example 2: Use the method of simple iteration to find the root of ( ) .Take .
Solution: Let us consider the following two different ways:
I II
( ) ( )
( ) ( )
( ) ( )
( ) ( )
( ) ( )
( )
b. The Secant method: The secant method is an open method of root-finding algorithm that uses
a succession of roots of secant lines to better approximate a root of a function f. It resembles
totally the method of false position except that no attempt is made to ensure the root is enclosed.
This method needs two initial values (initial approximate roots).
Procedure: Let be the root of ( ) i.e ( ) , and assume be two
initial approximate roots of .
Page 12 of 16
Numerical Methods [CEng2112] – Chapter 2: Solving non-linear equations
Example: Use the secant method to approximate the root of ( ) with initial
approximations & & | ( )| < Tol =
Solution
( )
( )
Page 13 of 16
Numerical Methods [CEng2112] – Chapter 2: Solving non-linear equations
( ), - ( )
( ) ( )
And ( )
( ), - , -
( ) ( )
And ( )
( ), -
–
( ) ( )
And ( )
And ( )
....
Advantages and Disadvantages:
We are not sure about the convergence of the approximated roots to the exact root. But, the
process is simpler; because the sign of ( ) is not tested, and often converges faster
Exercise: Use the method of regula falsi method to find the root ( ) until
c. Newton - Raphson Method: This open method needs one initial value (approximate root)
Procedure:
Let denote the known approximate value of the root of ( ) then using Taylor series
expansion about we expand ( ) as:
( ) ( ) ( )( ) ( ) ( ) ( ) ( )
Replacing x by x1 we get:
( )
( )
Hence, successive approximate roots are given by Newton – Raphson iteration;
( )
( )
Page 14 of 16
Numerical Methods [CEng2112] – Chapter 2: Solving non-linear equations
OR, Geometrically, Newton – Raphson method consists in replacing the part of the curve between
the point ( ( )) & the -axis by means of the tangent line to the curve at point ( ( )) & is
shown as:
Example 1: Use the Newton - Raphson method to find a root of the equation with
initial value
Solution: ( )
( ) ,
( )
, n = 0, 1, 2 . . .
( )
Page 15 of 16
Numerical Methods [CEng2112] – Chapter 2: Solving non-linear equations
( )
Example 2: Find the positive root of ( ) using Newton – Raphson method taking
= 5 up to 3rd iteration.
nth root algorithm:- The principal nth root √ , , of a positive real number A, is the positive
real solution of the equation
( )
There is a very fast-converging nth root algorithm for finding √ i.e Newton's method;
The nth root problem can be viewed as searching for a zero of the function ( )
( )
( )
Page 16 of 16