Counterexamples Need Nearby Inputs with Separated Outputs
To disprove uniform continuity, it is not enough to find inputs where a function changes quickly. The definition asks whether one radius works for every pair of inputs in the domain. A counterexample must therefore defeat each proposed radius: however small the input distance is required to be, there must still be a pair of inputs within that distance whose function values remain noticeably separated.
The Sequential Criterion for Uniform Continuity from “Why Uniform Continuity Is Different” packages this idea into a useful test. If there are sequences \(x_n,y_n\in E\) such that \(|x_n-y_n|\to0\), while the output differences do not tend to zero, then \(f\) is not uniformly continuous on \(E\). We will use this established criterion to organize several kinds of counterexamples. The essential work in each example is finding and verifying the right pairs.
This strategy is especially effective when a function misbehaves near a missing endpoint, grows rapidly on an unbounded domain, or oscillates more and more quickly. In each case the function can still be continuous at every point of its domain. Continuity controls behavior near one fixed point; uniform continuity must control all points at once.
Worked Examples: Boundary Blow-Up and Rapid Growth
Worked Example: The Reciprocal Near a Missing Endpoint
Define \(f:(0,1)\to\mathbb{R}\) by \(f(x)=1/x\). For each integer \(n\geq2\), take
Both points belong to \((0,1)\), and their distance is
The corresponding function values are \(f(x_n)=n\) and \(f(y_n)=n+1\), so
The input distances tend to zero but the output distances stay equal to \(1\). The Sequential Criterion for Uniform Continuity therefore shows that \(f\) is not uniformly continuous on \((0,1)\). The obstruction occurs as the inputs approach the missing endpoint \(0\); there is no single radius that controls the increasingly large changes there.
Worked Example: The Logarithm Near Zero
Consider \(g:(0,1)\to\mathbb{R}\), defined by \(g(x)=\ln x\). For each positive integer \(n\), let
Since \(n\geq1\), both inputs lie in \((0,1)\). Their distance satisfies
Using \(\ln(e^t)=t\), the outputs are \(g(x_n)=-n\) and \(g(y_n)=-(n+1)\). Consequently,
Thus the logarithm is not uniformly continuous on \((0,1)\), despite being continuous at every point of that interval. The example also illustrates why it matters to check the domain: the inputs approach \(0\), which is not in \((0,1)\), so continuity at a point of the domain does not provide a common radius for these pairs.
The first two examples have a common pattern: near a missing endpoint, small changes in input can produce a fixed change in output. A different pattern occurs on an unbounded domain. There the inputs need not approach any finite point; instead, they can move farther and farther out while their separation shrinks.
Worked Example: Cubic Growth on an Unbounded Domain
Let \(h:[0,\infty)\to\mathbb{R}\) be given by \(h(x)=x^3\). Choose
These inputs belong to the domain, and \(|x_n-y_n|=1/n\to0\). Their output difference can be calculated exactly:
The output difference grows without bound while the input distance tends to zero. In particular, it does not tend to zero, so the Sequential Criterion for Uniform Continuity proves that \(h\) is not uniformly continuous on \([0,\infty)\). The inputs are close to one another, but they are located farther and farther along the domain.
A General Result for Integer Powers
The cubic example is part of a broader fact about integer powers. The following theorem gives explicit pairs that work for every integer exponent at least two. It is useful to verify the estimates rather than rely only on an informal claim that the function “grows too quickly.”
Proof. For each positive integer \(n\), set \(x_n=n\) and \(y_n=n+1/n\). These points lie in \([0,\infty)\), and
Since \(y_n\geq x_n\geq0\), the binomial theorem gives
Every term in the final sum is positive. Its first term is \(m n^{m-2}\), which is at least \(m\) because \(m\geq2\) and \(n\geq1\). Hence
for every \(n\). The input distances tend to zero, whereas the output distances stay at least \(2\). By the Sequential Criterion for Uniform Continuity, \(p_m\) is not uniformly continuous on \([0,\infty)\). \(\square\)
The conclusion concerns the unbounded domain. It does not say that \(x^m\) fails to be uniformly continuous on every subset of \([0,\infty)\). On bounded intervals, the polynomial estimate from “Uniform Continuity of Polynomials on Bounded Sets” applies. The same function can therefore be uniformly continuous on a bounded interval and fail to be uniformly continuous on the whole half-line.
Worked Example: Increasing Oscillation
Worked Example: Sine of the Square
Define \(q:\mathbb{R}\to\mathbb{R}\) by \(q(x)=\sin(x^2)\). For each positive integer \(n\), choose the positive inputs
Their squares are \(2\pi n+\pi/2\) and \(2\pi n+3\pi/2\), respectively. Periodicity of sine therefore gives \(q(x_n)=1\) and \(q(y_n)=-1\). In particular,
Rationalizing the difference between the inputs gives
because both \(x_n\) and \(y_n\) tend to infinity. Thus the outputs remain \(2\) apart even though the inputs become arbitrarily close. The Sequential Criterion proves that \(q\) is not uniformly continuous on \(\mathbb{R}\). This is an oscillation example: the function repeatedly moves from \(1\) to \(-1\) over input intervals whose lengths shrink.
The examples show that the mechanism of failure can vary. A function may become unbounded near a missing endpoint, change rapidly at large inputs, or oscillate increasingly fast. The common proof task is always the same: exhibit nearby inputs and calculate their output separation. Merely describing a function as “steep,” “unbounded,” or “oscillatory” does not by itself complete a proof.
Uniformly Continuous Perturbations Preserve the Failure
A useful way to create or recognize counterexamples is to compare a function with another function whose uniform continuity status is known. The key restriction is that the difference between them must itself be uniformly continuous. A bounded difference alone is not enough.
Proof. Write \(h=f-g\), so \(f=g+h\). Suppose first that \(g\) is uniformly continuous. Given \(\varepsilon>0\), uniform continuity of \(g\) supplies \(\delta_1>0\) such that \(x,y\in E\) and \(|x-y|<\delta_1\) imply \(|g(x)-g(y)|<\varepsilon/2\). Uniform continuity of \(h\) supplies \(\delta_2>0\) such that the same input condition with \(|x-y|<\delta_2\) implies \(|h(x)-h(y)|<\varepsilon/2\). Set \(\delta=\min\{\delta_1,\delta_2\}\). If \(|x-y|<\delta\), then
Therefore \(f\) is uniformly continuous. For the reverse direction, suppose \(f\) is uniformly continuous and use \(g=f-h\). Given \(\varepsilon>0\), choose radii for \(f\) and \(h\) that each make the corresponding output difference less than \(\varepsilon/2\), and take their minimum. The triangle inequality then gives \(|g(x)-g(y)|<\varepsilon\) for every pair within that radius. Thus \(g\) is uniformly continuous, proving both directions. \(\square\)
For example, this theorem explains why adding a uniformly continuous oscillatory term cannot repair a failure of uniform continuity: if the resulting function were uniformly continuous, subtracting the oscillatory term would show that the original function was uniformly continuous as well. The condition on the difference matters. A bounded function need not be uniformly continuous, so knowing only that two functions stay a bounded distance apart does not justify this theorem.
A Common Pitfall: Large Slopes Are Not Enough
The counterexamples above use actual pairs whose input distances shrink while their output differences stay separated. One tempting shortcut is to look for large ratios of output change to input change and conclude that uniform continuity fails. That shortcut is not valid by itself: a large ratio can occur even when the output difference is small.
The square-root function on \([0,\infty)\) illustrates the point. Its difference estimate from “Uniform Continuity of the Square Root” gives
so it is uniformly continuous. Nevertheless, for \(x=t^2\) and \(y=0\), where \(t>0\), the ratio of output difference to input difference is
which becomes arbitrarily large as \(t\to0^+\). The output difference itself is \(t\), however, and tends to zero. Thus large ratios alone do not produce the separated outputs required by the sequential test. In a counterexample, always verify both parts: the input distance tends to zero, and the output difference fails to tend to zero.
A final practical check is to ensure every chosen input belongs to the stated domain. Sequences approaching a missing endpoint are useful precisely because the domain allows points arbitrarily close to it; a point outside the domain cannot be used as one of the inputs. Once the domain, input distances, and output differences have all been checked, the sequential criterion turns the calculation into a complete proof.
Check Your Understanding
For each question, focus on the pair construction or hypothesis that makes the argument work.
- For the reciprocal on \((0,1)\), what are the input distance and output distance for the chosen pair \(1/n\) and \(1/(n+1)\)?
- Why do the inputs in the logarithm example belong to the domain, and what fixed output difference do they produce?
- In the theorem for \(x^m\), why is the first term of the binomial sum at least \(m\) when \(m\geq2\) and \(n\geq1\)?
- What condition on \(f-g\) allows uniform continuity status to pass between \(f\) and \(g\)?
- Why does an arbitrarily large ratio of output change to input change not, by itself, disprove uniform continuity?