Limitations of bisection (source code)

= Limitations of bisection

Several <zeros of a function> can lie in one initial <root bracket>: the <bisection method> seeks one, rather than enumerating them. For instance, the <polynomial> $(x-1)(x-2)(x-3)$ has opposite endpoint signs on $[0,4]$, but its first <midpoint> evaluation returns only the <polynomial root> $2$. The initial <zero of a function> need not be unique for the <bisection error bound> to apply to a retained <zero of a function>.

A <zero of a function> without a sign change cannot be located by the strict sign-change test alone. The <polynomial> $(x-1)^2$ touches zero at $1$ but is positive on either side. On $[0,3]$ both endpoint values are positive: although the <closed interval> contains a <polynomial root>, it fails the usual starting test for the <bisection method>. An endpoint or evaluated <midpoint> <zero of a function> can still be recognized directly.

Opposite signs certify a <root bracket> only with the required <continuity>. For $f(x)=1/x$, the values at $-1$ and $1$ have opposite signs, but $f$ is undefined at the <midpoint> $0$ and has no <zero of a function>. Hence $[-1,1]$ is invalid input for the <bisection method>; the <intermediate value theorem> does not apply across the gap.