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

Ch-2 Solution of Non Linear Equations

This document discusses numerical methods for solving algebraic and transcendental equations of the form f(x) = 0. There are direct and iterative methods. Iterative methods, also called indirect or trial-and-error methods, use successive approximations to obtain solutions. Popular iterative methods include bisection, false position, secant, and Newton-Raphson. Bisection uses interval halving to bracket roots. False position updates an interval based on the function values at its endpoints. Secant uses a secant line to estimate roots. Newton-Raphson uses tangent lines to quickly converge on simple roots. Examples are provided for each method.

Uploaded by

Abel Taye
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)
275 views14 pages

Ch-2 Solution of Non Linear Equations

This document discusses numerical methods for solving algebraic and transcendental equations of the form f(x) = 0. There are direct and iterative methods. Iterative methods, also called indirect or trial-and-error methods, use successive approximations to obtain solutions. Popular iterative methods include bisection, false position, secant, and Newton-Raphson. Bisection uses interval halving to bracket roots. False position updates an interval based on the function values at its endpoints. Secant uses a secant line to estimate roots. Newton-Raphson uses tangent lines to quickly converge on simple roots. Examples are provided for each method.

Uploaded by

Abel Taye
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 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

Definition: An iterate method is said to be of order 𝑝 or has the rate of convergence 𝑝, if 𝑝 is


the largest positive number for which there exists a finite constant 𝑐 ≠ 0 such that
|𝑒𝑘+1 | ≤ 𝑐 𝑒𝑘 𝑝 where 𝑒𝑘 = 𝑥𝑘 − ξ is the error in the 𝑘 𝑡𝑕 iterate.

We present the following indirect or iterative methods with illustrative examples:

1. Bisection Method 4. Iteration Method and


2. Regular Falsi Method 5. Newton-Raphson Method
3. Secant Method (Newton’s method)

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.

Example: Find a real root of the equation 𝑓 𝑥 = 𝑥 3 − 2𝑥 − 5 = 0 by the method of false


position up to three places of decimal.

5
6
Exercise 1: Using False position method, find a root of the function

1. 𝑓 𝑥 = 𝑒 𝑥 − 3𝑥 2 to an accuracy of four decimal places in 0.5, 1


2. 𝑓 𝑥 = 𝑐𝑜𝑠𝑥 − 3𝑥 + 5 correct to four decimal places.
3. 𝑓 𝑥 = 𝑥 2 − log 𝑒 𝑥 − 12 correct to three decimal places.

Exercise 2: The velocity 𝑣 of a falling parachutist is given by


𝑚𝑔 𝑐
𝑣= 1 − 𝑒 −𝑡 𝑚 where 𝑔 = 9.8 𝑚/𝑠 2 . For a parachutist with a drag coefficient 𝑐 = 15
𝑐

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%.

Exercise 3: Water is flowing in a trapezoidal channel at a rate of 𝑄 = 20 𝑚3 /𝑠. The critical


𝑄2
depth 𝑦 for such a channel must satisfy the equation 0 = 1 − 𝑔𝐴 3 𝐵 where 𝑔 = 9.8 𝑚/𝑠 2 ,
𝑐
2
𝐴𝑐 = the cross-sectional area (𝑚 ), and 𝐵 = the width of the channel at the surface (𝑚). For this
case, the width and the cross-sectional area can be related to depth 𝑦 by 𝐵 = 3 + 𝑦 and
𝑦2
𝐴𝑐 = 3𝑦 + . Solve for the critical depth using (a) bisection, and (b) false position. Use initial
2
guesses of 𝑥𝑙 = 0.5 and 𝑥𝑢 = 2.5, and iterate until the approximate error falls below 1% or the
number of iterations exceeds 10. Discuss your results.

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

This method can be derived from Taylor’s series as follows:


Let 𝑓(𝑥) = 0 be the equation for which we are assuming 𝑥0 be the initial approximation and
𝑕 be a small corrections to 𝑥0 , so that 𝑓 𝑥0 + 𝑕 = 0.
Expanding it by Taylor’s series, we get
𝑕2
𝑓 𝑥 = 𝑓 𝑥0 + 𝑕 = 𝑓 𝑥0 + 𝑕𝑓 ′ 𝑥0 + 𝑓 ′′ 𝑥0 + ⋯ = 0.
2!
Since 𝑕 is small, we can neglect second and higher degree terms in 𝑕 and therefore, we get
𝑓 𝑥0 + 𝑕𝑓 ′ 𝑥0 = 0
𝑓 𝑥0
From which we have, 𝑕 = − 𝑓 ′ where 𝑓 ′ 𝑥0 ≠ 0
𝑥0
Hence, if 𝑥0 be the initial approximation, then next (or first) approximation 𝑥1 is given by
𝑓 𝑥0
𝑥1 = 𝑥0 + 𝑕 = 𝑥0 − 𝑓 ′ 𝑥0
The next and second approximation 𝑥2 is given by
𝑓 𝑥1
𝑥2 = 𝑥1 − 𝑓 ′ 𝑥1
𝑓 𝑥𝑛
In general, 𝑥𝑛+1 = 𝑥𝑛 − 𝑓 ′ 𝑥𝑛

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

Order (or Rate) of Convergence of Newton-Raphson Method

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

a. 𝑥 4 − 11𝑥 + 8 = 0, correct to five decimal places and the root near 2.


b. 3𝑥 = 𝑐𝑜𝑠𝑥 + 1, correct to four decimal places.
c. 𝑥 log10 𝑥 = 1.2, correct to five decimal places.
d. 𝑥 = 𝑒 −𝑥 , correct to four decimal places.

14

You might also like