If is real and continuous in the interval from to and and have opposite signs, there is at least one real root between and .
Opposite Sign Checking
We can check opposite signs using .
Bisection Method
Bisection method divides intervals in half.
Steps
- Choose and such that the function changes signs.
- Estimate root by .
- Identify position:
- If and have the same sign, then
- If and have the same sign, then
- Repeat steps 2 and 3.
Example
Our function is:
Then we have:
iteration | |||||||
---|---|---|---|---|---|---|---|
1 | 0 | 1 | 0.5 | -1 | 0.632 | -0.356 | 33% |
2 | 0.5 | 1 | 0.75 | -0.356 | 0.632 | 0.901 | 17% |
3 | 0.5 | 0.75 | 0.625 | -0.356 | 0.901 | -0.145 | 9% |
- In iteration 2, and have the same sign, so iteration 2 takes as its lower bound .
- In iteration 2, and have the same sign, so iteration 3 takes as its upper bound .
Errors
The process above is terminated when a criteria is met, such as relative approximate error for some , where:
As an example, for the second iteration we would have:
We can see that the relative true error, , has an upper bound of:
Along these lines, if we are seeking an absolute error level, , we can actually calculate the number of iterations to reach the desired error level:
Working from this, we can find the iteration at which we will be at a certain desired absolute error level :
Notes
- Robust algorithm – always works
- Slow convergence compared to other methods
- Cannot handle multiple roots (need to first graph to find number of roots and approximate locations)