Unit 1 NM I-Bracketing Methods-Bisection Method-1
Unit 1 NM I-Bracketing Methods-Bisection Method-1
Unit 1 NM I-Bracketing Methods-Bisection Method-1
Welcome!!
Session 4
Bracketing methods for
finding out roots of
equations
Bracketing methods
• Now we will study the methods that exploit the fact that a function
typically changes sign in the vicinity of a root.
• This is useful for providing rough initial guesses required for graphical
methods.
Bisection method
Step 1: Choose lower x1 and upper x2 guesses for the root such that the
function changes sign over the interval.
This can be checked by ensuring that f (x1)*f(x2) < 0 or
Sign of f(x1) and f(x2) are opposite.
x1
x x3 x2
x1 x3
x x2
F(x3)
f(x1)
X3 = (x1 + x2 )/2
Y = f(x)
f(x2)
x1 x3
x x2
F(x1) F(x3)
X3 = (x1 + x2 )/2
Bisection method
3 2
𝑓 𝑥 = 𝑥 − 𝑥 − 20
Step 1: let’s assume initial guess starting from 0 with the step size of 1.
First guess x = 0 and f(x) = - 20
Second guess x = 1 and f(x) = - 20
Third guess x = 2 and f(x) = - 16
Fourth guess x = 3 and f(x) = - 2
Fifth guess x = 4 and f(x) = 28
Sixth guess x = 5 and f(x) = 80
The sign of function changes between guesses 3 and 4,
hence select x1 = 3 and x2 = 4
OR
Also check whether f (x1)*f(x2) < 0
x = 3 and f(x) = - 2 and x = 4 and f(x) = 28
So f (x1)*f(x2) = - 2*28 = -56 which is < 0
Hence initial guesses are correct.
Step 2: Find out x3 which is nothing but next approximated root bracketing
first two initial guesses.
x3 = (x1 + x2) / 2 i.e. = (3 + 4) /2 = 3.5
Bisection method
3 2
𝑓 𝑥 = 𝑥 − 𝑥 − 20
Step 3: Find f (x3) and check the sign.
x3 = 3.5 hence f(x3) = 10.62 (Positive)