← Back to MATH 4630

The Intermediate Value Theorem

What does the IVT say?

Draw any continuous path from a point below the $x$-axis to a point above it, without lifting your pen. You must cross the axis somewhere.

x f(x) a b c f(a)<0 f(b)>0 f(c)=0

The goal of this handout is to understand why it needs a proof, and what property of $\mathbb{R}$ makes it true.

Activity

Q1. Consider $f(x) = x^2 - 2$ on $[1,2]$. Compute $f(1)$ and $f(2)$. What does IVT (believe it for a moment) promise about $f(x)=0$?
Q2. Now restrict entirely to $\mathbb{Q}$: work only with $x \in [1,2]\cap\mathbb{Q}$. Does $f(x)=0$ have a solution? Why not?
Q3. So $f$ is continuous, $f(1) < 0 < f(2)$, yet the equation $f(x)=0$ has no solution in $[1,2]\cap\mathbb{Q}$. Which hypothesis of IVT is failing here?
Q4. What does $\mathbb{Q}$ lack that $\mathbb{R}$ has, and how does that gap allow $f$ to "skip" the value $0$?

Note. Every proof of IVT must use something $\mathbb{Q}$ lacks:

Does IVT apply?

For each scenario, decide (without computing anything) whether the IVT guarantees a solution. If yes, state what it guarantees. If no, explain which hypothesis fails.

(a) $f(x) = x^3 - 3x + 1$ on $[0,1]$. Does $f(c) = 0$ for some $c \in (0,1)$?
(b) $h(x) = x^2 - 2$ on $(1,2)$. Does $h(c) = 0$ for some $c \in (1,2)$?
(c) $p(x) = \lfloor x \rfloor$ on $[0,2]$. Does $p(c) = \frac{1}{2}$ for some $c \in (0,2)$?

The Theorem

Theorem (Intermediate Value Theorem)

Let $f: [a,b] \to \mathbb{R}$ be continuous. If $L$ is a real number satisfying $f(a) < L < f(b)$ or $f(a) > L > f(b)$, then there exists a point $c \in (a,b)$ such that $f(c) = L$.

x f(x) a b c f(a) f(b) L

Why each hypothesis is necessary:

Condition dropped Counterexample What fails
$f$ not continuous
Domain not a closed interval (e.g. open)
$\mathbb{R}$ replaced by $\mathbb{Q}$

Proof via the Axiom of Completeness

We prove the special case $f(a) < 0 < f(b)$. The general case follows by replacing $f$ with $f - L$.

x f(x) a b c f(a)<0 f(b)>0

Proof sketch. Let $K = \{x \in [a,b] : f(x) \leq 0\}$.

Step 1. Explain why $K$ is non-empty and bounded above. Conclude $c = \sup K$ exists.
Step 2. Show $f(c) \leq 0$.
Step 3. Show $f(c) \geq 0$.
Step 4. Combine Steps 2 and 3. Conclude that $f(c) = 0$ and $c \in (a,b)$. $\square$

Proof via the Nested Interval Property

The NIP gives an algorithmic proof: we bisect our way to the root.

$I_0=[a,b]$ $I_1$ $I_2$ c

Proof sketch. Again assume $f(a) < 0 < f(b)$. Let $I_0 = [a,b]$ and $z = \frac{a+b}{2}$.

Bisection rule:

If $f(z) \geq 0$, let $I_1 = \phantom{[a,b]}$

If $f(z) < 0$, let $I_1 = \phantom{[a,b]}$

In either case, $I_1 = [a_1,b_1]$ satisfies

Continuing inductively, we get nested closed intervals $I_0 \supseteq I_1 \supseteq I_2 \supseteq \cdots$ with $|I_n| = \frac{b-a}{2^{n}}$.

(a) Invoke the NIP to find a point $c$ in the intersection of all $I_n$. What does the fact that $|I_n| \to 0$ tell you about the left endpoints $a_n$ and right endpoints $b_n$?
(b) By construction, $f(a_n) < 0$ and $f(b_n) \geq 0$ for all $n$. Conclude $f(c) \leq 0$ and $f(c) \geq 0$.
(c) Conclude $f(c) = 0$. $\square$

Application: Existence of Roots

Example 1. Show that the polynomial $p(x) = x^5 - 3x^3 + x - 1$ has at least two real roots.

Strategy: Evaluate $p$ at a few well-chosen integers and apply IVT on each sign-change interval.

Fixed Points

A fixed point of $f$ is a point $x_0$ such that $f(x_0) = x_0$ — the function maps the point to itself.

Theorem

Let $f: [0,1] \to [0,1]$ be continuous. Then $f$ has at least one fixed point, i.e., there exists $x_0 \in [0,1]$ with $f(x_0) = x_0$.

x f(x) y=x 1 1 x₀ x₀ f

Proof sketch. Define $g(x) = f(x) - x$ on $[0,1]$.

(a) Compute $g(0)$ and $g(1)$ and find out the signs.
(b) Apply IVT to $g$ to find $x_0$ with $g(x_0) = 0$, i.e., $f(x_0) = x_0$.

Preservation of Connected Sets

There is a more conceptual proof of IVT using the topology of $\mathbb{R}$.

Theorem

Let $f: G \to \mathbb{R}$ be continuous. If $E \subseteq G$ is connected, then $f(E)$ is connected.

Proof. Suppose for contradiction that $f(E)$ is not connected. Then there exist nonempty sets $A, B$ with

, ,

Define the preimages $C = f^{-1}(A)\cap E$ and $D = f^{-1}(B)\cap E$.

(a) Verify that $C$ and $D$ are nonempty, and $E = C\cup D$.
(b) Show that $\overline{C}\cap D = \emptyset$ and $C\cap\overline{D} = \emptyset$, so that $C$ and $D$ are separated.
Corollary. IVT follows immediately. Explain why.

Does the Converse Hold?

Definition

A function $f$ has the intermediate value property (IVP) on $[a,b]$ if for all $x < y$ in $[a,b]$ and all $L$ between $f(x)$ and $f(y)$, there exists $c \in (x,y)$ with $f(c) = L$.

IVT says: continuous $\Rightarrow$ IVP. Is the converse true?

Counterexample. Consider $g(x) = \begin{cases} \sin\left(\frac{1}{x}\right) & x \neq 0 \\ 0 & x = 0. \end{cases}$
x g(x) sin(1/x)
(a) Is $g$ continuous at $0$?
(b) Despite this, it can be shown that $g$ does not have the IVP on $[0,1]$.

Activity

Problem 1. True/False (justify each):

(a) If $f: [a,b] \to \mathbb{R}$ is continuous and $f(a) \cdot f(b) < 0$, then $f$ has at least one root in $(a,b)$.

(b) If $f: [0,1] \to [0,1]$ is continuous, then $f$ has exactly one fixed point.

(c) If $f: \mathbb{R} \to \mathbb{R}$ is continuous and $\lim_{x\to -\infty} f(x) = -\infty$ and $\lim_{x \to +\infty} f(x) = +\infty$, then $f$ has at least one root.