Tutorials › Real Analysis › Examples of Nonuniformly Continuous Functions

Uniform Continuity · Tutorial 368 of 1000

Examples of Nonuniformly Continuous Functions

Use bounded-subset and growth tests, alongside explicit pairs of nearby inputs, to identify functions that are continuous but not uniformly continuous.

Intermediate 8 min read

What You'll Learn

  • Distinguish continuity at each point from one radius that works throughout a domain
  • Prove that a uniformly continuous function maps bounded subsets of the real line to bounded sets
  • Derive a linear growth bound for uniformly continuous functions on the real line
  • Test uniform continuity of rational functions near a domain endpoint
  • Disprove uniform continuity using pairs of inputs whose distances tend to zero

When Nearby Inputs Can Produce Separated Outputs

The previous tutorial gave examples of functions whose output changes can be controlled uniformly as the inputs get close. This tutorial looks at the opposite situation. A function may be continuous at every point of its domain and still fail to be uniformly continuous: the radius needed for a given output tolerance may shrink as the inputs move through the domain.

A direct way to expose this failure is to find pairs \(x_n,y_n\) in the domain for which \(|x_n-y_n|\) tends to zero while the output distances \(|f(x_n)-f(y_n)|\) stay bounded away from zero. The Sequential Criterion for Uniform Continuity from “Why Uniform Continuity Is Different” says that such pairs rule out uniform continuity. We will also prove two useful tests: a uniformly continuous function maps bounded subsets of its domain to bounded sets, and a uniformly continuous function on all of \(\mathbb{R}\) cannot grow faster than a linear bound.

Uniform Continuity Controls Bounded Parts of the Domain

Theorem (Bounded Subsets Have Bounded Images): Let \(E\subseteq\mathbb{R}\), and let \(f:E\to\mathbb{R}\) be uniformly continuous. If \(A\subseteq E\) is bounded, then \(f(A)\) is bounded.

Proof. If \(A\) is empty, its image is empty and therefore bounded. Otherwise, choose \(m,M\in\mathbb{R}\) such that \(m\leq x\leq M\) for every \(x\in A\). Uniform continuity, applied with output tolerance \(1\), gives a \(\delta>0\) such that whenever \(u,v\in E\) and \(|u-v|<\delta\), then \(|f(u)-f(v)|<1\).

Divide the bounded interval \([m,M]\) into finitely many subintervals, each of length less than \(\delta\). For every subinterval that meets \(A\), choose one point of \(A\) in that subinterval. There are only finitely many chosen points; call them \(r_1,\ldots,r_k\). If \(x\in A\), then \(x\) lies in one of the subintervals, and the representative \(r_j\) chosen there satisfies \(|x-r_j|<\delta\). Consequently,

$$ |f(x)|\leq |f(r_j)|+|f(x)-f(r_j)|<|f(r_j)|+1. $$

The finite set of numbers \(|f(r_1)|+1,\ldots,|f(r_k)|+1\) has a maximum. That maximum bounds \(|f(x)|\) for every \(x\in A\), so \(f(A)\) is bounded. \(\square\)

This result does not require \(A\) to be closed or compact. It gives a useful contrapositive: if a function is unbounded on some bounded subset of its domain, it cannot be uniformly continuous there. In particular, a function that becomes unbounded near an excluded finite endpoint of a bounded interval is an immediate candidate for nonuniform continuity.

Worked Example: A Reciprocal Near Zero

Consider \(f(x)=1/x\) on \(E=(0,1)\). This function is continuous at every point of its domain, by continuity of rational functions wherever their denominators are nonzero. But the bounded subset \(A=(0,1)\) has an unbounded image: for each positive integer \(n\geq2\), \(1/n\in A\) and \(f(1/n)=n\). The theorem therefore shows that \(f\) is not uniformly continuous on \((0,1)\).

The failure can also be seen through explicit pairs. For each integer \(n\geq2\), set \(x_n=1/n\) and \(y_n=1/(n+1)\). Both points belong to the domain, and direct calculation gives

$$ |x_n-y_n| =\frac{1}{n}-\frac{1}{n+1} =\frac{1}{n(n+1)} \longrightarrow 0, \qquad |f(x_n)-f(y_n)| =\left|n-(n+1)\right| =1. $$

Thus inputs can be arbitrarily close while their outputs remain exactly one unit apart. This is the type of sequence witness that the Sequential Criterion for Uniform Continuity rules out.

Worked Example: Blow-Up at the Other Endpoint

Define \(g(x)=1/(1-x)\) for \(x\in(0,1)\). It is continuous at every point of this domain because \(1-x\ne0\) there. Its image on the bounded set \((0,1)\) is unbounded: for integers \(n\geq2\), let \(x_n=1-1/n\). Then \(x_n\in(0,1)\) and \(g(x_n)=n\). By the bounded-subset theorem, \(g\) is not uniformly continuous on \((0,1)\).

Here too, a pair of sequences makes the failure explicit. Take \(x_n=1-1/n\) and \(y_n=1-1/(n+1)\). Both are in \((0,1)\). Their input distance and output distance are

$$ |x_n-y_n| =\frac{1}{n}-\frac{1}{n+1} =\frac{1}{n(n+1)} \longrightarrow 0, \qquad |g(x_n)-g(y_n)| =|(n+1)-n| =1. $$

Although \(f\) and \(g\) are both continuous at every point of the same interval, their values become unbounded toward opposite endpoints. Continuity checks behavior near each fixed point of the domain; it does not supply a single radius that controls the function near an endpoint that is not in the domain.

Uniformly Continuous Functions on the Real Line Have at Most Linear Growth

Theorem (Linear Growth Bound): If \(f:\mathbb{R}\to\mathbb{R}\) is uniformly continuous, then there are constants \(A,B\geq0\) such that $$ |f(x)|\leq A+B|x| $$ for every \(x\in\mathbb{R}\).

Proof. Apply uniform continuity with output tolerance \(1\). There is a \(\delta>0\) such that \(|u-v|<\delta\) implies \(|f(u)-f(v)|<1\) for all \(u,v\in\mathbb{R}\). Set \(h=\delta/2\), so \(0<h<\delta\).

Fix \(x\ne0\), and let \(N\) be the least integer greater than or equal to \(|x|/h\). Divide the line segment from \(0\) to \(x\) into \(N\) equal pieces, with points \(t_j=jx/N\) for \(j=0,\ldots,N\). The distance between successive points is

$$ |t_j-t_{j-1}|=\frac{|x|}{N}\leq h<\delta \qquad (1\leq j\leq N). $$

The choice of \(\delta\) therefore gives \(|f(t_j)-f(t_{j-1})|<1\) for each \(j\). By the triangle inequality,

$$ |f(x)| \leq |f(0)|+\sum_{j=1}^{N}|f(t_j)-f(t_{j-1})| <|f(0)|+N. $$

Since \(N\leq |x|/h+1\), it follows that

$$ |f(x)|\leq |f(0)|+1+\frac{|x|}{h}. $$

For \(x=0\), this bound also holds. Taking \(A=|f(0)|+1\) and \(B=1/h\) proves the theorem. \(\square\)

The bound need not be sharp: the identity function, for instance, has linear growth. The point is that a uniformly continuous function on all of \(\mathbb{R}\) cannot grow faster than every linear bound. This gives another way to establish nonuniform continuity, especially for functions whose values grow rapidly far out on the real line.

Worked Example: The Cubic Function on the Real Line

Consider \(p(x)=x^3\) on \(\mathbb{R}\). Suppose, for contradiction, that \(p\) were uniformly continuous. The linear growth theorem would provide \(A,B\geq0\) such that \(|x^3|\leq A+B|x|\) for every real \(x\). Substituting positive integers \(n\) would give \(n^3\leq A+Bn\), or \(n^2\leq A/n+B\). The left side grows without bound as \(n\) increases, while \(A/n+B\leq A+B\) for \(n\geq1\). Choosing an integer \(n\) with \(n^2>A+B\) contradicts the inequality. Hence \(p\) is not uniformly continuous.

There is also a direct sequence witness. For each positive integer \(n\), set \(x_n=n\) and \(y_n=n+1/n^2\). The input distance tends to zero, while expansion gives

$$ |y_n-x_n|=\frac{1}{n^2}\longrightarrow0, \qquad |p(y_n)-p(x_n)| =\left(n+\frac{1}{n^2}\right)^3-n^3 =3+\frac{3}{n^3}+\frac{1}{n^6} \geq3. $$

Thus the output distances do not tend to zero. This is consistent with the growth test: the cubic values eventually exceed any fixed linear bound, and the explicit pairs show how that growth creates a failure of uniform control.

Reading the Evidence Correctly

These examples illustrate two distinct ways uniform continuity can fail. On a bounded domain, a function may become unbounded as inputs approach a missing endpoint; the bounded-subset theorem detects this immediately. On an unbounded domain, the function may grow too quickly for the linear growth bound to hold. In either setting, explicit pairs of close inputs can turn the diagnosis into a direct sequence witness.

A common pitfall is to infer nonuniform continuity solely from the fact that a domain is unbounded. The identity function is uniformly continuous on \(\mathbb{R}\), as shown in “Continuity of the Identity Function.” Another is to infer uniform continuity from continuity at every point. The reciprocal examples show why that fails: each fixed point has its own neighborhood of continuity, but no single radius handles inputs near the endpoint where the values become large.

When testing a new example, first identify where the difficulty could occur: near a missing endpoint, or far out along an unbounded domain. Then either use a general obstruction, such as unbounded values on a bounded subset or growth faster than a linear bound, or construct pairs whose input distances tend to zero while their output distances do not. Each method focuses on the defining issue: whether one radius can work across the entire domain.

Check Your Understanding

Use the definitions and results in this tutorial to answer the following questions.

  1. Why does an unbounded image of a bounded subset rule out uniform continuity?
  2. For \(f(x)=1/x\) on \((0,1)\), what happens to the input and output distances for the pairs \(1/n\) and \(1/(n+1)\)?
  3. Where does uniform continuity enter the proof of the linear growth bound?
  4. Why does the linear growth bound contradict uniform continuity of \(x^3\) on \(\mathbb{R}\)?
  5. Can an unbounded domain by itself show that a function is not uniformly continuous? Explain using an example from earlier in the course.