Intermediate Value Theorem

The intermediate value theorem (IVT) says that if f is continuous on a closed interval [a, b] and N is any number between f(a) and f(b), then f(c) = N for at least one c between a and b. Its most common use: if f(a) and f(b) have opposite signs, f has a zero between a and b.

Before this lesson: Continuity, X-Intercepts and Y-Intercepts and Solving Polynomial Equations

What the intermediate value theorem says

If you drive from a town at 1,000 feet above sea level to one at 3,000 feet, at some moment you were at exactly 2,000 feet. You could not skip it, because your altitude changes continuously. That is the intermediate value theorem.

For a graph, it means a continuous curve cannot jump over a height. If it starts below the x-axis and ends above it, it must cross the x-axis on the way.

The theorem only promises that a value c exists. It does not say where c is or how many there are. To estimate c, use the bisection method at the end of this lesson, or algebra if the equation can be solved.

Graph of f(x) = x³ + x − 1 from x = −0.5 to 1.5. At x = 0 the curve is at (0, −1), below the x-axis, and at x = 1 it is at (1, 1), above the x-axis. Because the curve is continuous, it must cross the x-axis somewhere between 0 and 1; it crosses at about x = 0.68.
f(0) is negative and f(1) is positive, so the continuous curve must cross zero between them, near x = 0.68.

The intermediate value theorem

If f is continuous on the closed interval [a, b], and N is any number between f(a) and f(b), then there is at least one number c in (a, b) with f(c) = N.

StepWhat to write
1State that f is continuous on [a, b], and give the reason (polynomial, sum of continuous functions, and so on).
2Evaluate f(a) and f(b).
3Show that N is between f(a) and f(b). For a zero, show that f(a) and f(b) have opposite signs.
4Conclude: by the intermediate value theorem, there is a c in (a, b) with f(c) = N.

To show an equation like g(x) = h(x) has a solution, apply the theorem to f(x) = g(x) - h(x) with N = 0.

Intermediate value theorem examples

Example 1: Show a polynomial has a zero

Show that f(x) = x^3 + x - 1 has a zero between 0 and 1.

f(0) = 0^3 + 0 - 1 = -1

f is a polynomial, so it is continuous on [0, 1] (see continuity). Evaluate f(0).

f(1) = 1^3 + 1 - 1 = 1

Evaluate f(1).

f(0) \lt 0 \lt f(1)

The value N = 0 is between −1 and 1.

Answer: by the intermediate value theorem, there is a number c in (0, 1) with f(c) = 0. (It is about 0.68, as the graph shows.)

Example 2: Show an equation has a solution

Show that \cos x = x has a solution between 0 and \frac{\pi}{2}.

f(x) = \cos x - x

Move everything to one side. f is a difference of continuous functions, so it is continuous on \left[0, \frac{\pi}{2}\right].

f(0) = \cos 0 - 0 = 1

Evaluate at 0.

f\left(\frac{\pi}{2}\right) = \cos\frac{\pi}{2} - \frac{\pi}{2} = -\frac{\pi}{2}

Evaluate at \frac{\pi}{2}; \cos\frac{\pi}{2} = 0 (see the unit circle).

-\frac{\pi}{2} \approx -1.571

This value is negative, and f(0) is positive.

Answer: f changes sign, so by the IVT there is a c in \left(0, \frac{\pi}{2}\right) with f(c) = 0, which means \cos c = c.

Example 3: A value other than zero

Let f(x) = x^2 + 2. Show that f(c) = 5 for some c in (1, 2), then find c.

f(1) = 1 + 2 = 3

f is a polynomial, so it is continuous on [1, 2]. Evaluate f(1).

f(2) = 4 + 2 = 6

Evaluate f(2).

3 \lt 5 \lt 6

N = 5 is between f(1) and f(2), so the IVT guarantees a c.

c^2 + 2 = 5

To find c, set f(c) = 5.

c^2 = 3

Subtract 2 from both sides.

c = \sqrt{3} \approx 1.732

Take the positive square root, since c is in (1, 2) (see solving quadratics with square roots).

Answer: c = \sqrt{3}. Here algebra finds c exactly; the IVT only promised it existed.

Example 4: When the theorem does not apply

Let f(x) = \frac{1}{x}. Then f(−1) = −1 and f(1) = 1. Does the IVT guarantee a zero in (−1, 1)?

f(-1) = -1

Evaluate at −1.

f(1) = 1

Evaluate at 1. The signs are opposite.

f(0)

But f is undefined at x = 0, which is inside [−1, 1], so f is not continuous on the interval.

Answer: no. The theorem does not apply because f is not continuous on [−1, 1]. In fact, \frac{1}{x} is never 0; its graph jumps from -\infty to \infty at the asymptote x = 0.

Example 5: Word problem with temperature

At 6 a.m. the temperature was 52°F, and at 2 p.m. it was 75°F. Explain why the temperature was exactly 65°F at some time between 6 a.m. and 2 p.m.

T(6) = 52

Let T(t) be the temperature t hours after midnight. Temperature changes continuously, so T is continuous on [6, 14].

T(14) = 75

2 p.m. is 14 hours after midnight.

52 \lt 65 \lt 75

65 is between T(6) and T(14).

Answer: by the intermediate value theorem, there is a time c between 6 and 14 (between 6 a.m. and 2 p.m.) with T(c) = 65. The theorem does not say when; the temperature might even pass 65°F more than once.

Common mistakes

MistakeExample of the errorFix
Forgetting to state continuity“f(0) is negative and f(1) is positive, so there is a zero”Say why f is continuous on [a, b] first; the theorem needs it.
Using the IVT on a discontinuous functionClaiming \frac{1}{x} has a zero in (−1, 1)Check for asymptotes, holes or jumps inside the interval.
Thinking the IVT finds c“By the IVT, c = 0.5”The theorem only shows c exists. Find c with algebra or approximation.
Thinking no sign change means no zeroSaying x^2 - 1 has no zero on [−2, 2] because f(−2) = f(2) = 3The IVT says nothing in that case. Here there are two zeros, ±1.
Assuming exactly one zero“There is exactly one c”The theorem promises at least one; there could be more.
Not moving terms to one sideChecking signs of \cos x alone for \cos x = xUse f(x) = \cos x - x and look for f(c) = 0.

Related methods

The bisection method

To trap a zero more tightly, check the midpoint and keep the half where the sign changes. For x^3 + x - 1: f(0.5) = −0.375 and f(0.75) ≈ 0.172, so the zero is in (0.5, 0.75). Then f(0.625) ≈ −0.131, so it is in (0.625, 0.75). Each step halves the interval.

Counting zeros from a table

In a table of values of a continuous function, each sign change between neighboring x-values guarantees at least one zero between them. AP Calculus problems often ask for the least possible number of zeros this way.

Practice problems

  1. Show that f(x) = x^3 - 4x + 1 has a zero in (0, 1).
  2. Show that x^4 - 3x = 5 has a solution in (1, 2).
  3. Does the IVT guarantee a zero of f(x) = x^2 - 4x + 5 on [0, 3]? Explain.
  4. Can the IVT be used for f(x) = \frac{1}{x - 2} on [1, 3]? Explain.
  5. Show that e^x = 3 - x has a solution in (0, 1).
  6. Show that \sin x = 0.5 has a solution in \left(0, \frac{\pi}{2}\right).
  7. A continuous function has f(1) = 4, f(2) = 1, f(3) = −2, f(4) = −1 and f(5) = 3. What is the least number of zeros f must have on [1, 5]?
  8. Use two steps of the bisection method on f(x) = x^2 - 5 starting with [2, 3].
  9. A continuous function has f(0) = 6 and f(4) = −2. Must f(c) = 3 for some c in (0, 4)?
  10. A car speeds up from 0 to 60 mph in 8 seconds. Explain why its speed was exactly 37 mph at some moment.
Show answers

1.

f(0) = 0 - 0 + 1 = 1

f is a polynomial, so it is continuous on [0, 1].

f(1) = 1 - 4 + 1 = -2

Evaluate at 1.

Answer: f(0) is positive and f(1) is negative, so by the IVT f has a zero in (0, 1).

2.

g(x) = x^4 - 3x - 5

Move everything to one side; g is a polynomial, so it is continuous.

g(1) = 1 - 3 - 5 = -7

Evaluate at 1.

g(2) = 16 - 6 - 5 = 5

Evaluate at 2.

Answer: g changes sign, so by the IVT g(c) = 0 for some c in (1, 2), and that c solves x^4 - 3x = 5.

3.

f(0) = 5

Evaluate at 0.

f(3) = 9 - 12 + 5 = 2

Evaluate at 3.

Answer: no. Both values are positive, so the IVT gives no guarantee. (In fact, x^2 - 4x + 5 = (x - 2)^2 + 1 is never 0.)

4.

x - 2 = 0

f is undefined at x = 2, which is inside [1, 3].

Answer: no. f is not continuous on [1, 3], so the theorem does not apply, even though f(1) = −1 and f(3) = 1 have opposite signs.

5.

g(x) = e^x + x - 3

Move everything to one side; g is continuous.

g(0) = 1 + 0 - 3 = -2

Evaluate at 0.

g(1) = e + 1 - 3 \approx 0.718

Evaluate at 1, using e \approx 2.718.

Answer: g changes sign, so by the IVT there is a c in (0, 1) with e^c = 3 - c.

6.

\sin 0 = 0

Sine is continuous on \left[0, \frac{\pi}{2}\right].

\sin\frac{\pi}{2} = 1

Evaluate at the right endpoint.

Answer: 0.5 is between 0 and 1, so by the IVT \sin c = 0.5 for some c in the interval. (It is c = \frac{\pi}{6}.)

7.

f(2) = 1 \gt 0 \gt f(3) = -2

Sign change between x = 2 and x = 3.

f(4) = -1 \lt 0 \lt f(5) = 3

Sign change between x = 4 and x = 5.

Answer: at least 2 zeros.

8.

f(2.5) = 6.25 - 5 = 1.25

f(2) = −1 and f(3) = 4. Check the midpoint 2.5.

f(2.25) = 5.0625 - 5 = 0.0625

f(2.5) is positive, so the zero is in (2, 2.5). Check its midpoint, 2.25.

Answer: f(2) is negative and f(2.25) is positive, so the zero is in (2, 2.25). (It is \sqrt{5} \approx 2.236.)

9.

-2 \lt 3 \lt 6

3 is between f(4) and f(0), and f is continuous.

Answer: yes, by the intermediate value theorem.

10.

s(0) = 0

Let s(t) be the speed after t seconds. Speed changes continuously.

s(8) = 60

The speed after 8 seconds.

Answer: 37 is between 0 and 60, so by the IVT s(c) = 37 for some time c between 0 and 8 seconds.

Intermediate value theorem FAQ

What does the intermediate value theorem say?

If f is continuous on [a, b], it takes every value between f(a) and f(b) at least once somewhere between a and b.

How do you use the IVT to show a root exists?

Show f is continuous on [a, b], then show f(a) and f(b) have opposite signs. The theorem guarantees a c in (a, b) with f(c) = 0.

What are the conditions of the intermediate value theorem?

f must be continuous on the closed interval [a, b], and the target value N must lie between f(a) and f(b).

Does the intermediate value theorem tell you how many roots there are?

No. It guarantees at least one value c, but there may be more. It also does not say where c is.

Summary

  • If f is continuous on [a, b] and N is between f(a) and f(b), then f(c) = N for some c in (a, b).
  • To show a zero exists, show continuity and a sign change.
  • For an equation g(x) = h(x), apply the theorem to g(x) − h(x).
  • The theorem fails without continuity, and it never says where c is or how many there are.
  • The bisection method narrows down where c is.

Previous lesson: Continuity

Next lesson: Epsilon-Delta Definition of a Limit

Back to the Calculus 1 Index