Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
MAT 295
Chapter 10
Bisection
Method
At the end of this chapter, students should be able to:
10.1 Introduction
Chapter 10 shall discuss one of the most basic problems in numerical
analysis: finding values of a variable x that satisfy the equation f ( x ) 0 . A
solution to this problem is called a zero of f (x ) or a root of f (x ) . In this
chapter, the focus of our discussion will be on solving non-linear equations.
Before further discussion, lets take a look at some classes of functions:
(a)
linear functions:
f ( x ) ax b
(b)
polynomials (non-linear):
f ( x ) an x n an 1x n 1 an 2 x n 2 ... a2 x 2 a1x a0 ,
(c)
f ( x ) e x 3 ln 2x
135
n 1
MAT 295
(ii)
y=f(x)
y=f(x)
x
r
0
root
root
x
y=g(x)
Figure 10.1
Definition
Given an equation f ( x ) 0 , the function f (x ) is non-linear if it is not of the
form ax b .
Definition
If a function f (x ) is continuous on the interval (a, b) and if f (a) and f (b )
have different signs (one positive and one negative) or f (a) f (b) 0 , then
there exists at least one real root on the interval (a, b) .
136
MAT 295
Take a note that the definition demands that the function f (x ) be continuous
on the given interval. Figure 10.2 shows two cases that may occur
if f (a) f (b) 0 .
y
f(b)
f(b)
0
a
0
f(a)
f(a)
Figure 10.2
Example 1
Show that f ( x ) x 3 has a root in the interval [-1, 2].
Solution
a = -1 and
b=2
or
x3 0
f (2) 8
Since f (2) f (1) 0 it can be concluded that there exists a root in [-1, 2].
137
MAT 295
Example 2
Given x 3 x 1 0 , show that one of the solutions of the equation lies
between -2 and 1.
Solution
[-2, 1]
a = -2 and
b=1
x3 x 1 0
or
h(2) 5
h(1) 1
h( x ) x 3 x 1
Example 3
Let e x x 2 0 . Determine the interval of the root of the function of
interest.
Solution
f (x) ex x 2
In order to determine the interval of the root, lets plot the graph. There
are two options to do this.
(i)
Plot f ( x ) e x x 2 or
(ii)
138
(a) f ( x ) e x x 2
MAT 295
(b) h( x ) e x and g( x ) 2 x
Figure 10.3
Based on Figure 10.3 it can be shown that there exists a root in [0, 1].
Example 1 3 showed the existence of a root between given intervals. The
examples did not provide the procedure to determine the root. There are a
number of procedures that can be used to locate the desired root.
Warm up exercise
f ( x ) x 3 6 x 16
(iii)
[1, 2]
2 , 2
1 x
ln
0
1 x 2
139
MAT 295
r1
r2
r3
f(b)
0
f(a)
Figure 10.4
140
MAT 295
Example 4
The solution of the equation x 3 0 is known to exist between the values 1 and 2. Apply the Bisection method with 3 iterations to reduce the interval
of the root.
Solution
x3 0
f (x) x3
or
f (x) x3
a = -1 and
f ( 1) 1
b=2
f (2) 8
f ( 1) f (2) ( 1)(8)
8 0
Compute c
and
ab
2
1 2
0.5
2
f (0.5) 0.125
Determine
MAT 295
f (x) x3
Root in
Bisection
-1
-1.000
8.000
[-1, 2]
0.5
0.125
[-1, 0.5]
-0.25
-0.25
-0.016
[-0.25, 0.5]
0.125
0.5
Example 5
Given h( x ) x 3 x 1 , justify that one of the roots of this function lies
between -2 and 1. Hence, use the Bisection method to calculate the
approximation to 2 significant digits.
Solution
x3 x 1 0
or
h( x ) x 3 x 1
a = -2 and
b=1
h( x ) x 3 x 1
h( 2) 5
h(1) 1
h( 2) h(1) ( 5)(1)
5 0
Compute c
ab
2
2 1
0.5 and
2
h(0.5) 1.375
Determine
142
MAT 295
h( x ) x 3 x 1
root in
Bisection
-0.5
-2
-5.000
1.000
[-2, 1]
-0.5
1.375
[-2, -0.5]
-1.250
-1.250
0.297
[-2, -1.25]
-1.625
-1.625
-1.666
[-1.625, -1.25]
-1.438
-1.438
-0.536
[-1.438, -1.25]
-1.344
-1.344
-0.084
[-1.344, -1.25]
-1.297
Example 6
The equation e x 2 x has one solution. Estimate the solution to 2
decimal places.
Solution
ex x 2 0
or
Compute c
c
f (x) ex x 2
(Refer Example 3)
ab
and f(c)
2
0 1
0.5
2
and
f(0.5) = 0.149
Determine
f (0) f (0.5) 0
f (0.5) f (1) 0
143
MAT 295
f (x) ex x 2
0.500
0.250
0.375
0.438
0.469
0.454
0.446
0.442
-1
1.718
0.149
-0.466
-0.17
-0.012
0.067
0.029
0.008
-0.002
Root in
Bisection
[0, 1]
0.500
[0, 0.500]
0.250
[0.250, 0.500]
0.375
[0.375, 0.500]
0.438
[0.438, 0.500]
0.469
[0.438, 0.469]
0.454
[0.438, 0.454]
0.446
[0.438, 0.446]
0.442
[0.442, 0.446]
0.444
Warm up exercise
Let f ( x ) x 3 x 1 in [1, 2].
(i)
(ii)
Compute c
(iii)
Compute
ab
and f(c).
2
a)
f(1).f(c)
b)
f(2).f(c)
(iv)
(v)
Exercise 10
1.
Given x 3 6x 16 0 .
a) show that there exists one real root in the interval (1, 2)
b) plot the graph and hence show and estimate the root.
2.
Apply the Bisection method to the equation sin x 0.75 0 in the interval
[0.8, 0.9] and try to determine the actual root correct to three decimal places.
144
3.
Determine the first four approximations of the actual root of the equation
x3
4.
MAT 295
1
0 in the interval [0,1] by the Bisection method.
2
5.
(a) sin x x 3 1 0 ;
[-2, 0]
(b) x ln x 3 0 ;
[4, 5]
2 , 2
(d) 2x tan x ;
[0, 3]
6.
Using the Bisection method, solve x ln x 3 , given that the root is close to
the value 2. Obtain the root correct to two decimal places.
7.
8.
Solve 2 cos x e x accurate to one decimal place using the Bisection method.
145