The restriction under
which we operate is that f(a) and f(b) must have opposite signs -
one of them must be positive, the other negative. Then, because
f is continuous (we have to assume that), there must be a zero of
f somewhere in [a,b]. Let c be the midpoint of
[a,b]. Either c is the root, or the root lies in
[a,c] or the root lies in [c,b].
Which happens? Well, we can evaluate
f(c). If it is a zero (or at least if it is sufficiently small),
we have our root. If it is not zero, then
one pair of f(a),f(c) or f(c),f(b) have opposite signs.
Keep the half-interval with opposite signs. Repeat the process
until either (i) f, evaluated at the midpoint of the interval,
is sufficiently small (less than a tolerance we must prescribe),
or (ii) the interval has been shrunk sufficiently small
(less than a second prescribed tolerance).
That is the bisection algorithm.