Intermediate value theorem/Bisection method/3/Method

Let be real numbers, and let denote a continuous function such that and . Then the function has a zero within the interval, due to the Intermediate value theorem. Such a zero can be found by the bisection method, as described in the proof of the Intermediate value theorem. We put and , and the other interval bounds are inductively defined in such a way that and hold. Define and compute . If , then we set

and if , then we set

In both cases, the new interval has half the length of the preceding interval and so we have bisected intervals. The real number defined by these nested intervals is a zero of the function.