Math Core

Lesson 1.9 · Limits and Continuity

The intermediate value theorem

If you drive from sea level up to a mountain town at 2,0002{,}000 meters, at some moment you must have been at exactly 1,0001{,}000 meters. You cannot skip an altitude, because altitude changes continuously. The intermediate value theorem turns this common-sense idea into a precise statement, and it is the first of several existence theorems in AP Calculus that rely on continuity.

The theorem

The intermediate value theorem (IVT)

If ff is continuous on the closed interval [a,b][a, b] and kk is any number between f(a)f(a) and f(b)f(b), then there is at least one number cc in [a,b][a, b] such that

f(c)=k.f(c) = k.

(If kk is strictly between f(a)f(a) and f(b)f(b), then cc can be taken strictly between aa and bb.)

Graphically: draw any horizontal line y=ky = k between the heights f(a)f(a) and f(b)f(b). A continuous graph that starts on one side of that line and ends on the other must cross it at least once.

A continuous f on [a, b] with f(a) below k and f(b) above k. The graph crosses the dashed line y = k, here three times.Open in grapher →

Three features of the theorem are worth stressing.

  1. Continuity is essential. If ff has a break anywhere in [a,b][a, b], the conclusion can fail.
  2. It guarantees existence, not location. The IVT says a value cc exists; it does not tell you what cc is.
  3. "At least one." There may be several such cc values, as in the graph above.

Why continuity matters

Consider f(x)=1xf(x) = \dfrac{1}{x} on [−1,1][-1, 1]. We have f(−1)=−1f(-1) = -1 and f(1)=1f(1) = 1, and 00 is between them. But 1x\dfrac{1}{x} is never 00. The IVT doesn't apply because ff is not continuous on [−1,1][-1, 1]: it is undefined at x=0x = 0, where the graph jumps from −∞-\infty to ∞\infty.

Or consider a piecewise function that is −1-1 for x<0x < 0 and 11 for x≥0x \ge 0, on [−2,2][-2, 2]. It never equals 12\dfrac{1}{2}, again because of its jump.

Using the IVT to locate roots

The most common application: if a continuous function changes sign on an interval, it has a zero there.

Worked example: Showing that an equation has a solution

Show that x3+x−5=0x^3 + x - 5 = 0 has a solution between x=1x = 1 and x=2x = 2.

Solution. Let f(x)=x3+x−5f(x) = x^3 + x - 5. As a polynomial, ff is continuous on [1,2][1, 2]. Also

f(1)=1+1−5=−3andf(2)=8+2−5=5.f(1) = 1 + 1 - 5 = -3 \quad \text{and} \quad f(2) = 8 + 2 - 5 = 5.

Since f(1)=−3<0<5=f(2)f(1) = -3 < 0 < 5 = f(2) and ff is continuous on [1,2][1, 2], the intermediate value theorem guarantees a number cc in (1,2)(1, 2) with f(c)=0f(c) = 0.

This is how an AP free-response justification should look: name the function, state that it is continuous on the closed interval (with a reason), show the values at the endpoints, state that kk is between them, and conclude by the IVT.

You can repeat the process to narrow things down. Since f(1.5)=3.375+1.5−5=−0.125<0f(1.5) = 3.375 + 1.5 - 5 = -0.125 < 0 and f(2)>0f(2) > 0, the root is actually in (1.5,2)(1.5, 2). Halving the interval over and over like this (the bisection method) pins the root down to any accuracy you want.

Worked example: Equations with a function on each side

Show that cos⁡x=x\cos x = x has a solution in [0,π2]\left[0, \dfrac{\pi}{2}\right].

Solution. Move everything to one side: let g(x)=cos⁡x−xg(x) = \cos x - x, which is continuous everywhere as a difference of continuous functions. Then

g(0)=1−0=1>0andg(π2)=0−π2<0.g(0) = 1 - 0 = 1 > 0 \quad \text{and} \quad g\left(\frac{\pi}{2}\right) = 0 - \frac{\pi}{2} < 0.

By the IVT, g(c)=0g(c) = 0 for some cc in (0,π2)\left(0, \dfrac{\pi}{2}\right), which means cos⁡c=c\cos c = c.

The IVT with tables

AP questions often give a table of values of a continuous function and ask what the IVT guarantees.

Worked example: Counting guaranteed solutions from a table

The function ff is continuous on [0,8][0, 8], and selected values are shown.

xx00225588
f(x)f(x)1166−2-244

What is the fewest number of solutions the equation f(x)=3f(x) = 3 must have on [0,8][0, 8]?

Solution. Look at each consecutive pair of values and ask whether 33 lies between them.

  • On [0,2][0, 2]: 1<3<61 < 3 < 6. Yes.
  • On [2,5][2, 5]: −2<3<6-2 < 3 < 6. Yes.
  • On [5,8][5, 8]: −2<3<4-2 < 3 < 4. Yes.

The intervals (0,2)(0, 2), (2,5)(2, 5) and (5,8)(5, 8) don't overlap, so there are at least 33 different solutions.

Common mistake

The IVT works in only one direction. If kk is between f(a)f(a) and f(b)f(b), a solution is guaranteed. If kk is not between them, the IVT says nothing: ff might still equal kk somewhere in the interval (for example, f(x)=x2f(x) = x^2 on [−1,1][-1, 1] has f(−1)=f(1)=1f(-1) = f(1) = 1 but also reaches 00). And always check continuity first; without it, no conclusion is possible.

Tip

To use the IVT for an equation like cos⁡x=x\cos x = x or ex=3−xe^x = 3 - x, rewrite it as (something) =0= 0 and apply the theorem to the difference. Sign changes are much easier to spot than crossings of two curves.

Practice

Practice 1

Let f(x)=x3−4x+1f(x) = x^3 - 4x + 1. On which interval does the intermediate value theorem guarantee that ff has a zero?

Practice 2

The function ff is continuous on [0,4][0, 4], with values shown in the table.

xx0011223344
f(x)f(x)33−1-12244−2-2

What is the least number of zeros ff must have on [0,4][0, 4]?

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 3

The function gg is continuous on [1,5][1, 5] with g(1)=4g(1) = 4, g(3)=−2g(3) = -2, and g(5)=6g(5) = 6. What is the least number of solutions of g(x)=1g(x) = 1 on [1,5][1, 5]?

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 4

Let f(x)=1x−2f(x) = \dfrac{1}{x - 2}. Then f(1)=−1f(1) = -1 and f(3)=1f(3) = 1, but there is no cc in [1,3][1, 3] with f(c)=0f(c) = 0. Why doesn't this contradict the intermediate value theorem?

Practice 5

Let f(x)=x2+xf(x) = x^2 + x. The IVT guarantees a value cc in [0,3][0, 3] with f(c)=6f(c) = 6. Find cc.

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 6

Which is a correct justification that ex=3−xe^x = 3 - x has a solution in [0,1][0, 1]?

Practice 7

The function gg is continuous on [−2,4][-2, 4] with g(−2)=5g(-2) = 5 and g(4)=−3g(4) = -3. Which statement must be true?