The Intermediate Value Theorem can be used to approximate a root. The following is an example of binary search in computer science. Suppose you want to approximate sqrt 8. You know that it is between 2 and 3. If you consider the function
f(x)=x^2 -8, then note that f(2) is less than 0 and
f(3) is greater than 0. Therefore by the Intermediate Value Theorem, there is a value, 2 is less than or equal to c and c is less than or equal to 3 such that f(c) = 0. Next choose the midpoint of these two values, 2.5, which is guaranteed to be within 0.5 of the actual root.
f(2.5) will either be less than 0 or greater than 0. You can use the Intermediate Value Theorem again replacing 2.5 with the previous endpoint that has the same sign as 2.5. Continuing this process gives a sequence of approximations
x subscript n with x subscript 1 = 2.5. How many iterations must you do in order to be within 0.00390625 of the root?

Q&A Education