Unit 1 · Topic 1.16

Guarantee an intermediate value

Builds on continuity at a point and on an interval. 12 minutes.

  1. Example 1Check the Intermediate Value Theorem conditions
  2. Example 2Identify a guaranteed intermediate value
  3. Example 3Choose the strongest justified conclusion
  4. Example 4Recognize when the theorem cannot decide

Some equations, such as \(2^x=3x\), cannot be solved with algebra. You can still prove that this equation has a solution, and find an interval that contains one. The proof uses a property of continuous functions: on a closed interval, a continuous function takes every value between its values at the two ends.

This topic proves that property, applies it, and shows what it cannot decide.

A continuous function takes every value in between

The graph of a function f from an input a to an input b, with a filled dot at each end, beside a vertical axis that names the end heights f of a and f of b, which faint dashed lines join to the dots. The graph rises from f of a to a peak above f of b, falls to a low point between the two end heights, and rises again to f of b. An orange horizontal line at a height k, which a slider moves, meets the graph at orange dots, with faint dashed lines down to the inputs; a single crossing is named c. One button halves the interval again and again, and an orange bar on the x-axis shows the half that is kept. Another button puts a jump in the graph near a, where a red segment marks the heights that the graph skips.

Figure 1Orange dots mark where the graph of \(f\) meets the orange line at height \(\cy{k}\), and faint dashed lines lead to the axes. The orange bar on the x-axis is the interval that each halving keeps, and the red segment marks the heights that a jump skips.

In Figure 1, \(f\) is continuous on the closed interval \([a,b]\). Its graph runs without a break between the filled dots at \((a,f(a))\) and \((b,f(b))\). The orange line is at a height \(\cy{k}\) between \(f(a)\) and \(f(b)\). The graph starts below the line and ends above it, and it crosses the line at the orange dot. The input \(\cy{c}\) of that point satisfies \(f(c)=k\). Move the line with the slider. Some heights are reached three times, but every height between \(f(a)\) and \(f(b)\) is reached at least once.

Halving the interval proves that \(f\) must take the value \(k\). Suppose that \(f(a)<k<f(b)\), and cut \([a,b]\) at its midpoint \(m\). If \(f(m)=k\), then \(c=m\). If \(f(m)<k\), keep the right half \([m,b]\). If \(f(m)>k\), keep the left half \([a,m]\). Either way, \(f\) is below \(k\) at the left end of the kept half and above \(k\) at its right end. Cut the kept half in the same way, again and again. Press Halve the interval under Figure 1 several times. While \(\cy{k}\) is between \(f(a)\) and \(f(b)\), the orange bar on the x-axis shows each kept interval.

Each kept interval lies inside the one before and is half as long. The number line has no gaps, so the kept intervals close in on one number \(c\), which lies in all of them. This property of the real numbers is called completeness.

Suppose that \(f(c)\) were greater than \(k\). Because \(f\) is continuous at \(c\), \(f(x)\) differs from \(f(c)\) by less than \(f(c)-k\) for every \(x\) in \([a,b]\) close enough to \(c\). For those \(x\), \(f(x)>k\). But the left ends of the kept intervals come as close to \(c\) as you like, so one of them is that close to \(c\). At that left end, \(f\) is below \(k\), and this contradiction shows that \(f(c)\) is not greater than \(k\). The right ends show in the same way that it is not less than \(k\), so \(f(c)=k\). Since \(f(a)\) and \(f(b)\) are not equal to \(k=f(c)\), the number \(c\) is neither \(a\) nor \(b\), so it lies in \((a,b)\). If \(f(a)>k>f(b)\), the same argument works with below and above swapped.

This result is the Intermediate Value Theorem. A number strictly between the end values \(f(a)\) and \(f(b)\) is called an intermediate value. The theorem guarantees that a function continuous on \([a,b]\) takes each intermediate value at least once in \((a,b)\).

The argument uses continuity at \(c\), wherever \(c\) turns out to be. Use the button under Figure 1 to put a jump in \(f\). The graph jumps from a filled dot to an open ring, and the orange line passes through the red segment between them. Halve the interval again. The bar closes in on the jump, where \(f\) is not continuous, so the step that used continuity at \(c\) fails.

Applying the theorem

The theorem needs two conditions, called its hypotheses. The first is that \(f\) is continuous at every input of the closed interval \([a,b]\). At an end, only the side inside the interval counts (topic 1.12), so \(\lim_{x\to a^+}f(x)\) must equal \(f(a)\), and \(\lim_{x\to b^-}f(x)\) must equal \(f(b)\). The ends matter, because the halving can close in on one. Polynomials, roots, exponentials, \(\ln x\), \(\sin x\) and \(\cos x\) are continuous at every input inside their domains (topic 1.12). A function built from them can break only where it has no value or at a join, an input where its formula changes. Test those inputs of \([a,b]\).

The second hypothesis is that the target value \(k\) lies strictly between \(f(a)\) and \(f(b)\), in either order: \(f(a)<k<f(b)\) or \(f(b)<k<f(a)\).

To show that an equation has a solution, move every term to one side, so that it reads \(f(x)=0\). The target is then \(k=0\), and the second hypothesis asks for end values of opposite signs, \(f(a)\,f(b)<0\). Some books call this case Bolzano's theorem. For \(2^x=3x\), the function \(2^x-3x\) is continuous everywhere, with values \(-1\) at \(x=3\) and 17 at \(x=5\), so the equation has a solution in \((3,5)\).

The theorem guarantees at least one \(c\), but it does not say how many there are or where in \((a,b)\) they lie. Some heights in Figure 1 are reached three times. Each interval inside \([a,b]\) whose end values lie on opposite sides of \(k\) holds a solution strictly inside it. Two such intervals that share at most an end therefore hold at least two different solutions. Halving such an interval narrows down where a solution lies. A claim of exactly one solution needs another fact, for example that \(f\) is increasing on \([a,b]\). This means that a larger input always gives a larger output, so \(f\) takes no value twice.

When the theorem cannot decide

If a hypothesis fails on \([a,b]\), the theorem gives no conclusion there, and \(f\) may or may not take the value \(k\). With the jump in place, move the line in Figure 1 to a height between the red segment and \(f(b)\). The graph still meets it, although \(f\) is not continuous. Without the jump, move the line slightly above \(f(b)\). The second hypothesis fails, but the graph still reaches some of these heights. To decide such a case, solve \(f(x)=k\), read the graph, or apply the theorem on a smaller interval where both hypotheses hold.

Example 1

Check the Intermediate Value Theorem conditions

Let \(g(x)=\sqrt{x+1}\) for \(-1\le x\le 3\), and \(g(x)=x^2-7\) for \(3<x\le 4\). Show that \(g\) satisfies the hypotheses of the Intermediate Value Theorem on \([-1,4]\), and find all \(k\) for which the theorem guarantees a solution of \(g(x)=k\) in \((-1,4)\).

Solution

The polynomial \(x^2-7\) is continuous everywhere, and the root \(\sqrt{x+1}\) is continuous wherever \(x+1>0\), so each piece has no break inside it. At each end of \([-1,4]\), only the limit from inside the interval counts:

\[\begin{aligned}\lim_{x\to -1^+}\sqrt{x+1}&=0=g(-1)\\ \lim_{x\to 4^-}\left(x^2-7\right)&=9=g(4)\end{aligned}\]

At the join, the two one-sided limits and the value, which the first formula gives, must agree:

\[\begin{aligned}\lim_{x\to 3^-}g(x)&=\sqrt{3+1}=2\\ \lim_{x\to 3^+}g(x)&=3^2-7=2\\ g(3)&=\sqrt{3+1}=2\end{aligned}\]

The three numbers agree, so \(g\) is continuous at 3 and on all of \([-1,4]\). Since \(g(-1)=0\) and \(g(4)=9\), the theorem guarantees a solution of \(g(x)=k\) in \((-1,4)\) for every \(k\) with \(0<k<9\).

Example 2

Identify a guaranteed intermediate value

Show that the equation \(\cos x=x\) has at least one solution in the interval \(\left(\frac{\pi}{6},\frac{\pi}{3}\right)\).

Solution

Move both terms to one side. The equation holds exactly when \(h(x)=0\), where

\[h(x)=\cos x-x\]

The cosine and \(x\) are continuous everywhere, so \(h\) is continuous on \(\left[\frac{\pi}{6},\frac{\pi}{3}\right]\). Its end values are

\[\begin{aligned}h\!\left(\tfrac{\pi}{6}\right)&=\tfrac{\sqrt3}{2}-\tfrac{\pi}{6}\\ h\!\left(\tfrac{\pi}{3}\right)&=\tfrac12-\tfrac{\pi}{3}\end{aligned}\]

The first is positive, because \(\frac{\sqrt3}{2}=\frac{\sqrt{27}}{6}>\frac56>\frac{\pi}{6}\), and the second is negative, because \(\frac{\pi}{3}>1>\frac12\). The target 0 therefore lies strictly between them. By the Intermediate Value Theorem, \(h(c)=0\) for at least one \(c\) in \(\left(\frac{\pi}{6},\frac{\pi}{3}\right)\), and this number satisfies \(\cos c=c\). You cannot find \(c\) with algebra, and the theorem does not need its value.

Example 3

Choose the strongest justified conclusion

The function \(p\) is continuous on \([0,4]\), and the table gives some of its values. What is the strongest conclusion that the Intermediate Value Theorem gives about the solutions of \(p(x)=10\) in \((0,4)\)? \[\begin{array}{c|ccccc}x&0&1&2&3&4\\ \hline p(x)&14&7&5&12&16\end{array}\]

Solution

Because \(p\) is continuous on \([0,4]\), it is continuous on each interval between neighboring inputs of the table. The theorem gives a solution inside such an interval when 10 lies strictly between its end values, which happens twice:

\[\begin{aligned}p(1)=7&<10<14=p(0)\\ p(2)=5&<10<12=p(3)\end{aligned}\]

The intervals \((0,1)\) and \((2,3)\) do not overlap, so these two solutions are different numbers. On \([1,2]\) and \([3,4]\), both end values lie on the same side of 10, so the theorem decides nothing there.

The strongest conclusion is that \(p(x)=10\) has at least two solutions in \((0,4)\): at least one in \((0,1)\) and at least one in \((2,3)\).

Example 4

Recognize when the theorem cannot decide

Let \(q(x)=\dfrac{x^2-x-2}{x-2}\) for \(x\neq 2\), and let \(q(2)=8\). Explain why the Intermediate Value Theorem cannot be applied to \(q\) on \([0,6]\). Then decide whether each of the equations \(q(x)=3\) and \(q(x)=5\) has a solution in \([0,6]\).

Solution

For \(x\neq 2\), the numerator factors as \((x-2)(x+1)\), so \(q(x)=x+1\). The end values are \(q(0)=1\) and \(q(6)=7\), and both 3 and 5 lie strictly between them. The first hypothesis fails, because the limit at 2 is not the value there:

\[\begin{aligned}\lim_{x\to 2}q(x)&=\lim_{x\to 2}\,(x+1)=3\\ q(2)&=8\end{aligned}\]

Since 2 lies in \([0,6]\), the theorem gives no conclusion on \([0,6]\) about either equation, so solve each one directly.

For \(x\neq 2\), \(q(x)=3\) means \(x+1=3\), whose only solution, \(x=2\), is excluded. At 2 itself, \(q(2)=8\). Therefore \(q(x)=3\) has no solution: the graph of \(q\) skips the height 3 at its hole.

For \(q(x)=5\), the equation \(x+1=5\) gives \(x=4\), and \(q(4)=5\). This equation has a solution, although the theorem gives no conclusion.

Each example is one of the four skills of topic 1.16 in Which & Why: AP Calculus.