real analysis30 min

Epsilon-Delta Continuity

The rigorous epsilon-delta definition of continuity and uniform continuity — making the intuitive notion of no jumps mathematically precise

0/9Not Started

Why This Matters

In calculus, continuity means "you can draw the graph without lifting your pen." That is a useful picture, but it is far too vague for proving theorems. The epsilon-delta definition makes continuity precise: f is continuous at c if for every epsilon greater than 0, there exists a delta greater than 0 such that whenever |x - c| is less than delta, |f(x) - f(c)| is less than epsilon.

Uniform continuity strengthens this by requiring one delta to work for all points simultaneously. This distinction matters enormously: on a closed bounded interval, every continuous function is uniformly continuous (Heine-Cantor theorem), but on unbounded domains, functions like x^2 are continuous but not uniformly continuous. Mastering rigorous continuity is the gateway to understanding differentiability, integrability, and the topology of function spaces.

Define Terms

Visual Model

Intuitive ContinuityNo jumps or breaks
Epsilon-Delta DefinitionFor all eps, exists delta...
Pointwise ContinuityDelta depends on c and eps
Uniform ContinuityDelta depends only on eps
Heine-Cantor TheoremContinuous on [a,b] => uniform
Sequential Criterionx_n -> c => f(x_n) -> f(c)
Discontinuity TypesRemovable, jump, essential

The full process at a glance. Click Start tour to walk through each step.

Epsilon-delta turns the intuitive idea of continuity into a precise, provable condition.

Code Example

Code
// Epsilon-delta continuity verification
// For f(x) = x^2 at c, find delta given epsilon
function findDelta(f, c, epsilon, precision) {
  // Binary search for the largest delta that works
  let lo = 0, hi = 1;
  // First find a delta that works
  let delta = precision;
  while (delta < hi) {
    // Check if |f(c + delta) - f(c)| < epsilon and |f(c - delta) - f(c)| < epsilon
    if (Math.abs(f(c + delta) - f(c)) >= epsilon ||
        Math.abs(f(c - delta) - f(c)) >= epsilon) {
      break;
    }
    delta *= 2;
  }
  // Binary search for largest valid delta
  lo = 0;
  hi = delta;
  for (let i = 0; i < 50; i++) {
    const mid = (lo + hi) / 2;
    // Sample points in (-mid, mid) around c
    let valid = true;
    for (let t = -mid; t <= mid; t += mid / 20) {
      if (Math.abs(f(c + t) - f(c)) >= epsilon) {
        valid = false;
        break;
      }
    }
    if (valid) lo = mid;
    else hi = mid;
  }
  return lo;
}

const f = x => x * x;
console.log("f(x) = x^2:");
for (const c of [1, 5, 10]) {
  const eps = 0.1;
  const delta = findDelta(f, c, eps, 0.0001);
  console.log(`  At c=${c}, eps=${eps}: delta=${delta.toFixed(6)}`);
  // Theoretical: delta = min(1, eps/(2|c|+1)) works
  const theory = Math.min(1, eps / (2 * Math.abs(c) + 1));
  console.log(`  Theoretical bound: delta=${theory.toFixed(6)}`);
}

// Uniform continuity check: same delta works everywhere?
console.log("\nUniform continuity check for f(x) = x^2 on [0, 10]:");
const eps = 0.1;
const deltas = [];
for (let c = 0; c <= 10; c += 0.5) {
  deltas.push(findDelta(f, c, eps, 0.0001));
}
console.log("  Min delta across [0,10]:", Math.min(...deltas).toFixed(6));
console.log("  Max delta across [0,10]:", Math.max(...deltas).toFixed(6));
console.log("  Delta varies with c => uniform cont on bounded interval");

// f(x) = sqrt(x) is uniformly continuous on [0, inf)
console.log("\nf(x) = sqrt(x): uniformly continuous");
const g = x => Math.sqrt(x);
for (const c of [1, 100, 10000]) {
  const delta = findDelta(g, c, 0.01, 0.0001);
  console.log(`  At c=${c}: delta=${delta.toFixed(6)}`);
}

Interactive Experiment

Try these exercises:

  • For f(x) = 3x + 1, prove (on paper or verify numerically) that delta = epsilon/3 always works. Why is this function uniformly continuous?
  • For f(x) = 1/x at c = 0.01, find delta for epsilon = 0.1. Now try c = 0.001. How does delta change? Why?
  • Check whether f(x) = sin(1/x) can be made continuous at x = 0 by defining f(0) = some value. Test sequences x_n = 1/(n*pi).
  • Compare the deltas needed for f(x) = x^2 at c = 1 versus c = 1000 for the same epsilon. Why does this show f is not uniformly continuous on all of R?
  • Verify the Heine-Cantor theorem numerically: for f(x) = x^2 on [0, 5], show that one delta works for all c in [0, 5] for a fixed epsilon.

Quick Quiz

Coding Challenge

Find Delta for Epsilon

Write a function called `findDeltaForEpsilon` that takes a function f, a point c, and a positive epsilon. It should return a positive delta such that for all x with |x - c| below delta, we have |f(x) - f(c)| below epsilon. Use a numerical approach: start with delta = epsilon, then halve it until the condition holds when tested at sample points within the delta neighborhood. Test at least 100 sample points in (c - delta, c + delta).

Loading editor...

Real-World Usage

Epsilon-delta reasoning appears far beyond pure mathematics:

  • Numerical stability: Proving that an algorithm is numerically stable means showing that small perturbations in input (delta) produce small perturbations in output (epsilon) — exactly the continuity condition.
  • Control systems: A control system is robust if small disturbances produce bounded responses. This is formalized using epsilon-delta style arguments.
  • Machine learning: Lipschitz continuity (a strong form of uniform continuity) is used to bound the sensitivity of neural networks to input perturbations, critical for adversarial robustness.
  • Computer graphics: Level-of-detail algorithms decide rendering precision based on viewer distance, implicitly using continuity to guarantee visual quality within a tolerance.
  • Approximation theory: Polynomial approximation (Weierstrass theorem) guarantees continuous functions can be uniformly approximated — a direct application of uniform continuity on bounded intervals.

Connections