Bisection Method
¡@¡@One of the application of Numerical Analysis is to find the roots of equations of the form f( x ) = 0 by iterative methods. It involves constructing a series of guesses of the root that gradually approaches the actual root.
¡@¡@The simplest iterative method is the bisection method. To solve the equation f( x ) = 0, we start with guessing an interval [ left0 , right0 ] within which the root certainly lies. The interval should satisfy 2 conditions:
- f( x ) is continuous on [ left0 , right0 ]
- f( left0 ) f( right0 ) < 0
¡@¡@After the initial interval [ left0 , right0 ] has been chosen, we bisect it at the mid-point x1. This resolves it into 2 subintervals [ left0 , x1 ] and ( x1 , right0 ]. According to condition 2 above, if f( left0 ) f( x1 ) < 0, the root lies in [ left0 , x1 ]. The next interval [ left1 , right1 ] containing the root is obtained by setting left1 = left0 and right1 = x1. Otherwise, the root lies in ( x1 , right0 ] and left1 = x1 and right1 = right0. Then we repeat the procedures many times and approach the root until a certain degree of accuracy.
Algorithm : Given a function f(x) continuous on the interval [ left0 , right0 ] such that f( left0 ) f( right0 ) < 0.
- Loop start where n=0
- xn+1 = 1/2( leftn + rightn )
- If f( leftn ) f( xn+1 ) < 0, leftn+1 = leftn , rightn+1 = xn+1. Else, leftn+1 = xn+1 , rightn+1 = rightn
- n=n+1
¡@¡@The following Java Applet shows the a equation f(x) = x3 - x -1 = 0 which has exactly one real root in the interval [ 1 , 2 ].
|