Tutorials › Real Analysis › Prove the Intermediate Value Theorem

Comprehensive Proof Practicum · Tutorial 970 of 1000

Prove the Intermediate Value Theorem

Learn how completeness of the real numbers and continuity force a function to take every value between its endpoint values.

Advanced 9 min read

What You'll Learn

  • Build a level-set argument using the supremum property of the real numbers
  • Prove the Intermediate Value Theorem when endpoint values increase
  • Handle decreasing endpoint values by reflecting the interval
  • Apply the theorem to establish zeros from a sign change
  • Deduce that the continuous image of an interval is an interval

Why Continuity Forces Intermediate Values

A continuous function cannot move from one value to another while skipping a value in between. The Intermediate Value Theorem makes this intuition precise, but its proof requires more than manipulating the definition of continuity at a single point: we must first locate the point where the function reaches the target. The completeness of the real numbers supplies that location through a supremum.

The previous tutorial used sequences to characterize closed sets. Here we use a different completeness tool already established in the course: the Epsilon Characterization of the Supremum. The proof will collect all points where the function is below the target, take their supremum, and show that continuity forces the function’s value there to be exactly the target. We begin with the case in which the endpoint values increase from left to right.

Theorem (Increasing-Endpoint Crossing Lemma): Let \(a<b\), let \(f:[a,b]\to\mathbb R\) be continuous, and suppose \(f(a)<y<f(b)\). Then there is a \(c\in(a,b)\) such that \(f(c)=y\).

Proof. Define the set \(E=\{x\in[a,b]:f(x)<y\}\). It is nonempty because \(a\in E\), and it is bounded above by \(b\). Let \(c=\sup E\). Since \(E\subseteq[a,b]\), we have \(a\leq c\leq b\).

We show that \(f(c)=y\). First suppose \(f(c)<y\). By continuity at \(c\), there is a \(\delta>0\) such that whenever \(x\in[a,b]\) and \(|x-c|<\delta\), we have \(f(x)<y\). Also \(c\neq b\), since \(f(b)>y\). Choose \(x\) with \(c<x\leq b\) and \(x-c<\delta\); for example, take \(x=c+\min\{\delta/2,(b-c)/2\}\). Then \(x\in E\) and \(x>c\), contradicting that \(c\) is an upper bound for \(E\). Thus \(f(c)\) cannot be less than \(y\).

Next suppose \(f(c)>y\). Continuity at \(c\) gives a \(\delta>0\) such that \(x\in[a,b]\) and \(|x-c|<\delta\) imply \(f(x)>y\). The Epsilon Characterization of the Supremum says that because \(c=\sup E\), there is an \(x\in E\) with \(c-\delta<x\leq c\). For this \(x\), \(|x-c|<\delta\), so continuity gives \(f(x)>y\), whereas \(x\in E\) gives \(f(x)<y\). This is a contradiction. Therefore \(f(c)\) is neither less than nor greater than \(y\), and \(f(c)=y\). Since \(f(a)<y<f(b)\), \(c\) is neither endpoint, so \(c\in(a,b)\). \(\square\)

The two contradiction arguments use the supremum in complementary ways. If the function were already below the target at \(c\), continuity would keep it below just to the right, producing a point of \(E\) larger than its supremum. If it were above the target at \(c\), continuity would make it above just to the left, contradicting the existence of points of \(E\) arbitrarily close to \(c\). The only value left is \(y\).

Prove the Intermediate Value Theorem

Theorem (Intermediate Value Theorem): Let \(a<b\), let \(f:[a,b]\to\mathbb R\) be continuous, and let \(y\) lie between \(f(a)\) and \(f(b)\), inclusive. Then there is a \(c\in[a,b]\) such that \(f(c)=y\). If \(y\) is strictly between the endpoint values, \(c\) can be chosen in \((a,b)\).

Proof. If \(y=f(a)\), choose \(c=a\). If \(y=f(b)\), choose \(c=b\). It remains to treat the case where \(y\) is strictly between the endpoint values.

If \(f(a)<y<f(b)\), the Increasing-Endpoint Crossing Lemma gives \(c\in(a,b)\) with \(f(c)=y\). Now suppose instead that \(f(b)<y<f(a)\). Define a reflected function on the same interval by \(h(t)=f(a+b-t)\) for \(t\in[a,b]\). The reflection \(t\mapsto a+b-t\) takes \([a,b]\) into itself. The function \(h\) is continuous: at any \(t_0\in[a,b]\), the input to \(f\) changes by exactly the same distance, since \(|(a+b-t)-(a+b-t_0)|=|t-t_0|\). Thus continuity of \(f\) at \(a+b-t_0\) gives continuity of \(h\) at \(t_0\).

The reflected endpoint values are \(h(a)=f(b)<y<f(a)=h(b)\). Apply the Increasing-Endpoint Crossing Lemma to \(h\). There is a \(t\in(a,b)\) such that \(h(t)=y\). Set \(c=a+b-t\). Since \(a<t<b\), we also have \(a<c<b\), and \(f(c)=f(a+b-t)=h(t)=y\). This proves the theorem in both endpoint orders. \(\square\)

The reflection step is essential in the decreasing-endpoint case. One cannot apply the increasing-endpoint lemma to a function whose values decrease from left to right. Instead, reflection reverses the input order, so the transformed function has its smaller endpoint value at the left and its larger endpoint value at the right. The point found for the reflected function then translates back to a point of the original interval.

Worked Example: A Decreasing Endpoint Order

Let \(f(t)=7-2t\) on \([1,4]\), and consider the target \(y=1\). The endpoint values are \(f(1)=7-2(1)=5\) and \(f(4)=7-2(4)=-1\), so \(f(4)<1<f(1)\). The theorem guarantees a point where \(f\) equals \(1\). In this example we can also find it directly: \(7-2c=1\), so \(2c=6\) and \(c=3\). The point lies in the required interval, since \(1<3<4\), and substitution verifies the value: \(f(3)=7-2(3)=1\).

The reflection makes the proof pattern visible. Here \(h(t)=f(1+4-t)=7-2(5-t)=2t-3\). Its endpoint values are \(h(1)=-1<1<5=h(4)\). The increasing-endpoint case gives a \(t\in(1,4)\) with \(h(t)=1\); in fact \(t=2\), and reflecting back gives \(c=1+4-2=3\).

Worked Example: A Root from Opposite Signs

Consider \(p(x)=x^3-3x+1\) on \([0,1]\). Polynomials are continuous, and direct substitution gives \(p(0)=0^3-3(0)+1=1\) and \(p(1)=1^3-3(1)+1=-1\). Thus \(p(1)<0<p(0)\). The Intermediate Value Theorem, with target \(y=0\), gives a \(c\in(0,1)\) such that \(p(c)=0\). This proves that the polynomial has a root in the stated interval; the theorem guarantees existence without requiring us to solve the cubic explicitly.

Checking the signs at the endpoints is crucial. The conclusion follows from continuity together with the strict inequalities \(p(1)<0<p(0)\), not merely from the fact that the polynomial takes different endpoint values.

Worked Example: An Intermediate Value on a Nonmonotone Function

Let \(f(x)=(x-1)^2\) on \([0,3]\). The endpoint values are \(f(0)=(0-1)^2=1\) and \(f(3)=(3-1)^2=4\). The target \(y=2\) lies strictly between them, so the theorem guarantees at least one \(c\in(0,3)\) with \(f(c)=2\). Solving the equation confirms the possibilities: \((c-1)^2=2\), hence \(c=1-\sqrt2\) or \(c=1+\sqrt2\). Because \(\sqrt2>1\), the first value is negative and does not lie in \((0,3)\). Because \(1<\sqrt2<2\), the second satisfies \(0<1+\sqrt2<3\). Substitution gives \(f(1+\sqrt2)=((1+\sqrt2)-1)^2=(\sqrt2)^2=2\).

This example also shows why endpoint information alone does not determine how many times the target is reached. The theorem promises at least one such point, not exactly one, and it does not require the function to be monotone.

Two Useful Consequences

Corollary (Sign-Change Theorem): If \(f:[a,b]\to\mathbb R\) is continuous and \(f(a)\) and \(f(b)\) have opposite signs, then \(f\) has a zero in \((a,b)\).

Proof. Opposite signs mean either \(f(a)<0<f(b)\) or \(f(b)<0<f(a)\). In either case, \(0\) lies strictly between the endpoint values. The Intermediate Value Theorem gives \(c\in(a,b)\) with \(f(c)=0\). \(\square\)

The sign-change theorem is often the most convenient form when the goal is to establish a root. The hypothesis is about the signs at two endpoints; continuity then supplies the zero between them. A sign change is sufficient, but it is not necessary for a zero: for instance, a function can touch zero and turn back without changing sign.

Theorem (Continuous Images of Intervals Are Intervals): Let \(I\subseteq\mathbb R\) be an interval, and let \(f:I\to\mathbb R\) be continuous. Then \(f(I)=\{f(x):x\in I\}\) is an interval.

Proof. If \(f(I)\) is empty or contains only one point, it is an interval. Otherwise, take any \(u,v\in f(I)\) with \(u<v\). By the definition of image, there are \(x_1,x_2\in I\) with \(f(x_1)=u\) and \(f(x_2)=v\). Since \(I\) is an interval, every point between \(x_1\) and \(x_2\) belongs to \(I\), regardless of which of \(x_1,x_2\) comes first. The closed segment with endpoints \(x_1,x_2\) is therefore contained in \(I\), and \(f\) is continuous on that segment.

For any \(w\) with \(u<w<v\), the Intermediate Value Theorem on this segment gives a point \(z\) between \(x_1\) and \(x_2\) such that \(f(z)=w\). Hence \(w\in f(I)\). The endpoints \(u\) and \(v\) are already in \(f(I)\). Thus every real number between any two values of \(f(I)\) also belongs to \(f(I)\), which is exactly the definition of an interval. \(\square\)

Worked Example: Using the Interval-Image Theorem

Let \(I=(-2,2)\) and \(f(x)=\sin x\). The function is continuous on \(I\), so the Continuous Images of Intervals Are Intervals theorem says that \(f(I)\) is an interval. To see particular values in the image, note that \(f(0)=0\) and \(f(1)=\sin 1\). Since \(0<1<\pi/2\), \(\sin 1>0\). For any \(w\) with \(0<w<\sin 1\), the Intermediate Value Theorem applied on \([0,1]\) gives \(c\in(0,1)\) with \(\sin c=w\). Thus every value between these two exhibited image values is attained.

The interval-image result is stronger than checking one pair of endpoints: it applies to any two values attained anywhere in \(I\), even when the original interval is open or unbounded. For each selected pair of input points, the proof uses the closed segment joining them.

Proof Choices and Common Pitfalls

The supremum proof is useful when the theorem asks for a point whose existence is forced by both order and continuity. The set \(E\) encodes one side of the desired crossing, and its supremum marks the boundary between points known to be below the target and points that cannot remain below it. Completeness ensures that this boundary exists; continuity identifies its function value.

Several details prevent gaps in the argument. The set \(E\) must be nonempty and bounded above before its supremum can be used. The proof that \(f(c)>y\) needs points of \(E\) arbitrarily close to \(c\), which is exactly the approximation property supplied by the Epsilon Characterization of the Supremum. The proof that \(f(c)<y\) needs a point to the right of \(c\); the strict endpoint inequality \(f(b)>y\) rules out \(c=b\). Finally, a target equal to an endpoint value should be handled directly rather than forcing it into a strict-inequality argument.

A different common error arises when the endpoint values are in decreasing order. The increasing-endpoint lemma has a specific hypothesis about their order, so it cannot simply be applied to the original function in that case. Reflect the input using \(h(t)=f(a+b-t)\), apply the lemma to \(h\), and then reflect the point back. This preserves the interval and reverses which endpoint value appears first.

1
Check endpoint values.
Decide whether the target is strictly between them or equals one of them; endpoint equality is immediate.
2
Use the supremum when values increase.
Form the set of inputs where the function is below the target, and take its supremum.
3
Reflect when values decrease.
Apply the increasing-endpoint argument to \(h(t)=f(a+b-t)\), then translate the resulting point back.

Check Your Understanding

Use the proof and consequences above to answer the following questions.

  1. Why is the set \(E=\{x\in[a,b]:f(x)<y\}\) nonempty and bounded above in the increasing-endpoint proof?
  2. Which supremum property supplies a point of \(E\) close to \(c=\sup E\) when ruling out \(f(c)>y\)?
  3. If \(f(b)<y<f(a)\), what endpoint inequalities does the reflected function \(h(t)=f(a+b-t)\) satisfy?
  4. Why does opposite sign at the endpoints guarantee a zero in the open interval rather than only in the closed interval?
  5. In the proof that a continuous image of an interval is an interval, why may the Intermediate Value Theorem be applied between preimages of two values?