Theorem (The Intermediate Value Theorem) If the function f is continuous on the closed interval [a , b] and N is any number between and , then there exists a number c in the interval (a , b) such that .

We use the Intermediate Value Theorem to find a solution to the equation , where f is a continuous function, in the following way:

1. If and and f is continuous on the closed interval [a , b], then there exists a number c in the interval (a , b) such that .

OR

2. If and and f is continuous on the closed interval [a , b], then there exists a number c in the interval (a , b) such that .

Example We will use the Intermediate Value Theorem (IVT) to show that the equation has a solution in the interval (1, 2) and then we will use Maple and the IVT to find an approximate to this solution.

implies that

Let . The function f is continuous on the closed interval [1, 2] since the function is continuous on the interval [1, 2] and the function is continuous on [1, 2]. Since f is the difference of two functions which are continuous on the closed interval [1, 2], then f is continuous on this interval. We will apply the IVT using the closed interval [1, 2].

Thus, by the IVT, there exists a number c in the open interval (1, 2) such that .

Since , then implies that . This implies that c is a solution (root) of the equation , which is also a solution (root) of the original equation .

Also, since , then c is the x-coordinate of the x-intercept of the graph . Let's use Maple to graph the function and find an approximation to this solution (root), which is accurate to six decimal places.

Recall, an approximation a to the solution c of an equation is accurate to n decimal places if . That is, the absolute value of the difference between c, the solution, and a, the approximation to this solution, is less than 0.5 times 10 raised to the negative nth power. But how can you determine this if you don't have c, the solution to the equation. Well, find two approximations and to the solution c such that and . That is, find two approximations such that the solution c is between these two approximations and that the absolute value of the difference between these two approximations is less than 0.5 times 10 raised to the negative nth power. Then use either or as your approximation to the solution c.

Thus, for this problem, to find an approximation to the solution c of the equation which is accurate to six decimal places, we will need to find two approximations and to the solution c such that and .

> restart:

> f := x -> x^2 - sqrt(x+1);

> f(x);

> plot(f(x), x=1..2);

Note: since we know that there is a solution to the equation between 1 and 2 by the IVT, then we only need to graph the function f on the interval (1, 2). From the graph, it appears that the solution (root) is between 1.2 and 1.3. At this point, if we pick any number in the interval [1.2, 1.3] for the solution (root), the error for our solution is at most 1.3 - 1.2 = 0.1. Now, let's graph f on the interval [1.2, 1.3].

> plot(f(x), x=1.2..1.3);

From this graph, it appears that the solution (root) is between 1.22 and 1.23. At this point, if we pick any number in the interval [1.22, 1.23] for the solution (root), the error for our solution is at most and our solution is correct to at least one decimal place. Now, let's graph f on the interval [1.22, 1.23].

> plot(f(x), x=1.22..1.23);

From this graph, it appears that the solution (root) is between 1.220 and 1.221. At this point, if we pick any number in the interval [1.220, 1.221] for the solution (root), the error for our solution is at most and our solution is correct to at least two decimal places. Now, let's graph f on the interval [1.220, 1.221].

> plot(f(x), x=1.220..1.221);

From this graph, it appears that the solution (root) is between 1.2206 and 1.2208. At this point, if we pick any number in the interval [1.2206, 1.2208] for the solution (root), the error for our solution is at most and our solution is correct to at least three decimal places. Now, let's graph f on the interval [1.2206, 1.2208].

> plot(f(x), x=1.2206..1.2208);

From this graph, it appears that the solution (root) is between 1.22074 and 1.22076. At this point, if we pick any number in the interval [1.22074, 1.22076] for the solution (root), the error for our solution is at most and our solution is correct to at least four decimal places. We can continue this process of "zeroing in" on the solution (root). However, we can also keep applying the IVT by evaluating the function f at the following numbers starting at 1.220740 and increasing the digit in the millionths place by one until we reach 1.220750. We will see that our solution (root) is somewhere between these two numbers. We want to identify the first place where the value of the function changes sign. This could be from positive to negative or from negative to positive.

> f(1.220740); f(1.220741); f(1.220742); f(1.220743); f(1.220744); f(1.220745); f(1.220746); f(1.220747); f(1.220748); f(1.220749); f(1.220750);

Note: and . The IVT tells us that the solution (root) is somewhere between 1.220744 and 1.220745. At this point, if we pick any number in the interval [1.220744, 1.220745] for the solution (root), the error in our solution is at most and our solution is correct to at least five decimal places. Again, we will apply the IVT. However, let's "speed up" the process by evaluating the function f at 1.2207440, 1.2207445 (the midpoint), and 1.2207450. Again, we want to identify where the value of the function changes sign.

> f(1.2207440); f(1.2207445); f(1.2207450);

Note: and . Thus, by the IVT, the root is between 1.2207440 and 1.2207445. Now, evaluate the function f at the following numbers starting at 1.2207440 and increasing the digit in the ten-millionths place by one until we reach 1.2207445.

> f(1.2207440); f(1.2207441); f(1.2207442); f(1.2207443); f(1.2207444); f(1.2207445);

Note: and . Thus, by the IVT, the solution (root) is between 1.2207440 and 1.2207441. At this point, if we pick any number in the interval [1.2207440, 1.2207441] for the solution (root), the error in our solution is at most and our solution is correct to at least six decimal places.

At this point, we can say that the solution (root) of the equation in the interval (1, 2) is approximately 1.2207440 or 1.2207441, which is accurate to six decimal places. You can continue to apply the IVT in order to find the root correct to as many decimal places as you want. Let's apply the IVT one more time.

Note: and . Thus, by the IVT, the root is between 1.2207440 and 1.2207441. Evaluate the function f at 1.22074400, 1.22074405 (the midpoint), and 1.2207441. Again, we want to identify where the value of the function changes sign.

> f(1.22074400); f(1.22074405); f(1.22074410);

Note: and . Thus, by the IVT, the root is between 1.22074405 and 1.22074410. Now, evaluate the function f at the following numbers starting at 1.22074405 and increasing the digit in the hundred-millionths place by one until we reach 1.22074410.

> f(1.22074405); f(1.22074406); f(1.22074407); f(1.22074408); f(1.22074409); f(1.22074410);

Note: and . Thus, by the IVT, the solution (root) is between 1.22074408 and 1.22074409. At this point, if we pick any number in the interval [1.22074408, 1.22074409] for the solution (root), the error in our solution is at most and our solution is correct to at least seven decimal places. At this point, we can say that the solution (root) of the equation in the interval (1, 2) is approximately 1.22074408 or 1.22074409, which is accurate to seven decimal places.

Let's see how well we did with our approximation by asking Maple to solve the equation , which is also the equation .

> solve(f(x)=0); evalf(%);

Our approximations of 1.2207440 or 1.2207441 (correct to six decimal places), obtained by the IVT, isn't too bad. Of course our approximations of 1.22074408 or 1.22074409 (correct to seven decimal places) are even better. Note: the equation also has a solution (root) in the interval (-1, 0).

NOTE: You can also check your answer without using the solve command by evaluating the function f at your approximation, say 1.22074408:

> f(1.22074408);