Matheno - Learn Well and Excel

D.4 The Intermediate Value Theorem

To conclude our study of limits and continuity, let’s introduce the important, if seemingly-obvious, Intermediate Value Theorem, and consider some typical problems. We’ll need the theorem later for some of our more important Calculus-y proofs, but even on this screen we’ll see some surprising implications. (At the bottom of this screen, we’ll look — optionally — at how Desmos graphs are often misleading essentially because of misuse of this theorem. No knock on Desmos, which we love and use a lot as you’ve seen! Even they say you must be aware of its limitations, including the ones we’ll see below.)

To understand the theorem, take a look at the top figure: the function f is continuous on the interval $[-3, 5].$ As you can see, its curve starts at the point $(3, -4)$ and ends on the point $(6, 5).$ No surprise: between $x=3$ and $x=5$ the function takes on all output values between $y=-4$ and $y=5.$

Upper figure shows graph of continuous function f: it starts at (3, -4) and travels smoothly upward to (6, 5). Text beneath reads: Because f is continuous, it has _all_ output values between y = -4 and y = 5.  Lower figure shows the same curve, but with a chunk cut out of it. Text beneath reads: Because g is _not_ continuous, it does _not_ have all output values between y = -4 and y = 5.
By contrast, the lower figure shows the function g which is not continuous on the same interval $[-3, 5]$; instead, it has a gap. And because it’s not continuous on the interval, we cannot be sure that it takes on all of the same output y-values that f does. (Seems obvious, right?)

IVT = Intermediate Value Theorem
The simple contrast between the functions f and g here illustrates an extremely important consequence of a function being continuous, and that consequence is captured by the Intermediate Value theorem (which we’ll frequently abbreviate as “IVT”):

Intermediate Value Theorem (IVT)
If a function f is continuous on a closed interval $[a, b]$ and if $f(a) \ne f(b),$ then f takes on every value between $f(a)$ and $f(b)$ in the interval $[a, b].$

A common use of the IVT is to prove that an equation has at least one solution, even if you don’t immediately (or ever) know what that solution is. The next example illustrates.

Example 1: Solution existence

Show that the equation $-2x^3 +5x^2 -4x + 10 = 8$ has a solution in the interval $[1, 2].$
(Of course: don’t use a calculator or other device to simply find the solution.)

Notice that the question doesn’t ask us to find the solution; instead, it asks us to show that a solution exists. This is a strong clue that we should use the IVT.

First, let $f(x) = -2x^3 +5x^2 -4x + 10.$ Since f is a polynomial, and as we saw on the preceding screen polynomials are continuous everywhere, f is continuous everywhere. (This is important to state in order to invoke the IVT!)

Next, let’s compute the value of f at the endpoints of the interval $[1, 2]$:
f(1) &= -2(1)^3 + 5(1)^2 -4(1) + 10 = 9 \\[8px] f(2) &= -2(2)^3 + 5(2)^2 -4(2) + 10 = 6
Perfect: the question asks us to show that a solution exists for $f(x) = 8,$ and since 8 lies between 9 and 6 we can invoke the IVT:

Since f is continuous and $f(1) = 9$ and $f(2) = 6,$ by the IVT we know there is at least one input-value c where $1 \le c \le 2$ such that $f(c) = 8. \quad \cmark$

Graph showing the point (1,9) and text: We know for the interval [1, 2] the curve starts here. Then the point (2, 6) with the text: and ends here. More text: Since f is continuous, we thus know by the Intermediate Value Theorem that the curve _must_ include a point with y=8. (We don't know where exactly, but we know the point exists

We note the following corollary to the IVT which is often easier to use in practice:

Corollary to the Intermediate Value Theorem, useful for existence of a root
If f is continuous on $[a, b]$ and $f(a)$ and $f(b)$ have opposite signs, then there is a number c between a and b such that $f(c) = 0.$

The corollary is useful because if you yourself have to supply the values of a and b, initially by just guessing, then it’s easier to try and hone in on values with the goal of finding just one output-value that’s negative and one that’s positive. You then know that the curve must cross the x-axis somewhere between your two input values. The following example illustrates, and also introduces one super-helpful problem-solving tip.

Example 2: Solution exists for $2 -x = 2^x$

Show that there is at least one solution to the equation $2 -x = 2^x.$

Notice again that the question doesn’t ask us to solve the equation, but rather to show that a solution to $2 -x = 2^x$ exists. We thus again turn to the IVT.

A VERY HELPFUL initial move is to rewrite the given equation and introduce a new function
\[f(x) = (2-x) -2^x\] because now we have the simpler task of showing that there is some number c such that $f(c) = 0.$ Note, crucially, that f is continuous for all x since it is comprised of a polynomial and an exponential function, so we can apply the IVT to it.

We now just start guessing at values of a and b with the goal of finding outputs with opposite signs, since that guarantees that there is a value of c between a and b such that $f(c) = 0$ as we desire.

So let’s start guessing. The easiest number to try is 0:
\[f(0) = 2 -0 – 2^2 = 1 \implies \text{a POSITIVE value} \] Great: we have our positive value. Now let’s search around for a negative value, first trying $x=-1$:
\[f(1) = 2 – (-1) -2^{-1} = 3 – \dfrac{1}{2} \implies \text{a more-positive value} \] Graph showing the points (0, f(0)) = (0, 1) and (1, f(1)) = (1, -1)
Oops: that didn’t help, since we got another positive output. No matter: let’s try another value, going to the positive-side of $x=0$. . .

and let’s try $x=1$:
\[f(1) = 2 – 1 -2^1 = -1 \implies \text{a NEGATIVE value}\] Perfect! We now have
\[f(0) = 1 \gt 0 \quad \text{and}\quad f(1) = -1 \lt 0\] and so by the IVT we know that there is a value of c between $x=0$ and $x=1$ such that $f(c) = 0.$ That in turn means that c satisfies $4 – c = 2^c,$ as requested. $\; \cmark$

Furthermore, not that the question asked, but we know that the value of c lies in the interval $(0 , 1).$

Tips iconExample 2 illustrates the helpful move of defining a new function f (or g or whatever) at the start of a solution so you’re looking for a value of c such that $f(c) = 0.$ It might initially feel weird to define a new function for yourself to work with, but really you’re just rewriting the expression you were initially given and putting it into a form where you can set $f(x) = 0.$

The following example is another illustration of this helpful tactic — and also an example of how we can apply the IVT to some surprising scenarios.

Example 3: Height and weight with equal values?

True or False? At some time t since you were born, your weight in pounds equaled your height in inches.

This question seems out-of-the-blue . . . but we note that this question again doesn’t ask for the value of the time t, and instead just asks about whether such a moment exists. And that again is a clue to use the IVT.

One way to show that this statement is true is to, following the Problem-Solving Tip, define a new function that is the difference between the two quantities of interest. So let’s define a function that’s the difference between your weight as a function of time, and your height as a function of time:
\[f(t) = \text{ weight}(t) – \text{ height}(t)\] Since both weight and height are continuous functions of time, f is continuous.

Now, note that at birth, $f(\text{birth}) \lt 0$ whereas $f(\text{today}) \gt 0.$

Hence by the Intermediate Value Theorem, there must be some particular moment T between your birth and now when $f(T) = 0$, and hence when your weight (in pounds) was equal to your height (in inches). The statement is thus true. $\; \cmark$

Note that we don’t know when that moment was, only that it must exist.

Here are some practice problems for you to try.

Practice Problems

This content is available to logged-in users.
To interact with all of the content of this page, including Check Questions and Practice Problems (each with a complete solution), you must be logged in.
  • You can immediately sign in for free using your Facebook, Google, or Apple account.
  • If you would rather use your dedicated account, please enter your username and password below. (Don't have a free account but would like one? You can create it in 60 seconds here.)
This content is available to logged-in users.

The next problem is often found in textbooks, and sometimes on exams.

This content is available to logged-in users.
This content is available to logged-in users.

This next problem is a little mind-blowing, at least to us, but follows the same type of reasoning as the preceding questions.

This content is available to logged-in users.

We promised at the top of the screen a discussion of a way in which Desmos and other graphing programs are sometimes entirely misleading. Open the box if you’re interested:

Optional look at one way Desmos and other graphing programs are sometimes wrong(!)
The interactive graph below shows a function we’ve looked at often: $f(x) = \dfrac{x^2 -4}{x-2}.$ What do you notice about what the graph shows for the value of $f(2)$?

Misleading graph of $f(x) = \dfrac{x^2-4}{x-2}$

You of course know that $f(2)$ is undefined, since the function’s denominator equals zero when $x=2.$ But no matter how much you zoom in, the red line passes straight through the point $(2,4)$ — which is quite misleading! (To Desmos’s credit, if you slide your cursor along the line, when you reach $x=2$ Desmos shows the point as “(2, undefined),” which is correct. It’s just the graph’s continuous red line itself that is misleading.)

We’re not showing you this to criticize Desmos; we love them! (As you can tell by the amount we use them throughout our materials here. This site would be much different, and worse, without them.) And FYI, almost every graphing calculator and app functions makes this same “mistake.”

Rather, we strongly believe that it’s important to understand the limitations of any tool that you use, which in turn means developing an understanding of how the tool works. In this case, that tool is Desmos’s graphing engine. And really, that engine — while truly amazing — isn’t very smart.

Instead, it uses brute force: when you enter an expression, the calculator gets to work and quickly calculates a large number of points, plots them, and then essentially connects the dots so you see a smooth curve — thereby assuming the function is continuous. That is, it implicitly uses the IVT and “fills in” all of the values between the ones it has calculated. Of course a consequence of this approach is that when the function is not continuous, as this one isn’t at $x=4,$ you simply get a misleading graph.

For this reason, behind-the-scenes in every graph you’ve seen up to this point we’ve manually added the open-circle for the point $(2,4)$ to make the graph correct. To see this for yourself, tap the “>>” in the upper left of the graph to reveal the expressions list. If you then tap the circle in the expression for the point $(2, 4),$ you’ll see the open-circle that we always put in place.

Again, the point of this discussion is not to criticize Desmos or any other graphing tool. Instead, we want to emphasize the importance of building your own mathematical knowledge so you can recognize when a graph is showing you something that isn’t quite right . . . and now, we hope, also understand why that’s happening.


What questions or comments about the IVT, or continuity, or limits do you have? Please pop over to the Forum and join the discussion with the rest of the community, including us!

The Upshot

  1. The Intermediate Value Theorem (IVT) states the obvious fact that:
    If a function f is continuous on a closed interval $[a, b]$ and if $f(a) \ne f(b),$ then f takes on every value between $f(a)$ and $f(b)$ in the interval $[a, b].$
  2. Its corollary is often more useful in practice:
    If f is continuous on $[a, b]$ and $f(a)$ and $f(b)$ have opposite signs, then there is a number c between a and b such that $f(c) = 0.$
  3. A very strong clue to use the IVT (or more likely, its corollary) is that a problem statement asks you to “show that a solution exists,” or that the function takes on a particular output-value somewhere between two input-values; the problem does not ask you to find the solution, or the specific input-value where the output-value occurs. For such problems, use the steps outlined in the Examples and Practice Problems above.

Chapter Conclusion, and What’s Next

And with that, we conclude our study of limits and continuity.

Recall that we ended Chapter 1 here:

The Upshot (at the end of Chapter 1)

  1. A function’s average rate of change over an interval is equal to the slope of the secant line that passes through the endpoints of the interval:
    \[\text{average rate of change}_{[x_1,\, x_2]} = \text{slope of line segment} = \frac{\color{purple}{\Delta
    y}}{\color{green}{\Delta x}} = \frac{\color{purple}{f(x_2)- f(x_1)}}{\color{green}{x_2\, -\, x_1}}\]
  2. You can make the average rate of change arbitrarily close to the instantaneous rate of change at $x_1$ by making $x_2$ sufficiently close to $x_1$ (and hence $\Delta x$ sufficiently small).

These points raise a natural question that led to the development of Calculus itself:

How small can we make $\Delta x$??

We know it can’t be exactly zero, because we can’t divide by zero in the slope calculation.
So how small can we make it?

We will take up this key question – arguably THE key question – when we explore THE key tool in Calculus in the next Chapter, on “Limits”.

We now have that we have that foundational tool of limits — without which Calculus wouldn’t exist! — and so we can return to that question. The answer will lead us to develop one of the (only) two fundamental concepts of Calculus, the derivative, in the next Chapter. . . which we will have available soon. We will be excited to see you there when it’s ready — please watch the Forum for the announcement when it’s available.

For the moment, we hope you’ll have a small celebration for yourself: understanding the concept of “the limit” deeply means understanding one of the great triumphs of science and mathematics. (There’s a reason the founders of Calculus are so celebrated!) We sincerely hope we’ve helped you lay a firm foundation for yourself from which to build the key ideas to come. If you would be so kind, please let us know on the Forum: we really need and appreciate your feedback.

Person standing on top of a mountain, fist raised in triumphAnd please don’t forget that celebration part!