Skip to content
Tutorials Center
My learning

Topics

Lesson 19 of 37 · Continuity

Epsilon-Delta Continuity

Learn the rigorous definition of continuity with epsilon and delta, the sequential criterion, and how to build delta proofs step by step with runnable checks.

In calculus you probably heard that a function is continuous if you can draw it "without lifting your pencil". That picture is useful, but it cannot prove anything. Analysis replaces it with a precise statement about how much the output can change when the input changes a little. This lesson gives that statement, shows how to prove it for concrete functions, and connects it to sequences.

The definition

Let f be a function defined on a set D ⊆ ℝ, and let a ∈ D. We say f is continuous at a if

Text
for every ε > 0 there exists δ > 0 such that
for all x ∈ D with |x - a| < δ we have |f(x) - f(a)| < ε.

Read it as a game. An opponent picks a tolerance ε for the output. You must answer with a δ so that every input within δ of a gives an output within ε of f(a). If you can win for every ε, f is continuous at a. The function is continuous on D if it is continuous at every point of D.

Notice that δ may depend on ε and on the point a. That second dependence matters later, in the lesson on uniform continuity.

Building a delta proof

A delta proof has two phases: scratch work (find δ) and the written proof (show δ works).

Example. Prove that f(x) = x² is continuous at a.

Scratch work: |x² - a²| = |x - a|·|x + a|. If we first force |x - a| < 1, then |x| < |a| + 1, so |x + a| ≤ |x| + |a| < 2|a| + 1. Then |x² - a²| < |x - a|·(2|a| + 1). We want this below ε, so we need |x - a| < ε / (2|a| + 1).

Proof: given ε > 0, let δ = min(1, ε / (2|a| + 1)). If |x - a| < δ, then |x - a| < 1, so the bound above holds, and |x² - a²| < δ(2|a| + 1) ≤ ε. ∎

The trick of capping δ at 1 (or some other constant) to control a second factor is the standard move. The next program does not prove anything, but it tests a proposed δ by sampling many points strictly inside the interval.

Python Test a delta formula for f(x) = x²

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Passing the test for sample points is evidence, not a proof. The algebra above is the proof.

Continuity via sequences

There is an equivalent formulation that is often easier for disproving continuity.

Theorem (sequential criterion). f is continuous at a if and only if for every sequence (xₙ) in D with xₙ → a, we have f(xₙ) → f(a).

Idea of proof. (⇒) Given ε, take the δ from continuity; since xₙ → a, eventually |xₙ - a| < δ, so eventually |f(xₙ) - f(a)| < ε. (⇐) Suppose f is not continuous at a. Then for some ε₀, every δ = 1/n has a point xₙ with |xₙ - a| < 1/n but |f(xₙ) - f(a)| ≥ ε₀. That sequence converges to a while f(xₙ) does not converge to f(a). ∎

To show a function is discontinuous at a, you only need to exhibit one sequence that misbehaves.

Python Disproving continuity with sequences

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Since f(xₙ) = 1 and f(yₙ) = -1 for all n, at most one of these constant limits could equal f(0), so f is not continuous at 0, no matter how f(0) is defined.

Combining continuous functions

The sequential criterion makes algebra easy. If f and g are continuous at a, then so are f + g, f·g, and (when g(a) ≠ 0) f/g, because the corresponding limit laws for sequences hold. A composition g ∘ f is continuous at a when f is continuous at a and g is continuous at f(a): if xₙ → a then f(xₙ) → f(a) and then g(f(xₙ)) → g(f(a)).

So polynomials, rational functions (where defined), sin, cos, eˣ and so on are continuous wherever they are defined, once you have proved the basic building blocks.

A function can be continuous at one point only. For example, f(x) = x for rational x and f(x) = 0 for irrational x is continuous at 0 and nowhere else. Check: near 0, |f(x)| ≤ |x|, so δ = ε works at 0.

Check your understanding

Quick check · 4 questions

of 4 answered You scored / 4 · perfect!

  1. 1. In the definition of continuity at a, which quantity do you choose in response to the other?

    The opponent supplies epsilon; you must produce a delta that works for it.
  2. 2. To prove f is NOT continuous at a using the sequential criterion, you should find:

    One bad sequence is enough, because continuity requires f(xn) to converge to f(a) for every sequence xn that converges to a.
  3. 3. In the delta proof for x squared, why do we also require delta to be at most 1?

    Keeping |x - a| < 1 gives |x| < |a| + 1, which controls the second factor |x + a|.
  4. 4. If f and g are continuous at a, which of these is guaranteed continuous at a?

    Sums are always continuous. A quotient needs g(a) different from 0.

Summary

  • f is continuous at a if every ε > 0 has a δ > 0 with |x - a| < δ ⇒ |f(x) - f(a)| < ε.
  • A delta proof has scratch work to find δ, then a clean proof that it works; capping δ at a constant is a common tool.
  • Sequential criterion: continuity at a is the same as xₙ → a ⇒ f(xₙ) → f(a) for all sequences.
  • Sums, products, quotients (nonzero denominator) and compositions of continuous functions are continuous.

Next: The Intermediate Value Theorem