miércoles, 26 de mayo de 2010

THE BISECTION METHOD

the bisection method. Given a nonlinear function f(x), we seek a value of x for which

f(x) = 0

Such a solution value for x is called a root of the equation, and a zero of the
function f(x).

The essence of the bisection method lies in the fact that the sign of a function f(x) changes on opposite sides of a root. Suppose the function f(x) has one root in the interval between x = a and x = c, or [a,c], as shown in the Figure below.
 The bisection method is based on the fact that when an interval [a,c] contains a
root, the sign of the function at the two ends (f(a) and f(c)) are opposite each
other, namely

f(a)*f(c) < 0

The first step in the bisection method is to bisect the interval [a,c] into two
halves, namely [a,b] and [b,c], where

b=(a + b)/2
By checking the sign of

f(a)*f(b)

the half-interval containing the root can be identified. If

f(a)*f(b) < 0

then, the interval [a,b] has the root, otherwise the other interval [b,c] has the
root. Then the new interval containing the root is bisected again. As the procedure is repeated the interval becomes smaller and smaller. At each step, the midpoint of the interval containing the root is taken as the best approximation of the root. The iterative procedure is stopped when the halfinterval size is less than a prespecified size.

This method is illustrated in the following flowchart.

No hay comentarios:

Publicar un comentario