Ch-2 Solution of Non Linear Equations
Ch-2 Solution of Non Linear Equations
Introduction
In this chapter we shall discuss some numerical methods for solving algebraic and transcendental
equations. The equation 𝑓 𝑥 = 0 is said to be algebraic if 𝑓(𝑥) is purely a polynomial in 𝑥. If
𝑓(𝑥) contains some other functions, namely, Trigonometric, Logarithmic, Exponential, etc., then
the equation 𝑓 𝑥 = 0 is called a Transcendental Equation.
One of the most common problem encountered in engineering analysis is that given a function
𝑓(𝑥), find the values of 𝑥 for which 𝑓 𝑥 = 0. The solution (values of 𝑥) are known as the roots
of the equation 𝑓 𝑥 = 0, or the zeroes of the function 𝑓(𝑥).
Theorem: If a function 𝑓(𝑥) assumes values of opposite sign at the end points of interval
(𝑎, 𝑏), i.e., 𝑓 𝑎 𝑓 𝑏 < 0 then the interval will contain at least one root of the equation 𝑓 𝑥 =
0, in other words, there will be at least one number 𝑐 ∈ (𝑎, 𝑏) such that 𝑓 𝑐 = 0.
There are two types of methods available to find the roots of algebraic and transcendental
equations of the form 𝑓 𝑥 = 0.
1. Direct Methods: These methods give the exact value of the roots (in the absence of round
off errors) in a finite number of steps and determine all the roots at the same time.
2. Iterative methods: These methods, also known as trial and error methods, are based on the
idea of successive approximations, i.e., starting with one or more initial approximations to
the value of the root, we obtain the sequence of approximations by repeating a fixed
sequence of steps over and over again till we get the solution with reasonable accuracy and
determine one or two roots at a time.
The indirect or iterative methods are further divided into two categories: bracketing and open
methods. The bracketing methods require the limits between which the root lies, whereas the
open methods require the initial estimation of the solution. 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.
Rate of Convergence
1
Bisection Method (Interval halving method)
This is one of the simplest iterative method and is strongly based on the property of intervals. To
find a root using this method, let the function 𝑓(𝑥) be continuous between 𝑎 and 𝑏 and 𝑓(𝑎)
𝑓 𝑏 < 0. Then there is a root of 𝑓 𝑥 = 0, lying between 𝑎 and 𝑏. Let the first approximation
1
be 𝑥1 = 2 (𝑎 + 𝑏) (i.e., average of the ends of the range).
Now, if 𝑓 𝑥1 = 0 then 𝑥1 is a root of 𝑓 𝑥 = 0. Otherwise, the root will lie between 𝑎 and 𝑥1
or 𝑥1 and 𝑏 depending upon whether 𝑓(𝑥1 ) 𝑓(𝑎) < 0 or 𝑓(𝑥1 ) 𝑓 𝑏 < 0 respectively.
Then, we bisect the interval and continue the process till the root is found to be desired accuracy.
In the above figure, 𝑓 𝑥1 𝑓 𝑎 < 0; therefore, the root lies in between 𝑎 and 𝑥1 . The second
1
approximation to the root now is 𝑥2 = 2 (𝑎 + 𝑥1 ). If 𝑓(𝑥2 ) is negative as shown in the figure
then the root lies in between 𝑥2 and 𝑥1 , and the third approximation to the root is
1
𝑥3 = 2 (𝑥1 + 𝑥2 ) and so on. This method is simple but slowly convergent. It is also called as
Bolzano method.
Procedure for the Bisection Method to Find the Root of the Equation 𝑓 𝑥 = 0
Step 1: Choose two initial guess values (approximation) 𝑎 and 𝑏 such that 𝑓 𝑎 𝑓 𝑏 < 0.
1
Step 2: Evaluate the mid point 𝑥1 of 𝑎 and 𝑏 given by 𝑥1 = 2 (𝑎 + 𝑏) and also evaluate 𝑓(𝑥1 ).
Step 3: If 𝑓 𝑎 𝑓 𝑥1 < 0, then set 𝑏 = 𝑥1 else set 𝑎 = 𝑥1 . Then apply the formula of step 2.
Step 4: Stop evaluation when the difference of two successive values of 𝑥1 obtained from
step 2, is numerically less than the prescribed accuracy.
2
Order of Convergence of Bisection Method
1 𝐸𝑘 +1 1
As the error decreases with each step by a factor of (i.e. = 2), then the convergence in the
2 𝐸𝑘
bisection method is linear.
Example: Find the root of equation 𝑥 3 − 𝑥 − 1 = 0 for the root lying between 1 and 2, correct
to two decimal places by bisection method.
3
From above iterations, the root of 𝑓 𝑥 = 𝑥 3 − 𝑥 − 1 = 0 up to two places of decimals is 1.32,
which is of desired accuracy.
Exercises 1: Using the bisection method solves the following equations.
3
1. Approximate 2 , correct to three decimal places.
2. 𝑥 3 − 9𝑥 + 1 = 0 for the root lying between 2 and 3, correct to three significant figures.
3. Perform five iterations to obtain the smallest positive root of 𝑓 𝑥 = 𝑥 3 − 5𝑥 + 1 = 0.
4. 3𝑥 − 𝑒 𝑥 = 0 for 1 ≤ 𝑥 ≤ 2, accurate to within 10−4 .
Exercises 2: Use the bisection method find the drag coefficient 𝑐 needed for a parachutist of
mass 𝑚 = 68.1 kg to have a velocity of 𝑣 = 40 𝑚/𝑠 after free-falling for time 𝑡 = 10 𝑠. Note:
𝑚𝑔 𝑐
The acceleration due to gravity is 𝑔 = 9.8 𝑚/𝑠 2 and 𝑓 𝑐 = 1 − 𝑒 −𝑡 𝑚 − 𝑣.
𝑐
False position method
4
Procedure for the False Position Method to Find the Root of the Equation 𝑓 𝑥 = 0
Note: The order (or rate) of convergence of false position method is 1.618.
5
6
Exercise 1: Using False position method, find a root of the function
7
𝑚
𝑘𝑔/𝑠, compute the mass 𝑚 so that the velocity is 𝑣 = 35 at 𝑡 = 9𝑠. Use the false-position
𝑠
method to determine m to a level of accuracy 0.1%.
Secant Method
Note: The rate of convergence for the Secant method as p = 1.618 is superliner .
−𝑥
Example: Compute root of the equation 𝑥2𝑒 2 = 1 in the interval [0, 2] using Secant method.
The root should be correct to three decimal places.
8
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 𝑓(𝑥) = 0 by successive approximations, we rewrite the given
equation in the form
𝑥 = 𝑔(𝑥)
Now, first we assume the approximate value of root (let 𝑥0 ), then substitute it in 𝑔(𝑥) to have a
first approximation 𝑥1 given by
𝑥1 = 𝑔(𝑥0 )
Similarly, the second approximation 𝑥2 is given by
𝑥2 = 𝑔(𝑥1 )
In general, 𝑥𝑖+1 = 𝑔(𝑥𝑖 )
Procedure For Iteration Method To Find The Root of The Equation 𝑓(𝑥) = 0
Step 1: Take an initial approximation as 𝑥0 .
Step 2: Find the next (first) approximation 𝑥1 by using 𝑥1 = 𝑔(𝑥0 ).
Step 3: Follow the above procedure to find the successive approximations 𝑥𝑖+1 by using
𝑥𝑖+1 = 𝑔 𝑥𝑖 , 𝑖 = 1, 2, 3, …
Step 4: Stop the evaluation where relative error ≤ 𝜀 , where 𝜀 is the prescribed accuracy.
Note 1: The iteration method 𝑥 = 𝑔(𝑥) is convergent if 𝑔′ (𝑥) < 1.
Note 2: When 𝑔′ (𝑥) > 1 ⇒ 𝑔′ 𝑥 > 1 or 𝑔′ 𝑥 < −1, the iterative process is divergent.
9
Note 3: The rate of convergence of iteration method is 1. In other words, iteration method
converges linearly.
Example: Find a real root correct up to four decimal places of the equation 2𝑥 – 𝑙𝑜𝑔10 𝑥 – 7 =
0 using iteration method.
Hence, the root of the equation correct to the four places of decimals is 3.7893.
Newton-Raphson Method
10
This formula is well known as Newton-Raphson formula or Newton’s method.
Algorithm for Newton-Raphson Method to Find the Root of the Equation 𝑓(𝑥) = 0
Step 1: Take a trial solution (initial approximation) as 𝑥0 . Find 𝑓 𝑥0 and 𝑓 ′ (𝑥0 )
Step 2: Follow the above procedure to find the successive approximations 𝑥𝑛+1 using the
𝑓 𝑥𝑛
formula 𝑥𝑛+1 = 𝑥𝑛 − 𝑓 ′ , where 𝑛 = 0, 1, 2, 3, …
𝑥𝑛
𝑥 𝑛 +1 −𝑥 𝑛
Step 3: Stop the process when ≤ 𝜀, where 𝜀 is the prescribed accuracy.
𝑥 𝑛 +1
11
Hence by definition, the order of convergence of Newton-Raphson method is 2 i.e., Newton
Raphson method is quadratic convergent. This also shows that subsequent error at each step is
proportional to the square of the previous error and as such the convergence is quadratic.
Example 1: Find the real root of the equation 𝑙𝑜𝑔 𝑥 – 𝑐𝑜𝑠 𝑥 = 0 correct to three places of
decimal by Newton-Raphson’s method.
12
Example 2: Evaluate 12 to four decimal places by Newton’s iterative method.
13
Exercise: Find by Newton’s method, the real root of the equation
14