From TheBestLinks.com
In numerical analysis, the bisection method is a root-finding algorithm which works by dividing an interval in half, and then selecting the interval in which the root exists.
Given two starting points L and R which are guaranteed to bracket a root of function F, the bisection method divides the interval in two by doing M=(L+R)/2 and tries to find if a sign change occurs between L and M or between M and R. The bisection algorithm is then applied to the sub-interval where the sign change occurs, meaning that the bisection algorithm is inherently recursive.
It is numerically less efficient than Newton's method but it is much less prone to odd behavior.
The absolute error for the bisection method is at most
- <math> \frac{b-a}{2^{n+1}} <math>
after n steps when f is continuous on an interval [a,b] and f(a)f(b) < 0.
Here is a representation of the bisection method in Visual Basic code. xR is the guess to the right of the root and xL is the guess to the right of the root. The initial xR and xL must be chosen so that f(xR) and f(xL) are opposite signs (they 'bracket' a root). Epsilon specifies how precise the results will be.
'Bisection Method
'Start loop
Do While (xR - xL) > epsilon
'Calculate midpoint of domain
xM = (xR + xL) / 2
'Find f(xM)
If ((f(xL) * f(xM)) > 0) Then
'Throw away left half
xL = xM
Else
'Throw away right half
xR = xM
End If
Loop
Related links
Top visited
0 of
0 links
[no links posted yet]
>> place link >>
Discussion
Last posted
0 of
0 messages
[no messages posted yet]
>> post message >>
Watch
You can
add this article to your own "watchlist" and receive e-mail notification about all changes in this page.