Unit 2, lesson 19

Uniform Continuity

The difference between continuity at each point and uniform continuity on a set, why continuous functions on closed bounded intervals are uniformly continuous, and why that matters for integrals.

  • Theory part 37
  • Practice part 38
  • Continuity Theorems

Theory, part 37

Nothing loads from YouTube until you press play.

Practice, part 38

Nothing loads from YouTube until you press play.

Imagine you need the output of a function to within 0.010.01, and you ask how precisely you must know the input. For a continuous function the answer is always some positive tolerance, but it may change from place to place. Near the origin 1x\frac{1}{x} demands ever finer input precision, while a straight line asks for the same precision everywhere. Uniform continuity is the property of needing just one tolerance for the whole set.

Key terms

Pointwise versus uniform continuity

Definition Let ff be defined on a set SS. Then ff is continuous on SS (pointwise) if for every c∈Sc \in S and every ε>0\varepsilon > 0 there is δ>0\delta > 0 such that

x∈S and ∣x−c∣<δ  ⟹  ∣f(x)−f(c)∣<ε.x \in S \text{ and } \lvert x - c \rvert < \delta \implies \lvert f(x) - f(c) \rvert < \varepsilon.

Here δ\delta may depend on both ε\varepsilon and cc. The function ff is uniformly continuous on SS if for every ε>0\varepsilon > 0 there is δ>0\delta > 0 such that

x,y∈S and ∣x−y∣<δ  ⟹  ∣f(x)−f(y)∣<ε.x, y \in S \text{ and } \lvert x - y \rvert < \delta \implies \lvert f(x) - f(y) \rvert < \varepsilon.

Here δ\delta depends only on ε\varepsilon. Every uniformly continuous function is continuous, but not the other way around.

In plain words The two definitions differ only in the order of the quantifiers. For pointwise continuity you first pick a point and then find δ\delta. For uniform continuity you must find δ\delta before anyone tells you the point.

Example Let f(x)=3x+1f(x) = 3x + 1 on all of R\mathbb{R}. For any two inputs

∣f(x)−f(y)∣=3∣x−y∣,\lvert f(x) - f(y) \rvert = 3 \lvert x - y \rvert,

so δ=ε3\delta = \frac{\varepsilon}{3} works for every pair of points. For ε=0.03\varepsilon = 0.03, inputs within 0.010.01 of each other always give outputs within 0.030.03. So ff is uniformly continuous on R\mathbb{R}.

One delta for all points

Definition To prove that ff is uniformly continuous on SS, start from an arbitrary ε>0\varepsilon > 0 and produce a single δ>0\delta > 0, written in terms of ε\varepsilon only, such that ∣f(x)−f(y)∣<ε\lvert f(x) - f(y) \rvert < \varepsilon for all x,y∈Sx, y \in S with ∣x−y∣<δ\lvert x - y \rvert < \delta. A common route is a bound ∣f(x)−f(y)∣≤K∣x−y∣\lvert f(x) - f(y) \rvert \le K \lvert x - y \rvert valid on all of SS for one constant K>0K > 0, which allows δ=εK\delta = \frac{\varepsilon}{K}.

In plain words Find one tolerance that is small enough for the worst place in the set. If the function never gets steeper than some fixed slope, that slope tells you the tolerance.

Example Take f(x)=x2f(x) = x^2 on [0,2][0, 2]. For x,y∈[0,2]x, y \in [0, 2],

∣x2−y2∣=∣x+y∣ ∣x−y∣≤4∣x−y∣.\lvert x^2 - y^2 \rvert = \lvert x + y \rvert \, \lvert x - y \rvert \le 4 \lvert x - y \rvert.

So δ=ε4\delta = \frac{\varepsilon}{4} works everywhere on [0,2][0, 2]. For ε=0.1\varepsilon = 0.1, inputs within 0.0250.025 give outputs within 0.10.1, whether you are near 00 or near 22.

Continuous functions on closed bounded intervals

Definition If ff is continuous on a closed bounded interval [a,b][a, b], then ff is uniformly continuous on [a,b][a, b]. The proof uses the completeness of the real numbers. Here is a sketch. If ff were not uniformly continuous, there would be some ε>0\varepsilon > 0 and, for each nn, points xn,ynx_n, y_n in [a,b][a, b] with ∣xn−yn∣<1n\lvert x_n - y_n \rvert < \frac{1}{n} but ∣f(xn)−f(yn)∣≥ε\lvert f(x_n) - f(y_n) \rvert \ge \varepsilon. The numbers xnx_n form a bounded sequence, and the Bolzano-Weierstrass theorem, which comes back with sequences later in the course, says that some subsequence xnkx_{n_k} converges to a number cc. This cc lies in [a,b][a, b] because the interval is closed. The matching ynky_{n_k} converge to the same cc. Continuity at cc then gives f(xnk)→f(c)f(x_{n_k}) \to f(c) and f(ynk)→f(c)f(y_{n_k}) \to f(c), so ∣f(xnk)−f(ynk)∣→0\lvert f(x_{n_k}) - f(y_{n_k}) \rvert \to 0, which contradicts ∣f(xnk)−f(ynk)∣≥ε\lvert f(x_{n_k}) - f(y_{n_k}) \rvert \ge \varepsilon.

In plain words On a closed bounded interval there is no place for the steepness to run off to, so plain continuity is already enough.

Example The function x\sqrt{x} on [0,1][0, 1] has no bound of the form K∣x−y∣K \lvert x - y \rvert, since it gets arbitrarily steep near 00. It is still uniformly continuous, as the theorem says. In fact, for 0≤y≤x0 \le y \le x we have (y+x−y)2=x+2y(x−y)≥x(\sqrt{y} + \sqrt{x - y})^2 = x + 2\sqrt{y(x - y)} \ge x, which gives

∣x−y∣≤∣x−y∣,\lvert \sqrt{x} - \sqrt{y} \rvert \le \sqrt{\lvert x - y \rvert},

so δ=ε2\delta = \varepsilon^2 works. For ε=0.1\varepsilon = 0.1, inputs within 0.010.01 give outputs within 0.10.1 everywhere on [0,1][0, 1].

Examples on unbounded and open intervals

Definition On an interval that is unbounded or not closed, a continuous function may fail to be uniformly continuous. To show that ff is not uniformly continuous on SS, find one ε>0\varepsilon > 0 such that for every δ>0\delta > 0 there are x,y∈Sx, y \in S with ∣x−y∣<δ\lvert x - y \rvert < \delta and ∣f(x)−f(y)∣≥ε\lvert f(x) - f(y) \rvert \ge \varepsilon. On a bounded open interval (a,b)(a, b), a continuous ff is uniformly continuous exactly when it has a continuous extension to [a,b][a, b], that is, when lim⁡x→a+f(x)\lim_{x \to a^+} f(x) and lim⁡x→b−f(x)\lim_{x \to b^-} f(x) both exist as finite numbers. If the limits exist, the extension is continuous on [a,b][a, b], so it is uniformly continuous there by the theorem above, and so is ff on the smaller set (a,b)(a, b). In the other direction, uniform continuity keeps the values of ff at any two points close to aa close to each other, and by completeness this forces the limit at aa to exist, and likewise at bb.

In plain words Trouble comes from the function getting steeper and steeper, either far out on an unbounded interval or near a missing endpoint.

Example For f(x)=x2f(x) = x^2 on [0,∞)[0, \infty) take ε=1\varepsilon = 1. Given any δ>0\delta > 0, let x=1δx = \frac{1}{\delta} and y=x+δ2y = x + \frac{\delta}{2}. Then ∣x−y∣<δ\lvert x - y \rvert < \delta but

y2−x2=δx+δ24=1+δ24>1.y^2 - x^2 = \delta x + \frac{\delta^2}{4} = 1 + \frac{\delta^2}{4} > 1.

So x2x^2 is not uniformly continuous on [0,∞)[0, \infty), even though it is on [0,2][0, 2].

For g(x)=1xg(x) = \frac{1}{x} on (0,1)(0, 1), again take ε=1\varepsilon = 1. Given δ>0\delta > 0, choose tt with 0<t<min⁡(δ,1)0 < t < \min(\delta, 1) and set x=tx = t, y=t2y = \frac{t}{2}. Then ∣x−y∣=t2<δ\lvert x - y \rvert = \frac{t}{2} < \delta, but

1y−1x=2t−1t=1t>1.\frac{1}{y} - \frac{1}{x} = \frac{2}{t} - \frac{1}{t} = \frac{1}{t} > 1.

The right limit at 00 is infinite, so there is no continuous extension to [0,1][0, 1], which matches the test for bounded open intervals. Being unbounded is not the problem by itself, since x\sqrt{x} is uniformly continuous on all of [0,∞)[0, \infty) by the same inequality as above.

Connection to integrability

Definition Let ff be continuous on [a,b][a, b]. By uniform continuity, for every ε>0\varepsilon > 0 there is δ>0\delta > 0 with the following property. If [a,b][a, b] is cut into subintervals each of length less than δ\delta, then on every subinterval the largest and smallest values of ff differ by less than ε\varepsilon. For such a cut, the upper sum, built from the largest value of ff on each subinterval, and the lower sum, built from the smallest, differ by less than ε(b−a)\varepsilon (b - a), which can be made as small as we like. This is the key step in proving that every continuous function on [a,b][a, b] is integrable, a fact used throughout the study of integrals.

In plain words One fine enough cut works for the whole interval at once, so rectangles can trap the area under the graph as tightly as you want.

Example For f(x)=x2f(x) = x^2 on [0,2][0, 2] and ε=0.1\varepsilon = 0.1, the bound ∣x2−y2∣≤4∣x−y∣\lvert x^2 - y^2 \rvert \le 4 \lvert x - y \rvert shows that cutting into 100100 pieces of length 0.020.02 suffices. On each piece ff varies by at most 4⋅0.02=0.08<0.14 \cdot 0.02 = 0.08 < 0.1. The upper and lower rectangle sums then differ by at most 0.08⋅2=0.160.08 \cdot 2 = 0.16.

Check yourself

  1. Show that f(x)=5−2xf(x) = 5 - 2x is uniformly continuous on R\mathbb{R} by giving δ\delta in terms of ε\varepsilon.
Show the answer

For any xx and yy the outputs differ by ∣f(x)−f(y)∣=2∣x−y∣\lvert f(x) - f(y) \rvert = 2 \lvert x - y \rvert, so δ=ε2\delta = \frac{\varepsilon}{2} works for all xx and yy.

  1. Is f(x)=x3f(x) = x^3 uniformly continuous on [−1,1][-1, 1]? On R\mathbb{R}?
Show the answer

On [−1,1][-1, 1] yes, since it is continuous on a closed bounded interval. On R\mathbb{R} no. Take ε=1\varepsilon = 1. It is enough to defeat each δ≤1\delta \le 1, since a pair closer than such a δ\delta is also closer than any larger one. With x=1δx = \frac{1}{\delta} and y=x+δ2y = x + \frac{\delta}{2} we get ∣x−y∣<δ\lvert x - y \rvert < \delta and, since y>x>0y > x > 0,

y3−x3=(y−x)(y2+xy+x2)>δ2⋅3x2=32δ>1.y^3 - x^3 = (y - x)(y^2 + xy + x^2) > \frac{\delta}{2} \cdot 3x^2 = \frac{3}{2\delta} > 1.
  1. Is f(x)=x2−1x−1f(x) = \frac{x^2 - 1}{x - 1} uniformly continuous on (0,1)(0, 1)?
Show the answer

Yes. It equals x+1x + 1 there, which has finite limits 11 and 22 at the ends, so it extends continuously to [0,1][0, 1]. Directly, ∣f(x)−f(y)∣=∣x−y∣\lvert f(x) - f(y) \rvert = \lvert x - y \rvert, so δ=ε\delta = \varepsilon works.

How this lesson connects

It also uses quantifiers.