Skip to content

Uniform Continuity

In this lesson you’ll learn the difference between continuity and uniform continuity, why the distinction is about quantifier order, the theorem that continuity on a compact set is automatically uniform, and how Lipschitz conditions fit in.

Continuity on a set SS:

aS  ε>0  δ>0  xS:  xa<δ    f(x)f(a)<ε\forall a \in S \; \forall \varepsilon>0 \; \exists \delta>0 \; \forall x \in S: \; |x-a|<\delta \implies |f(x)-f(a)|<\varepsilon

Uniform continuity on SS:

ε>0  δ>0  x,yS:  xy<δ    f(x)f(y)<ε\forall \varepsilon>0 \; \exists\delta>0 \; \forall x,y \in S: \; |x-y|<\delta \implies |f(x)-f(y)|<\varepsilon

The symbols are nearly identical. The order of the quantifiers is the entire difference.

In ordinary continuity, a\forall a comes before δ\exists \delta, so δ\delta may depend on the point. In uniform continuity, δ\exists\delta comes first, so one δ\delta must serve every point at once.

Uniform continuity implies continuity. The converse is where the interest is.

Take f(x)=1xf(x) = \frac1x on (0,1](0,1]. It is continuous at every point of its domain. But for a fixed ε\varepsilon, the required δ\delta shrinks as the point approaches 0, because the graph steepens without bound. There is no smallest positive δ\delta that works everywhere.

Formally: for any candidate δ\delta, you can find two points closer than δ\delta whose outputs differ by more than ε\varepsilon. Near 0 the function changes so fast that any fixed input window produces an arbitrarily large output change.

f(x)=x2f(x) = x^2 on R\mathbb{R} fails for the same reason at the other end. Take x=nx = n and y=n+1ny = n + \frac{1}{n}. Then xy=1n0|x-y| = \frac1n \to 0, but

f(y)f(x)=(n+1n)2n2=2+1n2>2|f(y)-f(x)| = \left(n+\tfrac1n\right)^2 - n^2 = 2 + \tfrac{1}{n^2} > 2

So ε=1\varepsilon = 1 has no workable δ\delta. Unbounded slope over an unbounded domain is the obstruction, and squaring is a perfectly nice function otherwise.

If ff is continuous on a compact set KK, then ff is uniformly continuous on KK.

For R\mathbb{R} this means: continuous on a closed bounded interval implies uniformly continuous there.

Proof. Let ε>0\varepsilon>0. For each aKa \in K, continuity gives δa>0\delta_a > 0 with f(x)f(a)<ε2|f(x)-f(a)| < \frac{\varepsilon}{2} whenever xa<δa|x-a|<\delta_a.

Cover KK by the intervals (aδa2,a+δa2)\left(a - \frac{\delta_a}{2}, a + \frac{\delta_a}{2}\right). By compactness, finitely many suffice, centred at a1,,ana_1,\dots,a_n. Set

δ=min(δa12,,δan2)>0\delta = \min\left(\frac{\delta_{a_1}}{2},\dots,\frac{\delta_{a_n}}{2}\right) > 0

positive because it is a minimum of finitely many positive numbers.

Now take any x,yKx, y \in K with xy<δ|x-y|<\delta. The point xx lies in some (aiδai2,ai+δai2)\left(a_i - \frac{\delta_{a_i}}{2}, a_i + \frac{\delta_{a_i}}{2}\right), and then yaiyx+xai<δ+δai2δai|y - a_i| \le |y-x| + |x-a_i| < \delta + \frac{\delta_{a_i}}{2} \le \delta_{a_i}. So both xx and yy are within δai\delta_{a_i} of aia_i, giving

f(x)f(y)f(x)f(ai)+f(ai)f(y)<ε2+ε2=ε|f(x)-f(y)| \le |f(x)-f(a_i)| + |f(a_i)-f(y)| < \frac{\varepsilon}{2}+\frac{\varepsilon}{2} = \varepsilon

The whole proof is the finiteness trick. Infinitely many δa\delta_a have an infimum that may be 0; finitely many have a positive minimum. Compactness is what makes the collection finite. This is the argument previewed two lessons ago, now cashed in.

ff is Lipschitz on SS with constant KK if

f(x)f(y)Kxyfor all x,yS|f(x)-f(y)| \le K|x-y| \quad \text{for all } x,y \in S

Lipschitz implies uniformly continuous: take δ=εK\delta = \frac{\varepsilon}{K}, which depends only on ε\varepsilon.

The chain of strength:

Lipschitz    uniformly continuous    continuous\text{Lipschitz} \implies \text{uniformly continuous} \implies \text{continuous}

Both implications are strict. x\sqrt x on [0,1][0,1] is uniformly continuous (continuous on a compact set) but not Lipschitz, because its slope 12x\frac{1}{2\sqrt x} blows up at 0. And 1x\frac1x on (0,1](0,1] is continuous but not uniformly continuous.

A useful sufficient condition: if ff' is bounded by KK on an interval, then ff is Lipschitz with constant KK, by the mean value theorem. That is usually the easiest way to establish uniform continuity in practice.

Uniform continuity is exactly what you need to make an approximation valid across a whole domain rather than point by point. Two places it is indispensable:

  • Riemann integrability. Proving every continuous function on [a,b][a,b] is integrable requires making the oscillation on every subinterval small at once, with a single mesh size. That is uniform continuity.
  • Extending functions and swapping limits. Uniform continuity lets a function defined on a dense subset extend continuously to the whole space, which is how many constructions in analysis get off the ground.

Example 1: Show f(x)=3x+2f(x) = 3x+2 is uniformly continuous on R\mathbb{R}.

Solution. Given ε>0\varepsilon>0, take δ=ε3\delta = \frac{\varepsilon}{3}. For any x,yx,y with xy<δ|x-y|<\delta,

f(x)f(y)=3xy<3δ=ε|f(x)-f(y)| = 3|x-y| < 3\delta = \varepsilon

δ\delta depends only on ε\varepsilon. Every linear function is Lipschitz with K=mK = |m|, hence uniformly continuous on all of R\mathbb{R}.

Example 2: Show f(x)=x2f(x)=x^2 is uniformly continuous on [0,5][0,5] but not on R\mathbb{R}.

Solution. On [0,5][0,5]. x2y2=xyx+y10xy|x^2-y^2| = |x-y||x+y| \le 10|x-y| since x,y5x,y \le 5. Take δ=ε10\delta = \frac{\varepsilon}{10}. ✓ (Lipschitz with K=10K=10.)

On R\mathbb{R}. Take xn=nx_n = n, yn=n+1ny_n = n+\frac1n. Then xnyn=1n0|x_n-y_n| = \frac1n \to 0 but

f(yn)f(xn)=2+1n2>2|f(y_n)-f(x_n)| = 2 + \frac{1}{n^2} > 2

So with ε=1\varepsilon=1, no δ\delta works. Not uniformly continuous on R\mathbb{R}.

Note the same function is uniformly continuous on every bounded interval and fails globally. Uniform continuity is a property of the function together with its domain.

Example 3: Show 1x\frac1x is not uniformly continuous on (0,1](0,1].

Solution. Let ε=1\varepsilon=1 and take any δ>0\delta>0. Choose nn with 1n<δ\frac1n < \delta and set

xn=1n,yn=1n+1x_n = \frac{1}{n}, \qquad y_n = \frac{1}{n+1}

Then xnyn=1n(n+1)<1n<δ|x_n-y_n| = \frac{1}{n(n+1)} < \frac1n < \delta, while

f(xn)f(yn)=n(n+1)=1ε|f(x_n)-f(y_n)| = |n - (n+1)| = 1 \ge \varepsilon

So no δ\delta works. Not uniformly continuous.

The construction pattern is worth remembering: to disprove uniformity, produce two sequences with xnyn0|x_n-y_n|\to0 and f(xn)f(yn)|f(x_n)-f(y_n)| bounded away from 0.

Example 4: x\sqrt x is uniformly continuous but not Lipschitz on [0,1][0,1].

Solution. Uniformly continuous. Continuous on the compact [0,1][0,1], so the theorem applies. ✓

Not Lipschitz. Suppose xyKxy|\sqrt x - \sqrt y| \le K|x-y| for all x,yx,y. Take y=0y=0:

xKx    K1x\sqrt x \le Kx \implies K \ge \frac{1}{\sqrt x}

which is unbounded as x0+x \to 0^+. No finite KK exists. ∎

The middle implication is strict, and this is the standard example.

Example 5: A bounded derivative gives Lipschitz.

Show sinx\sin x is uniformly continuous on R\mathbb{R}.

Solution. sinx=cosx1|\sin'x| = |\cos x| \le 1, so by the mean value theorem, for any x<yx<y there is cc with

sinysinx=coscyxyx|\sin y - \sin x| = |\cos c||y-x| \le |y-x|

Lipschitz with K=1K=1, hence uniformly continuous on R\mathbb{R} with δ=ε\delta = \varepsilon. ∎

Contrast x2x^2, whose derivative 2x2x is unbounded on R\mathbb{R}. A bounded derivative is the practical test.

Example 6: Continuous on an unbounded domain, and still uniform.

Is f(x)=11+x2f(x) = \frac{1}{1+x^2} uniformly continuous on R\mathbb{R}?

Solution. Yes. Its derivative is 2x(1+x2)2\frac{-2x}{(1+x^2)^2}, which is bounded on R\mathbb{R} (it tends to 0 at both ends and is continuous, so it attains a finite maximum modulus).

Bounded derivative gives Lipschitz gives uniform continuity. ✓

So compactness is sufficient, not necessary. Plenty of functions on unbounded domains are uniformly continuous; they just have to flatten out rather than steepen.

Example 7: Quantifier order made concrete.

For f(x)=x2f(x)=x^2 on [0,5][0,5] and ε=0.1\varepsilon = 0.1, compare the δ\delta needed at x=0x=0 and at x=5x=5.

Solution. Near 0: x20<0.1|x^2 - 0| < 0.1 needs x<0.316|x| < 0.316, so δ0.316\delta \approx 0.316 is fine.

Near 5: x225=x5x+510x5|x^2-25| = |x-5||x+5| \approx 10|x-5|, so we need x5<0.01|x-5| < 0.01.

Different points need very different δ\delta. Uniform continuity does not deny that; it only requires that some single δ\delta works for all, and here δ=0.01\delta = 0.01 does. Uniformity fails only when the required δ\delta has infimum 0, which cannot happen on a compact set.

Numerical integration and step size. Choosing one step size hh for a whole interval assumes a uniform error bound, which requires uniform continuity of the integrand (or of a derivative). Adaptive quadrature exists precisely because the required step varies when uniformity is weak, refining where the function changes fast.

ODE solvers and existence theory. The Picard-Lindelöf theorem requires the right-hand side to be Lipschitz in the state variable. Without it, solutions can fail to be unique - y=yy' = \sqrt y with y(0)=0y(0)=0 has more than one solution, and  \sqrt{\ } failing Lipschitz at 0 is exactly why.

Machine learning robustness. The Lipschitz constant of a network bounds how much the output can move when the input is perturbed, so it directly bounds vulnerability to adversarial examples. Spectral normalization is a technique for controlling it deliberately.

Signal sampling. Reconstructing a signal from samples with a uniform error guarantee needs uniform continuity or a bandwidth limit. A signal with unbounded rate of change cannot be reconstructed uniformly from any fixed sample rate.

Control system gain. A Lipschitz constant is a worst-case gain: the largest output change per unit input change. Stability margins are computed from exactly this quantity.

Floating-point error propagation. Whether a fixed input precision guarantees a fixed output precision across the whole input range is a uniform continuity question. Functions that steepen, like division near zero, lose precision catastrophically, which is why numerical code special-cases them.

What distinguishes uniform continuity from ordinary continuity?
Why is 1/x not uniformly continuous on (0, 1]?
What does the compactness theorem say?
Which chain of implications is correct?
Why is x² uniformly continuous on [0, 5] but not on ℝ?
What is the easiest practical test for uniform continuity on an interval?