Solutions of Equations in One Variable The Bisection Method
Solutions of Equations in One Variable The Bisection Method
Solutions of Equations in One Variable The Bisection Method
Book
Numerical Analysis (8th Edition)
R L Burden & J D Faires
Outline
Outline
Outline
Outline
A Zero of function f (x )
We now consider one of the most basic problems of numerical
approximation, namely the root-finding problem.
A Zero of function f (x )
We now consider one of the most basic problems of numerical
approximation, namely the root-finding problem.
This process involves finding a root, or solution, of an equation of
the form
f (x ) = 0
for a given function f .
A Zero of function f (x )
We now consider one of the most basic problems of numerical
approximation, namely the root-finding problem.
This process involves finding a root, or solution, of an equation of
the form
f (x ) = 0
for a given function f .
A root of this equation is also called a zero of the function f .
Outline
Overview
We first consider the Bisection (Binary search) Method which is
based on the Intermediate Value Theorem (IVT).
Overview
We first consider the Bisection (Binary search) Method which is
based on the Intermediate Value Theorem (IVT).
Suppose a continuous function f , defined on [a, b] is given with
f (a) and f (b) of opposite sign.
Overview
We first consider the Bisection (Binary search) Method which is
based on the Intermediate Value Theorem (IVT).
Suppose a continuous function f , defined on [a, b] is given with
f (a) and f (b) of opposite sign.
By the IVT, there exists a point p ∈(a, b) for which f (p) = 0. It
will be assumed that the root in this interval is unique.
Bisection Technique
Main Assumptions
Bisection Technique
Main Assumptions
Suppose f is a continuous function defined on the interval [a, b],
with f (a) and f (b) of opposite sign.
Bisection Technique
Main Assumptions
Suppose f is a continuous function defined on the interval [a, b],
with f (a) and f (b) of opposite sign.
The Intermediate Value Theorem implies that a number p exists in
(a, b) with f (p) = 0.
Bisection Technique
Main Assumptions
Suppose f is a continuous function defined on the interval [a, b],
with f (a) and f (b) of opposite sign.
The Intermediate Value Theorem implies that a number p exists in
(a, b) with f (p) = 0.
Although the procedure will work when there is more than one
root in the interval (a, b), we assume for simplicity that the root in
this interval is unique.
Bisection Technique
Main Assumptions
Suppose f is a continuous function defined on the interval [a, b],
with f (a) and f (b) of opposite sign.
The Intermediate Value Theorem implies that a number p exists in
(a, b) with f (p) = 0.
Although the procedure will work when there is more than one
root in the interval (a, b), we assume for simplicity that the root in
this interval is unique.
The method calls for a repeated halving (or bisecting) of
subintervals of [a, b] and, at each step, locating the half containing
p.
Bisection Technique
Computational Steps
To begin, set a1 = a and b1 = b, and let p1 be the midpoint of [a, b];
that is,
b − a1 a1 + b1
p1 = a1 + 1 = .
2 2
f (b)
y = f (x)
f (p1) p3
a = a1 p2 pp b = b1 x
1
f(p2)
f (a)
a1 p1 b1
a2 p2 b2
a 3 p3 b3
1. a1 = a, b1 = b, p0 = a;
2. i = 1;
1
3. pi = (ai + bi );
2
4. If |pi − p i−1 | < s or |f (pi )| < 𝜖 then 10;
5. If f (pi )f (ai ) > 0, then 6;
If f (pi )f (ai ) < 0, then 8;
6. ai+1 = pi , bi+1 = bi ;
7. i = i + 1; go to 3;
8. ai+1 = ai ; bi+1 = pi ;
9. i = i + 1; go to 3;
10. End of Procedure.
Outline
Solving f (x) = x 3 + 4x 2 − 10 = 0
|pn − p n−1 |
< 10−4.
|p n|
Solution
Because f (1) = −5 and f (2) = 14 the Intermediate Value
Theorem ensures that this continuous function has a root in [1, 2].
For the first iteration of the Bisection method we use the fact that
at the midpoint of [1, 2] we have f (1.5) = 2.375 > 0.
This indicates that we should select the interval [1, 1.5] forour
second iteration.
Then we find that f (1.25) =−1.796875 so our new interval
becomes [1.25, 1.5], whose midpoint is 1.375.
Continuing in this manner gives the values shown in the following
table.
Solution (Cont’d)
After 13 iterations, p13 = 1.365112305 approximates the root p
with an error
|p − p13| |b − a14|
< 14 ≤ 9.0 ×10−5,
|p| |a14|
Final Remarks
The Bisection Method has a number of significant drawbacks.
Firstly it is very slow to converge in that N may become quite large
before p − pN becomes sufficiently small.
Also it is possible that a good intermediate approximation may be
inadvertently discarded.
It will always converge to a solution however and, for this reason,
is often used to provide a good initial approximation for a more
efficient procedure.