Tutorials › Real Analysis › Uniform Continuity on Intervals

Uniform Continuity · Tutorial 364 of 1000

Uniform Continuity on Intervals

See how compactness gives one continuity radius that works across a closed bounded interval, and why suitable continuous extensions can handle some open intervals as well.

Intermediate 9 min read

What You'll Learn

  • State the Heine-Cantor theorem for closed bounded intervals
  • Prove uniform continuity using a finite subcover
  • Find a uniform radius from a direct estimate on a closed interval
  • Test uniform continuity on an open interval with sequences
  • Apply continuous endpoint extensions to open bounded intervals

Why Closed Bounded Intervals Are Different

The previous tutorial showed that continuity at every point does not by itself give uniform continuity: the radius in a pointwise continuity argument may shrink as the center moves through the domain. Closed bounded intervals provide a way to overcome that problem. Compactness ensures that local information gathered near individual points can be reduced to finitely many neighborhoods, which in turn makes one radius sufficient for the entire interval.

The conclusion depends on the interval being closed and bounded, not merely on it being an interval. Some continuous functions on open intervals are not uniformly continuous. We will prove the uniform-continuity result for closed bounded intervals, examine what can go wrong when an endpoint is omitted, and then give a useful condition under which an open bounded interval still has uniform continuity.

Definition (recall): A function \(f:E\to\mathbb{R}\) is uniformly continuous on \(E\) if for every \(\varepsilon>0\), there exists a \(\delta>0\) such that for all \(x,y\in E\), $$ |x-y|<\delta \quad\Longrightarrow\quad |f(x)-f(y)|<\varepsilon. $$ The radius \(\delta\) may depend on \(\varepsilon\), but it must not depend on the input points.

Uniform Continuity on a Closed Bounded Interval

The key fact is that a closed bounded interval is compact, by the Heine-Borel Theorem. At each point, continuity gives a neighborhood on which the output remains close to the value at that point. Compactness lets us cover the whole interval with finitely many suitably smaller neighborhoods. The smallest of the associated radii then works throughout the interval.

Theorem (Heine-Cantor Theorem for Intervals): Let \(a\leq b\), and let \(f:[a,b]\to\mathbb{R}\) be continuous at every point of \([a,b]\). Then \(f\) is uniformly continuous on \([a,b]\).

Proof. Fix \(\varepsilon>0\). For each \(c\in[a,b]\), continuity of \(f\) at \(c\) gives a number \(r_c>0\) such that for every \(z\in[a,b]\),

$$ |z-c|<r_c \quad\Longrightarrow\quad |f(z)-f(c)|<\frac{\varepsilon}{2}. $$

Consider the open intervals

$$ U_c=\left(c-\frac{r_c}{2},c+\frac{r_c}{2}\right),\qquad c\in[a,b]. $$

They cover \([a,b]\), because each \(c\) belongs to \(U_c\). The interval \([a,b]\) is compact, so finitely many of them cover it. Write these intervals as \(U_{c_1},\ldots,U_{c_N}\), and set

$$ \delta=\min_{1\leq i\leq N}\frac{r_{c_i}}{2}. $$

There are finitely many positive numbers in this minimum, so \(\delta>0\). Now take any \(x,y\in[a,b]\) with \(|x-y|<\delta\). Since the selected intervals cover \([a,b]\), there is an index \(i\) such that \(x\in U_{c_i}\). Thus \(|x-c_i|<r_{c_i}/2\). Also, since \(\delta\leq r_{c_i}/2\), the triangle inequality gives

$$ |y-c_i|\leq |y-x|+|x-c_i| <\delta+\frac{r_{c_i}}{2} \leq r_{c_i}. $$

We also have \(|x-c_i|<r_{c_i}\). Applying the choice of \(r_{c_i}\) to both \(x\) and \(y\), we obtain

$$ |f(x)-f(y)| \leq |f(x)-f(c_i)|+|f(c_i)-f(y)| <\frac{\varepsilon}{2}+\frac{\varepsilon}{2} =\varepsilon. $$

This single positive \(\delta\) works for every pair \(x,y\in[a,b]\). Therefore \(f\) is uniformly continuous on \([a,b]\). \(\square\)

The proof makes the role of compactness explicit: it is what allows us to use finitely many local radii and take a positive minimum. The theorem includes the case \(a=b\), when the interval consists of one point and every pair of inputs has distance zero.

Worked Example: A Polynomial on a Closed Interval

Let \(f(x)=x^3\) on \([-2,3]\). For \(x,y\in[-2,3]\), factor the difference:

$$ |f(x)-f(y)| =|x^3-y^3| =|x-y||x^2+xy+y^2|. $$

Because \(|x|\leq 3\) and \(|y|\leq 3\), we have

$$ |x^2+xy+y^2| \leq |x|^2+|x||y|+|y|^2 \leq 9+9+9=27. $$

Consequently, \(|f(x)-f(y)|\leq27|x-y|\) for every pair in the interval. Given \(\varepsilon>0\), choose \(\delta=\varepsilon/27\). If \(|x-y|<\delta\), then

$$ |f(x)-f(y)|\leq27|x-y|<27\delta=\varepsilon. $$

Thus \(x^3\) is uniformly continuous on \([-2,3]\). This direct estimate provides an explicit radius; the Heine-Cantor Theorem guarantees uniform continuity without requiring us to find such an estimate for every function.

Worked Example: The Square-Root Function on a Closed Interval

Consider \(g(x)=\sqrt{x}\) on \([0,4]\). For \(x,y\geq0\), suppose first that \(x\geq y\). Then

$$ |\sqrt{x}-\sqrt{y}|=\sqrt{x}-\sqrt{y} \leq \sqrt{x-y}, $$

because \((\sqrt{x}-\sqrt{y})^2\leq x-y\): after expanding, this inequality is equivalent to \(y\leq\sqrt{xy}\), which holds since \(x\geq y\geq0\). If instead \(y\geq x\), the same argument with \(x\) and \(y\) exchanged gives the same bound. Hence, for all \(x,y\geq0\),

$$ |\sqrt{x}-\sqrt{y}|\leq\sqrt{|x-y|}. $$

Given \(\varepsilon>0\), set \(\delta=\varepsilon^2\). If \(x,y\in[0,4]\) and \(|x-y|<\delta\), then

$$ |\sqrt{x}-\sqrt{y}| \leq\sqrt{|x-y|} <\sqrt{\delta} =\varepsilon. $$

So the square-root function is uniformly continuous on \([0,4]\). The estimate also illustrates that a uniform radius need not be proportional to \(\varepsilon\); here a radius proportional to \(\varepsilon^2\) suffices.

What Can Change When an Endpoint Is Omitted?

An open bounded interval is not compact, so the Heine-Cantor Theorem does not apply to it. This does not mean that every continuous function on an open interval fails to be uniformly continuous. The identity function, for example, is uniformly continuous on every subset of \(\mathbb{R}\), as established earlier in the course. But continuity alone is not enough.

Worked Example: A Continuous Function That Is Not Uniform on an Open Interval

Define \(f(x)=\ln x\) on \((0,1)\). The function is continuous at every point of its domain. For each positive integer \(n\), take

$$ x_n=e^{-(n+1)},\qquad y_n=e^{-n}. $$

Both points lie in \((0,1)\), and \(x_n<y_n\). Their input distance is

$$ |y_n-x_n| =e^{-n}-e^{-(n+1)} =e^{-n}(1-e^{-1}) \longrightarrow 0. $$

Their output distance, however, is constant:

$$ |\ln y_n-\ln x_n| =|-n-(-(n+1))| =1. $$

For any proposed \(\delta>0\), choose \(n\) large enough that \(e^{-n}(1-e^{-1})<\delta\). The inputs are then less than \(\delta\) apart, while their outputs differ by \(1\). In particular, they violate the uniform-continuity implication for \(\varepsilon=1/2\). Thus \(\ln x\) is not uniformly continuous on \((0,1)\). The pairs approach the omitted endpoint \(0\), while the output differences do not shrink.

Continuous Endpoint Extensions

There is a useful positive result for some open bounded intervals. If a function has finite limits at both endpoints, we can assign those limiting values at the endpoints. The resulting function is continuous on the closed interval, so the Heine-Cantor Theorem applies. Restricting a uniformly continuous function to a smaller domain preserves uniform continuity, as shown earlier in the course.

Theorem (Uniform Continuity from Endpoint Extension): Let \(a<b\), and let \(f:(a,b)\to\mathbb{R}\) be continuous. Suppose the finite limits $$ \lim_{x\to a^+}f(x)=A \qquad\text{and}\qquad \lim_{x\to b^-}f(x)=B $$ exist. Then \(f\) is uniformly continuous on \((a,b)\).

Proof. Define \(g:[a,b]\to\mathbb{R}\) by \(g(x)=f(x)\) for \(a<x<b\), \(g(a)=A\), and \(g(b)=B\). We verify continuity at the endpoints. Given \(\varepsilon>0\), the limit at \(a\) gives an \(\eta>0\) such that \(a<x<b\) and \(0<x-a<\eta\) imply \(|f(x)-A|<\varepsilon\). Since \(g(a)=A\), this proves continuity of \(g\) at \(a\). The limit at \(b\) gives continuity at \(b\) by the same reasoning. At every interior point, \(g\) agrees locally with the continuous function \(f\), so \(g\) is continuous there as well.

The Heine-Cantor Theorem now implies that \(g\) is uniformly continuous on \([a,b]\). For every \(\varepsilon>0\), a radius that works for all pairs in \([a,b]\) therefore works in particular for all pairs in its subset \((a,b)\). Since \(f\) agrees with \(g\) on \((a,b)\), \(f\) is uniformly continuous there. \(\square\)

Worked Example: Extending a Function to the Endpoints

Define \(h(x)=\sqrt{1+x}\) on \((-1,2)\). It is continuous on this interval. Its endpoint limits are finite:

$$ \lim_{x\to-1^+}\sqrt{1+x}=0, \qquad \lim_{x\to2^-}\sqrt{1+x}=\sqrt{3}. $$

Assigning \(h(-1)=0\) and \(h(2)=\sqrt{3}\) gives the continuous function \(g(x)=\sqrt{1+x}\) on \([-1,2]\). By the theorem just proved, \(h\) is uniformly continuous on \((-1,2)\). This conclusion follows from the continuous endpoint extension, even though the original domain does not contain its endpoints.

Using the Interval Hypotheses Carefully

When applying the Heine-Cantor Theorem, check that the domain really is a closed bounded interval and that the function is continuous at every point of that interval, including its endpoints. Continuity only on \((a,b)\) does not establish continuity on \([a,b]\); the endpoint behavior must be checked or supplied by finite one-sided limits. Conversely, the theorem is a sufficient condition, not a claim that uniform continuity is possible only on closed bounded intervals.

There are two complementary ways to use the results here. If a direct estimate is available, as for \(x^3\) or \(\sqrt{x}\), it can give an explicit uniform radius. If a function is merely known to be continuous on a closed bounded interval, compactness supplies uniform continuity without an explicit formula. For an open bounded interval, finite endpoint limits allow us to pass to the closed interval by continuous extension. When neither a global estimate nor a suitable extension is available, test whether pairs of inputs can approach an omitted endpoint while their output differences stay bounded away from zero.

Check Your Understanding

Use the compactness proof, examples, and endpoint-extension theorem to answer the following questions.

  1. Where does compactness enter the proof of the Heine-Cantor Theorem for intervals?
  2. Why does the proof use neighborhoods with radius \(r_c/2\) rather than \(r_c\)?
  3. For \(f(x)=\ln x\) on \((0,1)\), what happens to the input and output distances for the pairs \(e^{-(n+1)}\) and \(e^{-n}\)?
  4. Why do finite limits at both endpoints allow the endpoint-extension theorem to be applied?
  5. Does failure of the Heine-Cantor hypotheses prove that a function is not uniformly continuous? Explain briefly.