The Bisection Method: An Iterative Numerical Technique for Root Finding - Prof. Dana G. Ha, Study notes of Aerospace Engineering

An overview of the bisection method, an iterative numerical technique used to find the roots of a function. The method requires two initial guesses, one to the left and one to the right of the root, and will fail if these guesses do not bracket the root. The algorithm is presented step by step, along with conditions for determining the location of the root and convergence criteria.

Typology: Study notes

Pre 2010

Uploaded on 09/02/2009

koofers-user-8xa
koofers-user-8xa 🇺🇸

10 documents

1 / 1

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
D. Haugli, Lecturer Aer E 161 Aerospace Engineering
2/11/2005 The Bisection Method, Page 1 Iowa State University
The Bisection Method
The bisection method is an iterative numerical method for finding the root(s) of a function. The
method is called a “bracketing method” because it requires two initial guesses, one to the left and
one to the right of the desired root. The method will fail if these guesses do not bracket the root. A
quick plot of the function should reveal the location of the root and guarantee appropriate guesses.
The algorithm is:
1) Make initial guesses for l
x and r
x (where the subscripts l and r indicate to the left and
right of the root, respectively).
2) Average these guesses to approximate the root, 0
x:
2
0rl xx
x+
= (1)
3) Evaluate the following conditions:
a. If
()()
0
0<xfxf l, the root lies to the left of 0
x as shown below.
For the next iteration, set 0
xxr= and return to Step (2).
b. If
()()
0
0>xfxf l, the root lies to the right of 0
x.
For the next iteration, set 0
xxl= and return to Step (2).
c. If
()()
0
0=xfxf l, the root is found (since the function is zero at the root).
Repeat Steps (2) and (3) until Condition (3c) is satisfied.
In practice, round-off errors make Condition (3c) difficult to evaluate because a real number is
unlikely to exactly equal zero on the computer. Instead, a convergence criterion can be applied.
When the bisection method is converging, the estimate of the root for the next iteration, 1
0+n
x,
should be closer to the true value of the root than the estimate from the current iteration, n
x0. (The
superscripts represent iterations, not powers.) This observance leads to the idea of an approximate
error, as discussed in the document, “Error Definitions” on the Aer E 161 website.
To control the number of digits after the decimal, use an absolute convergence criterion,
a
nn
aCxx <= +0
1
0
~
~
ε
, (2)
where a
C is smaller than the desired number of digits. To control the relative or percent error,
use relative or percent convergence criterions, rr C<
ε
.or pp C<
ε
(see the “Error Definitions
document).

Partial preview of the text

Download The Bisection Method: An Iterative Numerical Technique for Root Finding - Prof. Dana G. Ha and more Study notes Aerospace Engineering in PDF only on Docsity!

D. Haugli, Lecturer Aer E 161 Aerospace Engineering 2/11/2005 The Bisection Method, Page 1 Iowa State University

The Bisection Method

The bisection method is an iterative numerical method for finding the root(s) of a function. The method is called a “bracketing method” because it requires two initial guesses, one to the left and one to the right of the desired root. The method will fail if these guesses do not bracket the root. A quick plot of the function should reveal the location of the root and guarantee appropriate guesses.

The algorithm is:

  1. Make initial guesses for xl and xr (where the subscripts l and r indicate to the left and right of the root, respectively).

  2. Average these guesses to approximate the root, x 0 :

(^02) x = xl^ + x^ r (1)

  1. Evaluate the following conditions:

a. If f ( xl ) f ( x 0 ) < 0 , the root lies to the left of x 0 as shown below.

For the next iteration, set x (^) r = x 0 and return to Step (2).

b. If f ( xl ) f ( x 0 ) > 0 , the root lies to the right of x 0.

For the next iteration, set x (^) l = x 0 and return to Step (2).

c. If f ( xl ) f ( x 0 ) = 0 , the root is found (since the function is zero at the root).

Repeat Steps (2) and (3) until Condition (3c) is satisfied.

In practice, round-off errors make Condition (3c) difficult to evaluate because a real number is unlikely to exactly equal zero on the computer. Instead, a convergence criterion can be applied.

When the bisection method is converging, the estimate of the root for the next iteration, x (^) 0 n^ +^1 ,

should be closer to the true value of the root than the estimate from the current iteration, x 0 n. (The

superscripts represent iterations, not powers.) This observance leads to the idea of an approximate error, as discussed in the document, “Error Definitions” on the Aer E 161 website.

To control the number of digits after the decimal, use an absolute convergence criterion,

a

n n a =^ x^ − x < C

0

1 0

where Ca is smaller than the desired number of digits. To control the relative or percent error,

use relative or percent convergence criterions, ε r < Cr .or ε p < Cp (see the “Error Definitions

document).