The intermediate value theorem from Calculus 1 looks obvious in a picture, but it is false over the rationals: $x^{2} - 2$ goes from negative to positive on $[1, 2]$ and is never $0$ at a rational point. Its proof needs completeness and continuity together.
🔑 Key idea
Intermediate value theorem. If $f$ is continuous on $[a, b]$ and $f(a) < y < f(b)$ (or $f(a) > y > f(b)$), then $f(c) = y$ for some $c \in (a, b)$. In particular a continuous function that changes sign on $[a, b]$ has a root there.
💡 Why it works
It is enough to handle $f(a) < 0 < f(b)$ (subtract $y$ otherwise). Let $c = \sup\{x \in [a, b] : f(x) < 0\}$, which exists by completeness. $f(c) < 0$ is impossible: by continuity $f$ would stay negative a little to the right of $c$, so $c$ would not be an upper bound (and $c \ne b$ since $f(b) > 0$). $f(c) > 0$ is impossible: $f$ would stay positive on an interval $(c - \delta, c]$, so $c - \delta$ would already be an upper bound, smaller than $c$ (and $c \ne a$ since $f(a) < 0$). So $f(c) = 0$. $\blacksquare$ A second proof halves the interval again and again, keeping the half where the sign changes; the nested intervals close in on a root. That proof is also an algorithm: bisection.
$f(x) = x^{3} + 2x - 5$ changes sign on $[1, 2]$: trace the curve and see where it crosses.
Worked examples
✏️ Worked example: Bisection by hand
For $f(x) = x^{3} + 2x - 5$ on $[1, 2]$ ($f(1) = -2 < 0 < 7 = f(2)$), run three bisection steps.
Answer: The root lies in $\left[\frac{5}{4}, \frac{11}{8}\right]$, an interval of length $\frac{1}{8}$.
✏️ Worked example: Counting forced roots
A continuous $f$ has $f(-2) = 3$, $f(-1) = -1$, $f(0) = -4$, $f(1) = 2$, $f(2) = 5$. How many roots must it have in $[-2, 2]$?
Sign changes: between $-2$ and $-1$, and between $0$ and $1$.
Answer: At least $2$ (there could be more).
✏️ Worked example: When the theorem does not apply
$f(x) = \frac{1}{x}$ has $f(-1) = -1 < 0 < 1 = f(1)$. Does the IVT give a root in $[-1, 1]$?
$f$ is not continuous on $[-1, 1]$: it is not even defined at $0$.
Answer: No, and indeed $\frac{1}{x}$ is never $0$.
⚠️ Common mistake
Skipping the hypothesis, or reading too much into the conclusion. The function must be continuous on the whole closed interval; one bad point can let it jump over $0$. And the theorem only says a root exists, somewhere in $(a, b)$: it does not say there is only one, or where it is. For uniqueness you need more (for example, a strictly increasing function).
Practice
Pass with 3 right answers, the last 2 in a row. Each right answer earns 2 XP.