Topic 10.1: Bisection Method (Examples)

Contents Previous Chapter Start of Chapter No Previous Topic Introduction Notes Theory HOWTO Examples Engineering Error Questions Matlab Maple Next Topic Next Chapter

Example 1

Consider finding the root of f(x) = x2 - 3. Let εstep = 0.01, εabs = 0.01 and start with the interval [1, 2].

Table 1. Bisection method applied to f(x) = x2 - 3.

a b f(a) f(b) c = (a + b)/2 f(c) Update new b − a
1.02.0-2.01.01.5-0.75a = c0.5
1.52.0-0.751.01.750.062b = c0.25
1.51.75-0.750.06251.625-0.359a = c0.125
1.6251.75-0.35940.06251.6875-0.1523a = c0.0625
1.68751.75-0.15230.06251.7188-0.0457a = c0.0313
1.71881.75-0.04570.06251.73440.0081b = c0.0156
1.71988/td>1.7344-0.04570.00811.7266-0.0189a = c0.0078

Thus, with the seventh iteration, we note that the final interval, [1.7266, 1.7344], has a width less than 0.01 and |f(1.7344)| < 0.01, and therefore we chose b = 1.7344 to be our approximation of the root.

Example 2

Consider finding the root of f(x) = e-x(3.2 sin(x) - 0.5 cos(x)) on the interval [3, 4], this time with εstep = 0.001, εabs = 0.001.

Table 1. Bisection method applied to f(x) = e-x(3.2 sin(x) - 0.5 cos(x)).

a b f(a) f(b) c = (a + b)/2 f(c) Update new b − a
3.04.00.047127-0.0383723.5-0.019757b = c0.5
3.03.50.047127-0.0197573.250.0058479a = c0.25
3.253.50.0058479-0.0197573.375-0.0086808b = c0.125
3.253.3750.0058479-0.00868083.3125-0.0018773b = c0.0625
3.253.31250.0058479-0.00187733.28120.0018739a = c0.0313
3.28123.31250.0018739-0.00187733.2968-0.000024791b = c0.0156
3.28123.29680.0018739-0.0000247913.2890.00091736a = c0.0078
3.2893.29680.00091736-0.0000247913.29290.00044352a = c0.0039
3.29293.29680.00044352-0.0000247913.29480.00021466a = c0.002
3.29483.29680.00021466-0.0000247913.29580.000094077a = c0.001
3.29583.29680.000094077-0.0000247913.29630.000034799a = c0.0005

Thus, after the 11th iteration, we note that the final interval, [3.2958, 3.2968] has a width less than 0.001 and |f(3.2968)| < 0.001 and therefore we chose b = 3.2968 to be our approximation of the root.

Example 3

Apply the bisection method to f(x) = sin(x) starting with [1, 99], εstep = εabs = 0.00001, and comment.

After 24 iterations, we have the interval [40.84070158, 40.84070742] and sin(40.84070158) ≈ 0.0000028967. Note however that sin(x) has 31 roots on the interval [1, 99], however the bisection method neither suggests that more roots exist nor gives any suggestion as to where they may be.

Copyright ©2005 by Douglas Wilhelm Harder. All rights reserved.