0% found this document useful (0 votes)
232 views

Bisection Method

The bisection method is a root-finding algorithm that uses the intermediate value theorem. It works by repeatedly bisecting an interval and narrowing in on a root. It will always converge to a root, but not necessarily a specific root. The error decreases by a factor of 2 each iteration, so it has linear convergence with an asymptotic error rate of 1/2. The stopping criteria can be when the absolute error is less than some tolerance value ε.

Uploaded by

Sandeep Bhatt
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)
232 views

Bisection Method

The bisection method is a root-finding algorithm that uses the intermediate value theorem. It works by repeatedly bisecting an interval and narrowing in on a root. It will always converge to a root, but not necessarily a specific root. The error decreases by a factor of 2 each iteration, so it has linear convergence with an asymptotic error rate of 1/2. The stopping criteria can be when the absolute error is less than some tolerance value ε.

Uploaded by

Sandeep Bhatt
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/ 13

Numerical Analysis

Bisection Method
Introduction:

• Root Finding methods are divided into two categories: Simple


enclosure methods and Fixed point iteration methods.

• All simple enclosure methods are based on Intermediate Value


Theorem.

• Bisection method is type of simple enclosure method.


Intermediate Value Theorem:
Let 𝑓 be a continuous function over the closed interval 𝑎, 𝑏 and let 𝑘 be any real
number that lies between 𝑓(𝑎) and 𝑓(𝑏). Then there exists a real number 𝑐 such
that 𝑎 < 𝑐 < 𝑏 and
𝑓 𝑐 = 𝑘.

y = f(x)

a b
Bisection Method :

Let us consider the function 𝑓(𝑥) on interval 𝑎, 𝑏


First Iteration: 𝑎1 = 𝑎, 𝑏1 = 𝑏
𝑎1 +𝑏1
If 𝑓 𝑎1 𝑓 𝑏1 < 0, calculate 𝑝1 =
2
Second Iteration:
∙ If 𝑓 𝑎1 𝑓 𝑝1 < 0, then 𝑎2 = 𝑎1 , 𝑏2 = 𝑝1
𝑎2 +𝑏2
calculate 𝑝2 =
2
∙ If 𝑓 𝑝1 𝑓 𝑏1 < 0, then 𝑎2 = 𝑝1 , 𝑏2 = 𝑏1
𝑎2 +𝑏2
calculate 𝑝2 =
2
And so on.

This sequence {𝑝𝑛 } will converge to a root of 𝑓 𝑥 .


Bisection Method in Action:
Consider the function 𝑓 𝑥 = 𝑥 3 − 2𝑥 2 − 𝑥 + 2 on [−3,0]
First Iteration: Let 𝑎1 = −3, 𝑏1 = 0
𝑓 𝑎1 = 𝑓 −3 = −40 and 𝑓 𝑏1 = 𝑓 0 = 2
Since 𝑓 𝑎1 𝑓 𝑏2 < 0, therefore root lies on the interval [𝑎1 , 𝑏1 ].
−3+0
∴ 𝑝1 = = −1.5
2
𝑓 𝑝1 = 𝑓 −1.5 = −4.375

Second Iteration: Since 𝑓 −1.5 𝑓 0 < 0, hence root lies on [-1.5,0]. So choose 𝑎2 =
− 1.5, 𝑏2 = 0
−1.5+0
∴ 𝑝2 = = −0.75
2
𝑓 𝑝2 = 𝑓 −0.75 = 1.203
Third Iteration: Since 𝑓 −1.5 𝑓 −0.75 < 0, hence root lies on [-1.5,-0.75]. So choose 𝑎3 =
− 1.5, 𝑏3 = −0.75
−1.5−0.75
∴ 𝑝3 = = −1.125
2
𝑓 𝑝3 = 𝑓 −1.125 = −0.83

Fourth Iteration: Since 𝑓 −1.125 𝑓 −0.75 < 0, hence root lies on [-1.125,-0.75]. So
choose 𝑎4 = −1.125, 𝑏2 = −0.75
−1.125−0.75
∴ 𝑝4 = = −0.9375
2
𝑓 𝑝4 = 𝑓 −0.9375 = 0.3557

Hence, after fourth iteration our approximate root is -0.9375. Exact root of the function 𝑓(𝑥)
on [-3,0] is 𝑥 = 1.
Convergence Analysis:
Theorem: Let f be continuous on the interval 𝑎, 𝑏 and suppose that 𝑓 𝑎 𝑓 𝑏 < 0.
The bisection method generates a sequence of approximations {𝑝𝑛 } which
converges to a root 𝑝 ∈ (𝑎, 𝑏) with the property

𝑏−𝑎
𝑝𝑛 − 𝑝 ≤ 𝑛
2
𝑎2 𝑎2 + 𝑏2
𝑝2 = 𝑏2
2

𝑎3 + 𝑏3
𝑎3 𝑝3 = 𝑏3
2
𝑎1 𝑎1 + 𝑏1 𝑝
𝑝1 = 𝑏1
2

Figure 1: Construction of intervals for Bisection method


Proof: By previous diagram we can see that,

for each 𝑛 ∈ ℕ, 𝑝𝑛 is a mid point of [𝑎𝑛 , 𝑏𝑛 ] and 𝑝 ∈ [𝑎𝑛 , 𝑏𝑛 ].

𝑏𝑛 −𝑎𝑛
Hence, 𝑝𝑛 − 𝑝 ≤ for all 𝑛 ∈ ℕ (1)
2

Also, by construction of intervals [𝑎𝑛 , 𝑏𝑛 ], we can say that

1 1 1
𝑏𝑛 − 𝑎𝑛 = 𝑏𝑛−1 − 𝑎𝑛−1 = 2 𝑏𝑛−2 − 𝑎𝑛−2 = ⋯ = 𝑛−1 |𝑏1 − 𝑎1 |
2 2 2
1
Since, 𝑏1 = 𝑏 and 𝑎1 = 𝑎, therefore 𝑏𝑛 − 𝑎𝑛 = |𝑏 − 𝑎| (2)
2𝑛−1
By equation (1) and 2 ,

1 1
𝑝𝑛 − 𝑝 ≤ ∙ 𝑛−1 𝑏 − 𝑎
2 2
1
⟹ |𝑝𝑛 − 𝑝| ≤ 𝑛 |𝑏 − 𝑎| hence proved.
2

Note:
(1) The sequence of approximation generated by bisection method is always
guaranteed to be converge to a root of 𝑓 𝑥 = 0.

(2) Since 𝑒𝑛 = |𝑝𝑛 − 𝑝 | is error for approximation. Therefore, the above theorem
provides us a theoretical error bound for bisection method.

1
(3) Rate of convergence of bisection method is 𝑂 .
2𝑛
Important Remark:

1. For a function 𝑓(𝑥) that has root(s) on the interval 𝑎, 𝑏 , bisection method
guarantees that it will converge (always) to a root of 𝑓 𝑥 , not to any specific
root. There can be multiple roots on an interval. There is no way to know, a
priori, which root the method will converge.

2. Since |𝑝𝑛 − 𝑝| is the absolute error in the approximation 𝑝𝑛 , the expression on


the RHS of the inequality is referred as “Theoretical Error Bound”.

3. The requirement that on an interval a, b 𝑓 𝑎 𝑓 𝑏 < 0 means that bisection


method fails to find roots of even multiplicity in the interval 𝑎, 𝑏 .
Order of Convergence of Bisection method is 1:
We have to show that
|𝑒𝑛+1 ≈ 𝜆 𝑒𝑛 ≈ 𝜆2 𝑒𝑛−1 ≈ ⋯ ≈ 𝜆𝑛 𝑒1 = 𝜆𝑛 𝑝1 − 𝑝|

From previous theorem we can see that,


1
𝑒𝑛+1 = 𝑝𝑛+1 − 𝑝 ≤ 𝑛+1 (𝑏 − 𝑎) (1)
2

1 1 𝑏−𝑎
For large value of 𝑛, 𝑛 𝑝1 − 𝑝 ≈ 𝑛 (2)
2 2 2
Therefore, by equation (1) and 2 :
1
𝑒𝑛+1 ≈ 𝑛 |𝑒1 |
2
Hence, Bisection method has order of convergence 1 with asymptotic error
1
constant .
2
Stopping Condition:
The stopping condition for an iterative procedure is a condition that informs us when
to stop the iterations. It can depend on the accuracy of the solution, time taken for
the computation etc. For root finding methods, there are three measure of
convergence with which we can construct stopping condition:

1. The absolute error in the location of the root.


Terminate the iteration when 𝑝𝑛 − 𝑝 < 𝜖
2. The relative error in the location of the root.
Terminate the iteration when 𝑝𝑛 − 𝑝 < 𝜖 𝑝𝑛
3. The test for a root
Terminate the iteration when |𝑓 𝑝𝑛 | < 𝜖

where 𝜖 is referred as convergence tolerance.


Algorithm:
Given: function 𝑓(𝑥) on interval [𝑎, 𝑏], convergence tolerance 𝜖

Step 1: Set Check 𝑓 𝑎 𝑓 𝑏 < 0.

𝑎+𝑏
Step 2: Calculate 𝑝 =
2
If 𝑓 𝑎 𝑓 𝑝 < 0, then a = a, 𝑏 = 𝑝
If 𝑓 𝑝 𝑓 𝑏 < 0, then a = p, 𝑏 = 𝑏

𝑏−𝑎
If < 𝜖, stop the iteration and print 𝑝 ; otherwise repeat step 2 .
2

Note: There is no limitation on number of iteration for this algorithm.

You might also like