Real Analysis · Undergraduate

Continuity and a Proof of the Intermediate Value Theorem

Quick answer

A function f is continuous at a when f(x) can be kept within any ε of f(a) by keeping x within some δ of a; equivalently, f(xₙ) → f(a) whenever xₙ → a. The intermediate value theorem says a continuous function on [a, b] takes every value between f(a) and f(b). Its proof uses the completeness axiom: the supremum of the points where f is below the target is exactly where f hits it. Bisection turns the theorem into an algorithm that halves the interval around a root at every step.

What you'll learn

  • State the ε-δ and sequential definitions of continuity
  • Prove the intermediate value theorem from completeness
  • Use the theorem to show an equation has a solution
  • Locate a root by bisection and count the steps needed

Continuity, precisely

In calculus, continuity means the limit equals the value. In ε-δ form, ff is continuous at aa if

∀ε>0 ∃δ>0: ∣x−a∣<δ  ⟹  ∣f(x)−f(a)∣<ε\forall\varepsilon > 0\ \exists\delta > 0:\ |x - a| < \delta \implies |f(x) - f(a)| < \varepsilon

An equivalent sequential form: whenever xn→ax_n \to a, also f(xn)→f(a)f(x_n) \to f(a). Sums, products, quotients (where defined) and compositions of continuous functions are continuous.

Intermediate value theorem. If ff is continuous on [a,b][a, b] and yy lies between f(a)f(a) and f(b)f(b), then f(c)=yf(c) = y for some cc in [a,b][a, b].

Why completeness proves the theorem

Say f(a)<0<f(b)f(a) < 0 < f(b), and look for a zero. Let S={x∈[a,b]:f(x)<0}S = \{x \in [a, b] : f(x) < 0\}. It is nonempty (it contains aa) and bounded by bb, so by the completeness axiom it has a supremum cc. If f(c)<0f(c) < 0, continuity keeps ff negative a little to the right of cc, so cc would not be an upper bound of SS. If f(c)>0f(c) > 0, continuity keeps ff positive a little to the left of cc, so a smaller number would bound SS. Both are impossible, so f(c)=0f(c) = 0: the root sits exactly at the edge of where ff is negative. Over the rationals the same set can have no supremum, and x2−2x^2 - 2 has no rational root even though it changes sign on [1,2][1, 2].

Worked examples

Common mistakes

Practice problems

  1. Show that cos⁡x=x\cos x = x has a solution in [0,1][0, 1].

    Answer

    g(x)=cos⁡x−xg(x) = \cos x - x has g(0)=1>0g(0) = 1 > 0 and g(1)≈−0.46<0g(1) \approx -0.46 < 0.

    Full solution

    gg is continuous, so the intermediate value theorem gives a zero in [0,1][0, 1].

  2. How many bisection steps reduce an interval of length 11 below 0.0010.001?

    Answer

    1010

    Full solution

    After nn steps the length is 2−n2^{-n}, and 210=1,024>1,0002^{10} = 1{,}024 > 1{,}000.

  3. How many bisection steps reduce an interval of length 44 below 0.010.01?

    Answer

    99

    Full solution

    Need 42n<0.01\tfrac{4}{2^n} < 0.01, that is 2n>4002^n > 400; 29=5122^9 = 512.

  4. For f(x)=5x−2f(x) = 5x - 2, what δ\delta works for a given ε\varepsilon at every point?

    Answer

    δ=ε5\delta = \tfrac{\varepsilon}{5}

    Full solution

    ∣f(x)−f(a)∣=5∣x−a∣<5δ=ε|f(x) - f(a)| = 5|x - a| < 5\delta = \varepsilon.

  5. After the first bisection step for x2−2x^2 - 2 on [1,2][1, 2], which half is kept? Give its left endpoint.

    Answer

    11

    Full solution

    f(1.5)=0.25>0f(1.5) = 0.25 > 0 and f(1)=−1<0f(1) = -1 < 0, so the sign change is in [1,1.5][1, 1.5].

  6. Does every polynomial of odd degree have a real root? Answer yes or no.

    Answer

    Yes

    Full solution

    It tends to −∞-\infty at one end and +∞+\infty at the other, so it changes sign on some [a,b][a, b], and the intermediate value theorem applies.

  7. Use sequences to show f(x)=x2f(x) = x^2 is continuous at aa.

    Answer

    If xn→ax_n \to a, then xn2=xn⋅xn→a⋅a=a2x_n^2 = x_n \cdot x_n \to a \cdot a = a^2.

    Full solution

    Limits of products are products of limits, so f(xn)→f(a)f(x_n) \to f(a).

  8. A student says 1x\tfrac{1}{x} must equal 00 somewhere on [−1,1][-1, 1] because it changes sign. What is wrong?

    Answer

    1x\tfrac{1}{x} is not continuous on [−1,1][-1, 1]; it is undefined at 00.

    Full solution

    The intermediate value theorem needs continuity on the whole closed interval.

Frequently asked questions

What does it mean for f to be continuous at a?

For every ε > 0 there is δ > 0 such that |x − a| < δ implies |f(x) − f(a)| < ε. Equivalently, whenever xₙ → a, f(xₙ) → f(a).

What does the intermediate value theorem say?

If f is continuous on [a, b] and y is between f(a) and f(b), then f(c) = y for some c in [a, b].

Why does the theorem need completeness?

On the rationals it fails: x² − 2 is negative at 1 and positive at 2 but has no rational root. The proof finds the root as a supremum, which exists only in ℝ.

What is bisection?

Check the sign of f at the midpoint of an interval where f changes sign, and keep the half where it still changes sign. Each step halves the interval.

How many bisection steps are needed?

Starting from length L, after n steps the interval has length L/2ⁿ. For accuracy 0.001 from length 1, n = 10 steps suffice, since 2¹⁰ = 1,024.

What to learn next