Professional Documents
Culture Documents
2-Graphical and Bisection Method-22!07!2022
2-Graphical and Bisection Method-22!07!2022
2-Graphical and Bisection Method-22!07!2022
Process Engineering
1
Nonlinear algebraic Equations
• Algebraic
• e.g. Polynomials are simple class of algebraic functions
• Transcendental – non algebraic functions, which includes trigonometric, exponential, logarithmic and less
familiar functions
• e.g. ,
3
Finding roots of quadratic equation
Solve x2 – 3x – 4 = 0 Solve x2 – 4 = 0
For a Quadratic equation of ax2 + bx + c, the solution or the roots of the equation is
4
Graphical solutions
Trial and error Method: 0, +1, -1 +2, -2, +3, -3, +4, -4, +5, -5……
5
Example – Quadratic equation
A brick is thrown from a top of a building at a speed of 25 m/s and the building is
150 m height. Derive an equation to find the time at which the brick reaches the
ground
Solution: The distance covered by the brick is given by
9.81
150 = 25𝑡 + 𝑡
2
6
Bisection Method
• The Bisection method in mathematics is a root finding method which repeatedly bisects an interval and then
selects a subinterval in which a root must lie for further processing.
• An equation f(x) =0
f (x)
Theorem
7
f (x)
Theorem
If function f(x) is a real and continuous
between the interval xl and xu
Theorem
If function f(x) is a real and continuous
between the interval xl and xu
8
Theorem
If function f(x) is a real and continuous
between the interval xl and xu
Solve
Please check
(1) x3 + 2x2 + 3 x - 4 = 0 with in the limits [0,1]
what will happen
if the Limits of
(2) x3 - 2.7 x2 + 4.5 x – 6 = 0 with in the limits [1,3]
the problem (2)
becomes [1.5, 4]
9
Advantages and drawbacks BS Method
Advantages
• Always convergent
• Error can be controlled - guaranteed
Drawbacks
• convergence is slow, if
one of the initial guesses
is close to the root
•e.g. f(x) = sin(x)
For case 1: Take the limits [2, 4]
For case 2: Take the limits [3, 4]
10
Drawbacks BS Method
e.g. f(x)=1/x
11
Algorithm for the bisection method
Step - 1
Choose x and xu as two guesses for the root such that f (x ) f (xu ) 0 , or in other words,
f (x) changes sign between x and xu
Step - 2
Estimate the root, xm , of the equation f (x) 0 as the mid-point between x and xu as
Step - 3
Now check the following
a) If f (x ) f (x m ) 0 , then the root lies between x and xm ; then x x and
xu x m .
b) If f (x ) f (x m ) 0 , then the root lies between xm and xu ; then x xm and
xu xu .
c) If f (x ) f (x m ) 0 ; then the root is xm . Stop the algorithm if this is true.
12
Step - 4
Find the new estimate of the root
x x
xm = u
2
Step - 5
Find the absolute relative approximate error as
x nme w - x oml d
a = 100
x nme w
where
xmnew = estimated root from present iteration
xmold = estimated root from previous iteration
Compare the absolute relative approximate error a with the pre-specified relative error tolerance s
13
Finding roots using simple commands
Use “fzero” command in Matlab
o
o Use “Goal Seek” option in Excel
>> x = fzero(@(x)x^3-2.7*x^2+4.5*x-6,x0);
One can also use
“solver” option in
MS - Excel