Example.
Find all the real
solutions to the cubic equation.
Solution.
Plot the function.
There appears to be only one real root which lies in the interval [1,2].
Call the Bisection subroutine on the interval [1,2] using 10 iterations
After 10 iterations, the interval has been reduced to [a,b] where
The root lies somewhere in the interval [a,b] the width of which is
The reported root is alleged to be
The accuracy we can guarantee is one half of the interval width.
Is this the desired accuracy you want ?If not, more iterations are
required.
Compare our result with Mathematica's built in root finder.
Question.Why is Mathematica's
answer different ?
How many bisections would it take to reduce the interval width to
?
Remember. The bisection method
can only be used to find a real root in an interval [a,b] in which f[x] changes
sign.
Back
|