= Uniformly continuous function
{title2=$\forall\varepsilon>0\ \exists\delta>0\ \forall x,y\in D$}
A <uniformly continuous function> has one input tolerance valid throughout its <domain of a function>. For $f:D\to\mathbb R$, with $D\subseteq\mathbb R$, <uniform continuity> means
$$
\forall\varepsilon>0\ \exists\delta>0\ \forall x,y\in D:
\quad |x-y|<\delta\ \Longrightarrow\ |f(x)-f(y)|<\varepsilon.
$$
Choose the output tolerance $\varepsilon$ first, then a positive $\delta$ valid for every pair of <function inputs>. It may depend on $\varepsilon$, the <function> and its <domain of a function>, but not on the pair’s location. The <absolute values> measure input and output distance.<Basic Analysis: Introduction to Real Analysis, Volume I by Jiří Lebl>[§3.4, Definition 3.4.1: a single positive input tolerance for all pairs in the specified real domain]{ref}
Compare the <quantifier> order with the <epsilon-delta definition of continuity>:
$$
\begin{aligned}
\text{continuity throughout }D:&\quad
\forall a\in D\ \forall\varepsilon>0\ \exists\delta>0\ \forall x\in D,\\
\text{uniform continuity on }D:&\quad
\forall\varepsilon>0\ \exists\delta>0\ \forall a\in D\ \forall x\in D.
\end{aligned}
$$
Both lines end with $|x-a|<\delta\Rightarrow|f(x)-f(a)|<\varepsilon$. In the first, $\delta$ can depend on the <point> $a$; in the second, it is chosen before $a$. Thus <uniform continuity> implies <continuity> at every <point>. Each requested $\varepsilon$ gets its own shared tolerance.
For an exact example, take the <polynomial function> $f(x)=x^2$ on the <closed interval> $D=[0,2]$. For every pair of <function inputs> in that <interval>, <polynomial factorization> gives
$$
|x^2-y^2|=|x-y|\,|x+y|\leq4|x-y|.
$$
Consequently $\delta=\varepsilon/4$ works everywhere on this <domain of a function>. With $\varepsilon=0.4$, the common tolerance is $\delta=0.1$. Near the right endpoint, for example, $x=1.92$ and $y=2$ have input distance $0.08$ and output distance $4-1.92^2=0.3136<0.4$. The bound is sufficient; it does not claim the largest admissible input window at each <point>.
On the whole <real line>, the same <polynomial function> is a <continuous function> but fails <uniform continuity>. Take the <sequences> $x_n=n$ and $y_n=n+1/n$, for positive <integers> $n$. Then
$$
|x_n-y_n|=\frac1n\longrightarrow0,
\qquad
|x_n^2-y_n^2|=2+\frac1{n^2}>2.
$$
For any proposed $\delta>0$, choose an <integer> $n>1/\delta$. The inputs are closer than $\delta$, yet their outputs violate the fixed tolerance $\varepsilon=1$. The <sequences> need not themselves have a finite <limit>: their mutual distance is what tends to zero. This is the obstruction captured by the <sequential criterion for uniform continuity>. Restricting the <domain of a function> to $[0,2]$ removes these escaping pairs.
\Image[/square-uniform-continuity-domains.png]
{title=The square function: local input windows shrink, but a bounded interval admits one shared tolerance}
{description=The left panel computes sufficient windows $\delta(a)=0.4/(2|a|+1)$ from the <continuity bounds for the square function>; shrinking these particular windows alone does not prove failure of <uniform continuity>. The middle panel displays the exact bound $4|x-y|$ on the <interval> $[0,2]$. The right panel gives the decisive <sequence> pairs $n,n+1/n$ on the <real line>. All plotted values are calculated from the displayed formulas.}
A <uniformly continuous function> need not be a <bounded function>. The <identity function> $f(x)=x$ on the <real line> has $|f(x)-f(y)|=|x-y|$, so $\delta=\varepsilon$ always works, although its <image of a function> is the unbounded <real line>. <Uniform continuity> controls changes between nearby inputs, not the overall size of outputs. Likewise, an unbounded <domain of a function> does not by itself prevent <uniform continuity>.
The <square root> $g(x)=\sqrt x$ supplies a different common tolerance on the <interval> $[0,\infty)$. Assuming $x\geq y\geq0$, put $u=\sqrt x$ and $v=\sqrt y$. Since $0\leq u-v\leq u+v$,
$$
(u-v)^2\leq(u-v)(u+v)=x-y.
$$
Interchanging the inputs when necessary proves
$$
|\sqrt x-\sqrt y|\leq\sqrt{|x-y|}.
$$
Thus $\delta=\varepsilon^2$ guarantees <uniform continuity> on the entire <domain of a function>, including zero. For $\varepsilon=0.4$, any input distance below $0.16$ suffices. The pairs $(0,0.09)$ and $(4,4.09)$ both have input distance $0.09$; their output distances are respectively $0.3$ and $0.09/(\sqrt{4.09}+2)<0.0225$. The common guarantee accommodates quite different local sensitivities.
This <Hölder continuity> bound allows a curved tolerance rule. It is weaker than a <Lipschitz bound>: at zero the output change divided by the input change is
$$
\frac{|g(h)-g(0)|}{|h-0|}=\frac1{\sqrt h}\longrightarrow\infty
\qquad(h\downarrow0).
$$
No finite <Lipschitz constant> works near zero, even though <uniform continuity> does. A <Lipschitz function> does have <uniform continuity>, choosing $\delta=\varepsilon/L$ when its <Lipschitz bound> $L$ is positive; when $L=0$ it is a <constant function>.<Basic Analysis: Introduction to Real Analysis, Volume I by Jiří Lebl>[§3.4, Proposition 3.4.8 and Example 3.4.10: Lipschitz continuity implies uniform continuity; the square root on the nonnegative half-line separates the properties]{ref}
\Image[/square-root-uniform-tolerance.png]
{title=Square-root input changes share an output tolerance even though amplification near zero is unbounded}
{description=At left, the exact output changes $\sqrt{a+h}-\sqrt a$ for base <points> $a=0,1,4$ stay inside $\varepsilon=0.4$ whenever $|h|<\delta=0.16$ and $a+h\geq0$. The right panel computes the amplification $1/\sqrt h$ for inputs $0,h$: it grows without bound as $h$ decreases. These are calculated <function graphs>, with no experimental measurements.}
For general <metric spaces>, replace the <absolute values> by the respective <distance functions>. The <Heine-Cantor theorem> gives an existence guarantee: every <continuous function> on a <compact metric space> is <uniformly continuous>. In particular, <continuity> on a finite <closed interval> provides a common tolerance, even when no simple formula for it is known.<Basic Analysis: Introduction to Real Analysis, Volume I by Jiří Lebl>[§7.5, Definition 7.5.10 and Theorem 7.5.11: uniform continuity between metric spaces and the compact-domain theorem]{ref}
For a short proof outline, fix $\varepsilon>0$. <Continuity> gives each <point> $a$ an <open ball> of radius $r_a>0$ within which outputs differ from $f(a)$ by less than $\varepsilon/2$. The <open balls> of half these radii still cover the <domain of a function>. <Compactness> supplies a <finite subcover>. Take $\delta$ to be the smallest half-radius in this <finite set>. Two inputs closer than $\delta$ lie together in one of the original <open balls>, so the <triangle inequality> bounds their output distance by $\varepsilon$. The beautiful step is that the <compact set> turns local choices into finitely many choices, whose minimum stays positive.
A shared tolerance also makes <uniformly continuous functions> preserve <Cauchy sequences>: after choosing $\delta$ for $\varepsilon$, all sufficiently late input pairs are closer than $\delta$, so all corresponding output pairs are closer than $\varepsilon$. Unlike a <convergent sequence> argument, this does not require an input <limit> inside the <domain of a function>. It is why <uniform continuity> is useful for extending a <function> toward missing endpoints and for the decay argument below.
Back to article page