Derivation: bisection error bound

Why the bisection error halves at every iteration, and how to predict in advance how many iterations a given tolerance requires.

The error halves

  1. After kk bisections, the interval [ak,bk][a_k,b_k] still contains the root and is half the size of the previous one:

    bkak=ba2kb_k-a_k=\frac{b-a}{2^k}
  2. The approximation is the midpoint mkm_k, and the root lies in one of the two halves, at distance at most half the interval:

    mkαbkak2=ba2k+1|m_k-\alpha|\le\frac{b_k-a_k}{2}=\frac{b-a}{2^{k+1}}
  3. To guarantee mkα<ε|m_k-\alpha|<\varepsilon, solve for kk in ba2k+1<ε\frac{b-a}{2^{k+1}}<\varepsilon: the number of iterations is known before starting, something no other method in this area offers.

    k>log2 ⁣(baε)1k>\log_2\!\left(\frac{b-a}{\varepsilon}\right)-1