Chapter Two: Solution of Non-Linear Equation

You might also like

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 30

Chapter Two

Solution of non-linear equation

08/24/2021 Mr. Desalegn A. 1


Introduction

• What is equation? • What is types of equation?

Linear vs. non-linear

Algebraic vs. Transcendental

08/24/2021 Mr. Desalegn A. 2


Introduction

• Equations f(x) = 0 is called • Equation f(x)=0 is called


an algebraic equation if the transcendental equation if
corresponding f (x) is a f(x) contains trigonometric,
polynomial. or exponential or logarithmic
functions.

• Example 7x2 + x - 8 = 0 is • Examples of transcendental

an algebraic equation. equations are sin x–x = 0

08/24/2021 Mr. Desalegn A. 3


Numerical solution

• Solving mathematical equations is an important


requirement for various branches of science and
engineering.
• The field of numerical analysis explores the
techniques that give approximate solutions to such
problems with the desired accuracy.

08/24/2021 Mr. Desalegn A. 4


Computer based solutions

The major steps involved to solve a given problem using a


computer are:

1. Modeling

2. Choose appropriate numerical method

3. Develop computer algorithm

4. Execution

5. Interpretation of results
08/24/2021 Mr. Desalegn A. 5
Solution Methods

• There are two types of methods available to find the roots of


equations.

Direct Method Indirect Method


It give the exact value of the It is based on concept of
roots successive approximations

Quadratic equation
1. Open methods
2. Bracketing methods

08/24/2021 Mr. Desalegn A. 6


Methods…

Bracketing methods Open methods

• It require the limits between • It require the initial


which the root lies estimation of the solution
Examples Examples
1. Bisection method 1. Newton Rahpson method
2. False position method 2. Secant method

08/24/2021 Mr. Desalegn A. 7


Bisection Method

• It is bracketing methods for finding roots of


an equation
• It is based on the concept of intermediate
value theorem for continuous functions.

What is intermediate value theorem ?

08/24/2021 Mr. Desalegn A. 8


Algorithm of Bisection method

1. Find a and b in which f(a) and f(b) are opposite signs for the

given equation using trial and error method.

2. Assume initial root as xo = (a+b)/2.

3. If f(x0)is negative, the root lies between a and xo and take the

root as x1 = ( xo +a)/2. Else x1 = ( xo +b)/2.

4. Repeat the above process until any two consecutive values are

equal or the iteration terminated and hence the root is last

iterative value
08/24/2021 What
Mr. Desalegnare
A. termination criteria ?9
Criterion for termination

4. A convenient criterion is to
compute the percentage error
1. Termination after N steps (N
is defined by;
given, fixed)

2. Termination if(xn+1 - xn ≤Ԑ x n  x n 1
er  x 100 %
(Ԑ> 0 given) xn

3. Termination if f(xn)≤α (α>0 • The computations can be

given). terminated when relative


error becomes less than a
prescribed tolerance.

08/24/2021 Mr. Desalegn A. 10


Examples

1. Find the positive root of x3 – x = 1


correct to four decimal places by
bisection method.
Solution

08/24/2021 Mr. Desalegn A. 11


Continued…

08/24/2021 Mr. Desalegn A. 12


Continued…

08/24/2021 Mr. Desalegn A. 13


Bisection Method

Merits of bisection method


• The iteration using bisection method always produces a root

• As iterations are conducted, the length of the interval gets halved. So one

can guarantee the convergence in case of the solution of the equation.

• The Bisection Method is simple to program in a computer.

08/24/2021 Mr. Desalegn A. 14


Continued…
Demerits of bisection method
• The convergence of the bisection method is slow as it is simply based on
halving the interval.
• Bisection method cannot be applied over an interval where there is a
discontinuity.
• Bisection method cannot be applied over an interval where the function
takes always values of the same sign.
• The method fails to determine complex roots.

• If one of the initial guesses a or b is closer to the exact solution, it will take
larger number of iterations to reach the root

08/24/2021 Mr. Desalegn A. 15


Exercises
Exercises
Find a real root of the following
equations by bisection method.

08/24/2021 Mr. Desalegn A. 16


Regula Falsi method

• It is bracketing methods • It is based on the


concept of intermediate
value theorem

08/24/2021 Mr. Desalegn A. 17


Algorithm

08/24/2021 Mr. Desalegn A. 18


Example

Example:

Solve for a positive root of x3 -4x+1=0 by and Regula Falsi


method

08/24/2021 Mr. Desalegn A. 19


Continued…

Your Text Here

08/24/2021 Mr. Desalegn A. 20


Continued…

08/24/2021 Mr. Desalegn A. 21


Theoretical Exercises

1. What is the difference between algebraic and


transcendental equations?
2. Why we are using numerical iterative methods for solving
equations?
3. Based on which principle, the bisection and regula-falsi
method is developed?
4. What are the advantages and disadvantages of the
bracketing methods ?

08/24/2021 Mr. Desalegn A. 22


Newton-Raphson method

• It is an open method
• It has fastest convergence rate
• Let’s consider graph below

Please drive Newton’s Formula.

08/24/2021 Mr. Desalegn A. 23


Algorithm

08/24/2021 Mr. Desalegn A. 24


Example

Find the positive root of f(x) = 2x3- 3x-6 =0 by Newton –


Raphson method correct to five decimal places.

08/24/2021 Mr. Desalegn A. 25


Continued…

08/24/2021 Mr. Desalegn A. 26


The Secant Method

• We have seen that the Newton-Raphson method requires the

evaluation of derivatives of the function and this is not always

possible, particularly in the case of functions arising in

practical problems.

08/24/2021 Mr. Desalegn A. 27


Secant…

In the secant method, the derivative at f at xn is approximated


by the formula

f ( xn )  f ( xn  1)
f ' ( xn ) 
xn  xn  1
Then Newton formula becomes

f ( xn )( x n  x n  1 )
x n 1  x n 
f ( xn )  f ( xn  1 )

08/24/2021 Mr. Desalegn A. 28


Final exercise

Develop MATLAB program of the following root


finding methods
1. Bisection
2. Newton method
3. Secant method

08/24/2021 Mr. Desalegn A. 29


Thank you

08/24/2021 Mr. Desalegn A. 30

You might also like