bisection method error between approximation and actual root

1 view (last 30 days)
Does anyone know what this question is asking? "How many iterations of the bisection would be needed to ensure that the error between your approximation of the root and the actual root location to the equation is less that delta(x)< 0.03 ?"
what does it mean by "approximation" and "actual root"? In my code I have values xleft,xright,xmiddle (left and right initial guesses, and the final result, xmiddle, which is chosen when abs(f(middle))<0.1.

Answers (1)

David Goodmanson
David Goodmanson on 22 Feb 2018
Edited: David Goodmanson on 22 Feb 2018
Hi Rachel,
What they mean is, as you proceed with the bisection method, you keep creating new xleft, xright and xmiddle values. These values get closer and closer to each other as you proceed. If you keep track of the distances, eventually xright and xleft will be closer to each other than, say, .8. In that case you don't know exactly where the actual root (the exact answer) is, but by the nature of the bisection algorithm you know it's in between two values xright and xleft that differ by less than .8. So the next xmiddle can't be further away from the exact answer than .4. That's the basic idea, which you can alter for the circumstances you have.


Find more on Programming in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!