You are on page 1of 6

Bisection method –

Bisection Method = a numerical method in Mathematics to find a root of a given function.

Root of a function f(x) = a value a such that f(a)=0.

The bisection method is used to find the roots of a polynomial equation. It separates the interval and
subdivides the interval in which the root of the equation lies. The principle behind this method is the
intermediate theorem for continuous functions.

A root of the equation f(x) = 0 is also called a zero of the function f(x). The Bisection Method, also called the
interval halving method, the binary search method, or the dichotomy method. is based on the Bolzano's
theorem for continuous functions.

Bisection Method Disadvantages (Drawbacks)


1) Slow Rate of Convergence: Although convergence of Bisection method is guaranteed, it is generally slow.
2) Choosing one guess close to root has no advantage: Choosing one guess close to the root may result in
requiring many iterations to converge.
3) Can not find root of some equations. ...
4) It has linear rate of convergence.

A Mathematical Property (Intermediate value theorem) –


If a function f(x) is continuous on the interval [a, b] and sign of f(a) ≠ sign of f(b), then there is a value c ∈
[a, b] such that f(c) = 0 i.e., there is a root c in the interval [a, b].
Example:

Brief of Bisection Method –


• The Bisection Method is a successive approximation method that narrows down an interval that
contains a root of the function f(x).
• The Bisection Method is given an initial interval [a,b] that contains a root (We can use
the property sign of f(a) ≠ sign of f(b) to find such an initial interval).
• The Bisection Method will cut the interval into 2 halves and check which half interval contains a root
of the function.
• The Bisection Method will keep cut the interval in halves until the resulting interval is extremely small
The root is then approximately equal to any value in the final (very small) interval.
Examples:
Suppose the interval [a, b] is as follows:

1|Page Unit-I (MATC-415)


We cut the interval [a, b] in the middle: m = (a+b)/2

Because sign of f(m) ≠ sign of f(a) , we proceed with the search in the new interval [a, b]:

We can use this statement to change to the new interval: b = m;

In the above example, we have changed the end point b to obtain a smaller interval that still contains a root
In other cases, we may need to changed the end point b to obtain a smaller interval that still contains a root
Here is an example where you have to change the end point a:
Initial interval [a, b]:

After cutting the interval in half, the root is contained in the right-half, so we have to change the end
point a:

2|Page Unit-I (MATC-415)


Example: Find the root of f(x) = x2 − 5 between [0, 4].
There is a root between [0,4] because::

f(0) = 02 − 5 = −5
f(4) = 42 − 5 = 11

Start:

a = 0; f(a) = -5
b = 4; f(b) = 11

Iteration 1:

m = (a + b)/2 = 2

f(m) = 22 − 5 = -1

Because f(m) < 0, we replace a with m

a = 2; f(a) = -1
b = 4; f(b) = 11

Iteration 2:

m = (a + b)/2 = 3

f(m) = 32 − 5 = 4

Because f(m) > 0, we replace b with m

a = 2; f(a) = -1
b = 3; f(b) = 4

Iteration 3:

m = (a + b)/2 = 2.5

f(m) = 2.52 − 5 = 1.25

Because f(m) > 0, we replace b with m

a = 2; f(a) = -1
b = 2.5; f(b) = 1.25

And so on....

3|Page Unit-I (MATC-415)


Example: Find a root of an equation 𝒇(𝒙) = 𝒙𝟑 − 𝒙 − 𝟏 = 𝟎 using Bisection method.
Solution:
Algorithm
Bisection method Steps (Rule)
Step-1: Find points a and b such that a<b and f(a)⋅f(b)<0.
Step-2: Take the interval [a,b] and
find next value x0=a+b2
Step-3: If f(x0)=0 then x0 is an exact root,
else if f(a)⋅f(x0)<0 then b=x0,
else if f(x0)⋅f(b)<0 then a=x0.
Step-4: Repeat steps 2 & 3 until f(xi)=0 or |f(xi)|≤Accuracy

Here 𝒙𝟑 − 𝒙 − 𝟏 = 𝟎

Let 𝒇(𝒙) = 𝒙𝟑 − 𝒙 − 𝟏

Here
x 0 1 2
f(x) -1 -1 5

1st iteration :

𝐻𝑒𝑟𝑒 𝑓(1) = −1 < 0 𝑎𝑛𝑑 𝑓(2) = 5 > 0

∴ 𝑁𝑜𝑤, 𝑅𝑜𝑜𝑡 𝑙𝑖𝑒𝑠 𝑏𝑒𝑡𝑤𝑒𝑒𝑛 1 𝑎𝑛𝑑 2

1+2
𝑥0 = = 1.5
2

𝑓(𝑥0) = 𝑓(1.5) = 0.875 > 0

2nd iteration :

𝐻𝑒𝑟𝑒 𝑓(1) = −1 < 0 𝑎𝑛𝑑 𝑓(1.5) = 0.875 > 0

∴ 𝑁𝑜𝑤, 𝑅𝑜𝑜𝑡 𝑙𝑖𝑒𝑠 𝑏𝑒𝑡𝑤𝑒𝑒𝑛 1 𝑎𝑛𝑑 1.5

1 + 1.5
𝑥1 = = 1.25
2

𝑓(𝑥1) = 𝑓(1.25) = −0.29688 < 0

3rd iteration :

𝐻𝑒𝑟𝑒 𝑓(1.25) = −0.29688 < 0 𝑎𝑛𝑑 𝑓(1.5) = 0.875 > 0

∴ 𝑁𝑜𝑤, 𝑅𝑜𝑜𝑡 𝑙𝑖𝑒𝑠 𝑏𝑒𝑡𝑤𝑒𝑒𝑛 1.25 𝑎𝑛𝑑 1.5

1.25 + 1.5
𝑥2 = = 1.375
2

𝑓(𝑥2) = 𝑓(1.375) = 0.22461 > 0

4th iteration :

𝐻𝑒𝑟𝑒 𝑓(1.25) = −0.29688 < 0 𝑎𝑛𝑑 𝑓(1.375) = 0.22461 > 0

∴ 𝑁𝑜𝑤, 𝑅𝑜𝑜𝑡 𝑙𝑖𝑒𝑠 𝑏𝑒𝑡𝑤𝑒𝑒𝑛 1.25 𝑎𝑛𝑑 1.375

4|Page Unit-I (MATC-415)


1.25 + 1.375
𝑥3 = = 1.3125
2

𝑓(𝑥3) = 𝑓(1.3125) = −0.05151 < 0

5th iteration :

𝐻𝑒𝑟𝑒 𝑓(1.3125) = −0.05151 < 0 𝑎𝑛𝑑 𝑓(1.375) = 0.22461 > 0

∴ 𝑁𝑜𝑤, 𝑅𝑜𝑜𝑡 𝑙𝑖𝑒𝑠 𝑏𝑒𝑡𝑤𝑒𝑒𝑛 1.3125 𝑎𝑛𝑑 1.375

1.3125 + 1.375
𝑥4 = = 1.34375
2

𝑓(𝑥4) = 𝑓(1.34375) = 0.08261 > 0

6th iteration :

𝐻𝑒𝑟𝑒 𝑓(1.3125) = −0.05151 < 0 𝑎𝑛𝑑 𝑓(1.34375) = 0.08261 > 0

∴ 𝑁𝑜𝑤, 𝑅𝑜𝑜𝑡 𝑙𝑖𝑒𝑠 𝑏𝑒𝑡𝑤𝑒𝑒𝑛 1.3125 𝑎𝑛𝑑 1.34375

1.3125 + 1.34375
𝑥5 = = 1.32812
2

𝑓(𝑥5) = 𝑓(1.32812) = 0.01458 > 0

7th iteration :

𝐻𝑒𝑟𝑒 𝑓(1.3125) = −0.05151 < 0 𝑎𝑛𝑑 𝑓(1.32812) = 0.01458 > 0

∴ 𝑁𝑜𝑤, 𝑅𝑜𝑜𝑡 𝑙𝑖𝑒𝑠 𝑏𝑒𝑡𝑤𝑒𝑒𝑛 1.3125 𝑎𝑛𝑑 1.32812

1.3125 + 1.32812
𝑥6 = = 1.32031
2

𝑓(𝑥6) = 𝑓(1.32031) = −0.01871 < 0

8th iteration :

𝐻𝑒𝑟𝑒 𝑓(1.32031) = −0.01871 < 0 𝑎𝑛𝑑 𝑓(1.32812) = 0.01458 > 0

∴ 𝑁𝑜𝑤, 𝑅𝑜𝑜𝑡 𝑙𝑖𝑒𝑠 𝑏𝑒𝑡𝑤𝑒𝑒𝑛 1.32031 𝑎𝑛𝑑 1.32812

𝑥7 = (1.32031 + 1.32812)/2 = 1.32422

𝑓(𝑥7) = 𝑓(1.32422) = −0.00213 < 0

9th iteration :

𝐻𝑒𝑟𝑒 𝑓(1.32422) = −0.00213 < 0 𝑎𝑛𝑑 𝑓(1.32812) = 0.01458 > 0

∴ 𝑁𝑜𝑤, 𝑅𝑜𝑜𝑡 𝑙𝑖𝑒𝑠 𝑏𝑒𝑡𝑤𝑒𝑒𝑛 1.32422 𝑎𝑛𝑑 1.32812

1.32422 + 1.32812
𝑥8 = = 1.32617
2

𝑓(𝑥8) = 𝑓(1.32617) = 0.00621 > 0

5|Page Unit-I (MATC-415)


10th iteration :

𝐻𝑒𝑟𝑒 𝑓(1.32422) = −0.00213 < 0 𝑎𝑛𝑑 𝑓(1.32617) = 0.00621 > 0

∴ 𝑁𝑜𝑤, 𝑅𝑜𝑜𝑡 𝑙𝑖𝑒𝑠 𝑏𝑒𝑡𝑤𝑒𝑒𝑛 1.32422 𝑎𝑛𝑑 1.32617

1.32422 + 1.32617
𝑥9 = = 1.3252
2

𝑓(𝑥9) = 𝑓(1.3252) = 0.00204 > 0

11th iteration :

𝐻𝑒𝑟𝑒 𝑓(1.32422) = −0.00213 < 0 𝑎𝑛𝑑 𝑓(1.3252) = 0.00204 > 0

∴ 𝑁𝑜𝑤, 𝑅𝑜𝑜𝑡 𝑙𝑖𝑒𝑠 𝑏𝑒𝑡𝑤𝑒𝑒𝑛 1.32422 𝑎𝑛𝑑 1.3252

1.32422 + 1.3252
𝑥10 = = 1.32471
2

𝑓(𝑥10) = 𝑓(1.32471) = − 𝟎. 𝟎𝟎𝟎𝟎𝟓 < 𝟎

Approximate root of the equation x3-x-1=0 using Bisection mehtod is 1.32471

n a f(a) b f(b) c=(a+b)/2 f(c) Update


1 1 -1 2 5 1.5 0.875 b=c
2 1 -1 1.5 0.875 1.25 -0.29688 a=c
3 1.25 -0.29688 1.5 0.875 1.375 0.22461 b=c
4 1.25 -0.29688 1.375 0.22461 1.3125 -0.05151 a=c
5 1.3125 -0.05151 1.375 0.22461 1.34375 0.08261 b=c
6 1.3125 -0.05151 1.34375 0.08261 1.32812 0.01458 b=c
7 1.3125 -0.05151 1.32812 0.01458 1.32031 -0.01871 a=c
8 1.32031 -0.01871 1.32812 0.01458 1.32422 -0.00213 a=c
9 1.32422 -0.00213 1.32812 0.01458 1.32617 0.00621 b=c
10 1.32422 -0.00213 1.32617 0.00621 1.3252 0.00204 b=c
11 1.32422 -0.00213 1.3252 0.00204 1.32471 -0.00005 a=c

Examples:
1. Find a root of an equation 𝑓(𝑥) = 𝑥 2 − 𝑠𝑖𝑛𝑥 − 0.5 = 0 in [0, 2] using Bisection method.
2. Find a root of an equation 𝑓(𝑥) = 2𝑥 3 − 2𝑥 − 5 = 0 in [0, 2] using Bisection method.
3. Find a root of an equation 𝑓(𝑥) = 𝑥 2 − 4𝑥 − 10 = 0 using Bisection method.
[Ans: x=5.7421875]

6|Page Unit-I (MATC-415)

You might also like