Unit 2, lesson 18

The Intermediate Value Theorem

Why a function that is continuous on a closed interval takes every value between its endpoint values, how that proves equations have solutions, and what goes wrong without continuity.

  • Theory part 35
  • Practice part 36
  • Continuity Theorems

Theory, part 35

Practice, part 36

If you were 3 kilometers from home at noon and 8 kilometers away at one o’clock, then at some moment in between you were exactly 5 kilometers away. You cannot skip a distance, because you cannot teleport. The intermediate value theorem says the same thing for any continuous function, and it turns into a simple way to prove that an equation has a solution without solving it.

Key terms

Continuity on a closed interval

Definition A function ff is continuous on [a,b][a, b], with a<ba < b, if it is continuous at every point of the open interval (a,b)(a, b), continuous from the right at aa, and continuous from the left at bb. In symbols, lim⁡x→cf(x)=f(c)\lim_{x \to c} f(x) = f(c) for each c∈(a,b)c \in (a, b), together with

lim⁡x→a+f(x)=f(a)andlim⁡x→b−f(x)=f(b).\lim_{x \to a^+} f(x) = f(a) \quad \text{and} \quad \lim_{x \to b^-} f(x) = f(b).

In plain words The graph over [a,b][a, b] can be drawn without lifting the pen, and it starts and ends at filled dots that the curve really reaches.

Example The polynomial p(x)=x3+x−1p(x) = x^3 + x - 1 is continuous everywhere, so it is continuous on [0,1][0, 1]. The function 1x−2\frac{1}{x - 2} is continuous on [0,1][0, 1] but not on [0,3][0, 3], since it is undefined at 22.

The intermediate value theorem

Definition Let ff be continuous on [a,b][a, b], and let NN be any number strictly between f(a)f(a) and f(b)f(b). Then there is at least one number cc in the open interval (a,b)(a, b) with

f(c)=N.f(c) = N.

In plain words Every height between the starting height and the ending height is hit somewhere along the way.

Example Let f(x)=x2f(x) = x^2 on [1,2][1, 2]. Then f(1)=1f(1) = 1 and f(2)=4f(2) = 4, and N=2N = 2 lies between them. The theorem guarantees some c∈(1,2)c \in (1, 2) with c2=2c^2 = 2. That cc is 2\sqrt{2}, so the theorem proves that a positive square root of 22 exists as a real number.

Existence of a root

Definition Let ff be continuous on [a,b][a, b] and suppose f(a)f(a) and f(b)f(b) have opposite signs, that is f(a)f(b)<0f(a) f(b) < 0. Then ff has at least one root in (a,b)(a, b), a number cc with f(c)=0f(c) = 0. This is the intermediate value theorem with N=0N = 0. Repeatedly halving the interval and keeping the half where the sign changes is the bisection method, which traps a root in smaller and smaller intervals.

In plain words If a continuous function is negative at one end and positive at the other, it crosses zero somewhere in between.

Example For p(x)=x3+x−1p(x) = x^3 + x - 1 on [0,1][0, 1] we have p(0)=−1<0p(0) = -1 < 0 and p(1)=1>0p(1) = 1 > 0, so a root lies in (0,1)(0, 1). Bisection narrows it down.

IntervalMidpoint mmp(m)p(m)Root lies in
[0,1][0, 1]0.50.5−0.375-0.375[0.5,1][0.5, 1]
[0.5,1][0.5, 1]0.750.750.1718750.171875[0.5,0.75][0.5, 0.75]
[0.5,0.75][0.5, 0.75]0.6250.625−0.130859375-0.130859375[0.625,0.75][0.625, 0.75]

The root is about 0.68230.6823. Here there is exactly one root, because x3x^3 and xx are both increasing, so pp is increasing and can cross zero only once.

No automatic uniqueness

Definition The intermediate value theorem asserts that at least one cc exists. It says nothing about how many. To show there is exactly one solution you need extra information, for example that ff is strictly increasing or strictly decreasing on [a,b][a, b].

In plain words The theorem promises a crossing. It does not promise only one.

Example Let f(x)=x3−xf(x) = x^3 - x on [−2,2][-2, 2]. Then f(−2)=−6f(-2) = -6 and f(2)=6f(2) = 6, so there is a root in (−2,2)(-2, 2). In fact x3−x=x(x−1)(x+1)x^3 - x = x(x - 1)(x + 1) has three roots there, namely −1-1, 00 and 11.

Counterexamples when continuity fails

Definition If ff is not continuous at even one point of [a,b][a, b], the conclusion can fail. There can be a value NN strictly between f(a)f(a) and f(b)f(b) with f(x)≠Nf(x) \neq N for every x∈[a,b]x \in [a, b]. The converse of the theorem is also false, since a function can take every intermediate value without being continuous.

In plain words A single break is enough for the function to skip over values.

Example On [−1,1][-1, 1] consider

f(x)={∣x∣x,x≠0,0,x=0.f(x) = \begin{cases} \dfrac{\lvert x \rvert}{x}, & x \neq 0, \\ 0, & x = 0. \end{cases}

It has f(−1)=−1f(-1) = -1 and f(1)=1f(1) = 1. The value N=12N = \frac{1}{2} lies between them, but ff only takes the values −1-1, 00 and 11. The trouble is the jump at 00. A failure at an endpoint is enough too. On [0,1][0, 1] let

g(x)={−1,x=0,x,0<x≤1.g(x) = \begin{cases} -1, & x = 0, \\ x, & 0 < x \le 1. \end{cases}

Then g(0)=−1g(0) = -1 and g(1)=1g(1) = 1, yet gg never equals −12-\frac{1}{2}, because gg is not continuous from the right at 00.

Check yourself

  1. Show that x4=x+1x^4 = x + 1 has a solution between 11 and 22.
Show the answer

Let f(x)=x4−x−1f(x) = x^4 - x - 1, a polynomial and so continuous on [1,2][1, 2]. Then f(1)=−1<0f(1) = -1 < 0 and f(2)=13>0f(2) = 13 > 0, so some c∈(1,2)c \in (1, 2) has f(c)=0f(c) = 0, which means c4=c+1c^4 = c + 1.

  1. A function satisfies f(0)=2f(0) = 2 and f(3)=−1f(3) = -1, and is continuous on [0,3][0, 3]. Must it equal 00 somewhere in (0,3)(0, 3)? Must it equal 55 somewhere?
Show the answer

It must equal 00, because 00 lies between −1-1 and 22. It need not equal 55, which is outside that range. For example f(x)=2−xf(x) = 2 - x never reaches 55 on [0,3][0, 3].

  1. Can you use the intermediate value theorem to find a root of 1x\frac{1}{x} on [−1,1][-1, 1]?
Show the answer

No. The function is not defined at 00, so it is not continuous on [−1,1][-1, 1], and indeed 1x\frac{1}{x} has no root at all even though it changes sign.

How this lesson connects

It also uses intervals.