Uniform continuity – Serlo

Zur Navigation springen Zur Suche springen

Uniform continuity is a stronger form of continuity. It is derived from the epsilon-delta criterion of continuity and particularly important for approximating functions.

Motivation

Recap: Epsilon-delta criterion

The definition of uniform continuity is built upon that one of the epsilon-delta criterion for continuity. We will therefore recap the epsilon-delta definition:

A function ${\displaystyle f:D\to \mathbb {R} }$ with ${\displaystyle D\subseteq \mathbb {R} }$ is continuous at ${\displaystyle x_{0}\in D}$, if and only if for every ${\displaystyle \epsilon >0}$ there is a ${\displaystyle \delta >0}$ , such that ${\displaystyle |f(x)-f(x_{0})|<\epsilon }$ holds for all ${\displaystyle x\in D}$ with ${\displaystyle |x-x_{0}|<\delta }$ .

That is, if we choose an epsilon-tube around ${\displaystyle f(x_{0})}$ , no matter how small it is, all function values in a sufficiently small environment of ${\displaystyle x_{0}}$ will lie in it. An epsilon-tube is an interval from ${\displaystyle f(x_{0})-\epsilon }$ to ${\displaystyle f(x_{0})+\epsilon }$ with ${\displaystyle \epsilon >0}$ around${\displaystyle f(x_{0})}$:

A function ${\displaystyle f:D\to \mathbb {R} }$ is continuous at ${\displaystyle x_{0}\in D}$ if and only if for every epsilon-tube, there is a ${\displaystyle \delta >0}$ , such that all function values of ${\displaystyle f}$ when evaluated between ${\displaystyle x_{0}-\delta }$ and ${\displaystyle x_{0}+\delta }$ fit inside the epsilon-tube:

This ${\displaystyle \delta }$ may depend on the given function ${\displaystyle f}$, the given tube size ${\displaystyle \epsilon }$and from the point ${\displaystyle x_{0}}$ . The following diagram shows an example, where a ${\displaystyle \delta }$-value is sufficiently small for ${\displaystyle x_{0}}$ , but too large for ${\displaystyle x_{1}}$ :

Hence, we must choose the ${\displaystyle \delta }$ at ${\displaystyle x_{1}}$ smaller. As both ${\displaystyle \delta }$-values at ${\displaystyle x_{0}}$ and ${\displaystyle x_{1}}$ are different, we will label them correspondingly by ${\displaystyle \delta _{0}}$ and ${\displaystyle \delta _{1}}$. This shows, that the ${\displaystyle \delta }$ within the definition of continuity may depend on the considered position ${\displaystyle x}$. The following diagram illustrates this:

Derivation of uniform continuity

The epsilon-delta criterion guarantees that any continuous function ${\displaystyle f:D\to \mathbb {R} }$ can be approximated. For every maximal error ${\displaystyle \epsilon >0}$ and around every ${\displaystyle {\tilde {x}}}$ we can find a ${\displaystyle \delta _{\tilde {x}}>0}$, such that the function value ${\displaystyle f(x)}$ at every ${\displaystyle x}$ inside the delta-interval ${\displaystyle ({\tilde {x}}-\delta ,{\tilde {x}}+\delta )}$ around ${\displaystyle f({\tilde {x}})}$ maximally deviates from ${\displaystyle f({\tilde {x}})}$ by ${\displaystyle \epsilon >0}$. So for all of those ${\displaystyle x}$ with ${\displaystyle {\tilde {x}}-\delta we can consider ${\displaystyle f({\tilde {x}})}$ as an approximation of ${\displaystyle f(x)}$ with a maximal error of ${\displaystyle \epsilon }$ . The following diagram illustrates this approximation at several points ${\displaystyle x_{i}}$:

However, the ${\displaystyle \delta _{\tilde {x}}}$-values depend on the considered position ${\displaystyle {\tilde {x}}}$ . This is why the rectangles in the above diagram have different sizes. For a more uniform approximation, we could impose additionally that all rectangles have to be of equal size, That means, the ${\displaystyle \delta _{\tilde {x}}}$-value shall be equally suitable for any ${\displaystyle {\tilde {x}}}$ . The above diagram would then look as follows:

This is the core idea of uniform continuity. For any given ${\displaystyle \epsilon >0}$ , there is a global ${\displaystyle \delta >0}$, such that no matter which point ${\displaystyle {\tilde {x}}\in D}$ is chosen, every function value ${\displaystyle f(x)}$ picked from the delta-interval ${\displaystyle ({\tilde {x}}-\delta ,{\tilde {x}}+\delta )}$ will be closer than ${\displaystyle \epsilon }$ to ${\displaystyle f({\tilde {x}})}$ . This leads us to the following definition of uniform continuity for a function ${\displaystyle f:D\to \mathbb {R} }$, which will allow us for uniform approximations:

For every ${\displaystyle \epsilon >0}$ there is a ${\displaystyle \delta >0}$ (independent from the position ${\displaystyle {\tilde {x}}}$), such that for every ${\displaystyle {\tilde {x}}\in D}$ and every argument ${\displaystyle x\in D}$ with ${\displaystyle |x-{\tilde {x}}|<\delta }$ the following inequality holds: ${\displaystyle |f(x)-f({\tilde {x}})|<\epsilon }$ .

Definition

Definition of uniform continuity

The formal definition of uniform continuity hence reads as follows:

Definition (Uniform continuity)

A function ${\displaystyle f:D\to \mathbb {R} }$ is uniform continuous on D, if for every ${\displaystyle \epsilon >0}$ a ${\displaystyle \delta >0}$ exists, such that at all positions ${\displaystyle {\tilde {x}}\in D}$ and for all arguments ${\displaystyle x\in D}$ with a distance smaller than ${\displaystyle \delta }$ to ${\displaystyle {\tilde {x}}}$ the function values ${\displaystyle f(x)}$ and ${\displaystyle f({\tilde {x}})}$ deviate from each other by less than ${\displaystyle \epsilon }$ . In quantifier notation, the definition of uniform continuity reads:

${\displaystyle \forall \epsilon >0\,\exists \delta >0\,\forall {\tilde {x}}\in D\,\forall x\in D:|x-{\tilde {x}}|<\delta \implies |f(x)-f({\tilde {x}})|<\epsilon }$

In different words, for each ${\displaystyle \epsilon >0}$ there is a ${\displaystyle \delta >0}$ , such that all pairs ${\displaystyle x,{\tilde {x}}\in D}$ with ${\displaystyle |x-{\tilde {x}}|<\delta }$ satisfy the inequality ${\displaystyle |f(x)-f({\tilde {x}})|<\epsilon }$ .

Quantifier notation

The commented version of the quantifier notation reads:

{\displaystyle {\begin{aligned}&\underbrace {{\underset {}{}}\forall \epsilon >0} _{{\text{for all }}\epsilon >0}\underbrace {{\underset {}{}}\exists \delta >0} _{{\text{ there is a }}\delta >0}\underbrace {{\underset {}{}}\forall {\tilde {x}}\in D} _{{\text{, such that at all positions }}{\tilde {x}}\in D}\underbrace {{\underset {}{}}\forall x\in D} _{{\text{ and for all arguments }}x\in D}\\[0.5em]&\qquad \underbrace {{\underset {}{}}|x-{\tilde {x}}|<\delta } _{{\text{ with distance to }}{\tilde {x}}{\text{ smaller }}\delta }\underbrace {{\underset {}{}}\implies } _{\text{ there is}}\underbrace {{\underset {}{}}|f(x)-f({\tilde {x}})|<\epsilon } _{{\text{, that the distance from }}f(x){\text{ to }}f({\tilde {x}}){\text{ is smaller than }}\epsilon }\end{aligned}}}

Comparing the epsilon-delta definition of uniform continuity and continuity in the quantifier notation, we notide that only two quantifiers have been permuted:

{\displaystyle {\begin{aligned}{\begin{array}{ll}{\text{Continuity: }}&\forall \epsilon >0\,{\color {OliveGreen}\forall {\tilde {x}}\in D}\,{\color {Blue}\exists \delta >0}\,\forall x\in D:\\[0.3em]&\quad |x-{\tilde {x}}|<\delta \implies |f(x)-f({\tilde {x}})|<\epsilon \\[0.5em]{\text{Uniform Continuity: }}&\forall \epsilon >0\,{\color {Blue}\exists \delta >0}\,{\color {OliveGreen}\forall {\tilde {x}}\in D}\,\forall x\in D:\\[0.3em]&\quad |x-{\tilde {x}}|<\delta \implies |f(x)-f({\tilde {x}})|<\epsilon \end{array}}\end{aligned}}}

The reason is that the ${\displaystyle \delta }$ used for uniform continuity is a global one, i.e. it does not depend on the position ${\displaystyle {\tilde {x}}\in D}$ . In order to express this independence, the existence quantifier „${\displaystyle \exists \delta >0}$“ must appear in front of the all quantifier „${\displaystyle \forall {\tilde {x}}\in D}$“ .

Deriving the negation of uniform continuity

The quantifier notation is a handy tool for inverting definitions - like for uniform continuity. It basically works by step-wise replacing existence and all quantifiers by the respective other expression:

{\displaystyle {\begin{aligned}{\begin{array}{rrrrrcr}&\neg {\Big (}\forall \epsilon >0\,&\exists \delta >0\,&\forall {\tilde {x}},x\in D:&|x-{\tilde {x}}|<\delta &\implies &|f(x)-f({\tilde {x}})|<\epsilon {\Big )}\\[0.5em]\iff &\exists \epsilon >0\,&\neg {\Big (}\exists \delta >0\,&\forall {\tilde {x}},x\in D:&|x-{\tilde {x}}|<\delta &\implies &|f(x)-f({\tilde {x}})|<\epsilon {\Big )}\\[0.5em]\iff &\exists \epsilon >0\,&\forall \delta >0\,&\neg {\Big (}\forall {\tilde {x}},x\in D:&|x-{\tilde {x}}|<\delta &\implies &|f(x)-f({\tilde {x}})|<\epsilon {\Big )}\\[0.5em]\iff &\exists \epsilon >0\,&\forall \delta >0\,&\exists {\tilde {x}},x\in D:&\neg {\Big (}|x-{\tilde {x}}|<\delta &\implies &|f(x)-f({\tilde {x}})|<\epsilon {\Big )}\\[0.5em]\iff &\exists \epsilon >0\,&\forall \delta >0\,&\exists {\tilde {x}},x\in D:&|x-{\tilde {x}}|<\delta &\land &\neg {\Big (}|f(x)-f({\tilde {x}})|<\epsilon {\Big )}\\[0.5em]\iff &\exists \epsilon >0\,&\forall \delta >0\,&\exists {\tilde {x}},x\in D:&|x-{\tilde {x}}|<\delta &\land &|f(x)-f({\tilde {x}})|\geq \epsilon \end{array}}\end{aligned}}}

So:

${\displaystyle \exists \epsilon >0\,\forall \delta >0\,\exists {\tilde {x}},x\in D:|x-{\tilde {x}}|<\delta \land |f(x)-f({\tilde {x}})|\geq \epsilon }$

Negation of uniform continuity

Definition (Not uniformly continuous)

A function ${\displaystyle f:D\to \mathbb {R} }$ is called not uniformly continuous, if there is at least one ${\displaystyle \epsilon >0}$ , such that no matter how small ${\displaystyle \delta >0}$ is chosen, we can find at least two arguments ${\displaystyle {\tilde {x}}}$ and ${\displaystyle x}$ with distance smaller than ${\displaystyle \delta }$ , such that the function values ${\displaystyle f(x)}$ and ${\displaystyle f({\tilde {x}})}$ have a distance of at least ${\displaystyle \epsilon }$ .

Uniform continuity is a global property

Uniform continuity is a global property of a function. That means, it makes only sense to consider uniform continuity of a whole function. By contrast, continuity is a local property. We can speak of a function being continuous at a certain position ${\displaystyle x}$. For uniform continuity, this is not possible. However, a function can be both be globally continuous (continuous at every ${\displaystyle x\in D}$) and (globally) uniformly continuous.

The globalness is just a consequence from the definition: For uniform continuity, we can find a global ${\displaystyle \delta >0}$, whose delta-interval around every argument is a sufficient approximation. It is no necessary to speak of a global delta at some certain argument ${\displaystyle x}$: we just need to find one delta for all arguments.

Visualization

Recap: visaulization of the epsilon-delta criterion

In order to visualize the epsilon-delta criterion, we will draw a rectangle centred at ${\displaystyle (x_{0},f(x_{0}))}$ with height ${\displaystyle 2\epsilon }$ and width ${\displaystyle 2\delta }$. In order to satisfy the epsilon-delta criterion, the graph must not lie above or below the rectangle, but completely inside:

Take, for instance the square function at arguments around ${\displaystyle x_{0}=1}$. No matter how small we impose ${\displaystyle \epsilon }$ , we can always find a ${\displaystyle \delta }$, such that the graph lies completely in the interior of the ${\displaystyle 2\epsilon }$-${\displaystyle 2\delta }$-rectangle:

Conversely, if a function is not continuous, such as the sign function ${\displaystyle \operatorname {sgn}(x)}$ , we are able to find an ${\displaystyle \epsilon >0}$, whose graph always takes values above or below the rectangle - no matter how narrow we make it. Concerning the sign function at ${\displaystyle x_{0}=0}$ , this will for instance be the case if we choose ${\displaystyle \epsilon ={\tfrac {1}{2}}}$ :

Visualization of uniform continuity

For uniformly continuous functions, we can draw one rectangle with heighth ${\displaystyle 2\epsilon }$ and width ${\displaystyle 2\delta }$ and move it to any point on the graph, without having pieces of the graph above or below the rectangle. The function ${\displaystyle f(x)={\sqrt {x}}}$ is uniformly continuous. Despite having infinite derivative at zero, the graph always runs inside the upper and lower bounds of the rectangle. However, for ${\displaystyle g(x)={\tfrac {1}{x}}}$ this is not the case. In the vicinity of arguments near zero, the function moves infinitely far into the ${\displaystyle y}$-direction. No matter how narrow we choose the rectangle, the function will always break its lower and upper barriers for ${\displaystyle x}$ close enough to zero.

For uniform continuity, ${\displaystyle \delta }$ has to be the same at every ${\displaystyle x}$ . The graph has to fit inside the rectangle, no matter where we move it. That means: For every ${\displaystyle \epsilon >0}$ there must be a ${\displaystyle \delta >0}$ , such that the ${\displaystyle 2\epsilon }$-${\displaystyle 2\delta }$-rectangle can be moved arbitrarily along the graph without having function values above or below it:

For a non-uniformly continuous function, this is not possible. Anoter counter-example is the square function. In fact, for any given ${\displaystyle \epsilon >0}$ (not just a specific one), we cannot find a ${\displaystyle \delta >0}$ , such that the graph does nowhere cross the upper or lower border of the ${\displaystyle 2\epsilon }$-${\displaystyle 2\delta }$-rectangle. For ${\displaystyle x}$-values near zero, the square function is close to constant, so the graph will fit inside some ${\displaystyle 2\epsilon }$-${\displaystyle 2\delta }$-rectangle, there. But the more we move it to the right, the steeper our function will get. And at some point, the function will break the upper and lower barriers of the ${\displaystyle 2\epsilon }$-${\displaystyle 2\delta }$-rectangle. So the square function in a continuous but not uniformly continuous function:

Scheme of proof

Scheme of proof: Uniform continuity

In terms of quantifiers, the definition of uniform continuity reads:

${\displaystyle {\color {Red}\forall \epsilon >0}\ {\color {RedOrange}\exists \delta >0}\ {\color {OliveGreen}\forall {\tilde {x}},x\in D\ {\big (}|x-{\tilde {x}}|<\delta }{\color {Blue}{}\implies |f(x)-f({\tilde {x}})|<\epsilon {\big )}}}$

This can be used to derive a scheme of proof for uniform continuity:

${\displaystyle {\begin{array}{l}{\color {Red}\underbrace {{\underset {}{}}{\text{Let }}\epsilon >0{\text{ be arbitrary.}}} _{\forall \epsilon >0}}\ {\color {RedOrange}\underbrace {{\underset {}{}}{\text{Choose }}\delta =\ldots {\text{ There is }}\delta {\text{, since}}\ldots } _{\exists \delta >0}}\\{\color {OliveGreen}\underbrace {{\underset {}{}}{\text{Let }}x,{\tilde {x}}\in D{\text{ with }}|x-{\tilde {x}}|<\delta {\text{ be arbitrary.}}} _{\forall {\tilde {x}},x\in D:|x-{\tilde {x}}|<\delta }}\ {\color {Blue}\underbrace {{\underset {}{}}{\text{there is: }}|f(x)-f(x_{0})|<\ldots <\epsilon } _{{}\implies |f(x)-f(x_{0})|<\epsilon }}\end{array}}}$

Scheme of proof: Not uniformly continuous

In terms of quantifiers, the definition of ${\displaystyle f}$ being not uniformly continuous reads:

${\displaystyle {\color {Red}\exists \epsilon >0}\ {\color {RedOrange}\forall \delta >0}\ {\color {OliveGreen}\exists {\tilde {x}},x\in D}:{\color {DarkOrchid}|x-{\tilde {x}}|<\delta }\land {\color {Blue}|f(x)-f({\tilde {x}})|\geq \epsilon }}$

This can be used to derive a scheme for disproving uniform continuity:

${\displaystyle {\begin{array}{l}{\color {Red}\underbrace {{\underset {}{}}{\text{Choose an }}\epsilon =\ldots } _{\exists \epsilon >0}}\ {\color {RedOrange}\underbrace {{\underset {}{}}{\text{Let }}\delta >0{\text{ be arbitrary.}}} _{\forall \delta >0}}\\{\color {OliveGreen}\underbrace {{\underset {}{}}{\text{Choose }}{\tilde {x}}=\ldots {\text{ and }}x=\ldots {\text{ There is }}{\tilde {x}},x\in D{\text{, since }}\ldots } _{\exists {\tilde {x}},x\in D}}\\{\color {Black}{\text{There is:}}}\\[0.5em]\quad \quad {\color {DarkOrchid}{\text{Proof for }}|x-{\tilde {x}}|<\delta }\\[0.5em]\quad \quad {\color {Blue}{\text{Proof for }}|f(x)-f({\tilde {x}})|\geq \epsilon }\end{array}}}$

Uniform continuity as a stronger form of continuity

Uniform continuity is a stronger form of continuity. That means, every uniformly continuous function is also continuous. The converse does not hold. There are functions like the square function ${\displaystyle f:\mathbb {R} \to \mathbb {R} :x\mapsto x^{2}}$ being continuous, but not uniformly continuous:

${\displaystyle {\begin{array}{c}{\text{uniform}}\\{\text{continuity}}\end{array}}{\begin{array}{c}\not \Longleftarrow \\\implies \end{array}}{\text{continuity}}}$

Every uniformly continuous function is also continuous

Theorem (uniform continuity implies continuity)

Every uniformly continuous function ${\displaystyle f:D\to \mathbb {R} }$ with ${\displaystyle D\subseteq \mathbb {R} }$ is continuous at each point ${\displaystyle x_{0}\in D}$ .

Proof (uniform continuity implies continuity)

We need to show that a uniformly continuous function ${\displaystyle f:D\to \mathbb {R} }$ is continuous at every point ${\displaystyle x_{0}\in D}$ . That means, we are given an arbitrary ${\displaystyle \epsilon >0}$ and ${\displaystyle x_{0}\in D}$ and we need to find a ${\displaystyle \delta >0}$ such that ${\displaystyle |x-x_{0}|<\delta }$ implies the inequality ${\displaystyle |f(x)-f(x_{0})|<\epsilon }$ . But now, we can just apply the definition of uniform continuity. This definition provides us with a ${\displaystyle \delta >0}$, such that at all ${\displaystyle x,{\tilde {x}}\in D}$ with ${\displaystyle |x-{\tilde {x}}|<\delta }$ , there is ${\displaystyle |f(x)-f({\tilde {x}})|<\epsilon }$. As this implication holds for all ${\displaystyle x,{\tilde {x}}\in D}$ , it particularly holds for ${\displaystyle x}$ and ${\displaystyle {\tilde {x}}=x_{0}}$. So the ${\displaystyle \delta >0}$ given by uniform continuity can also be used as the ${\displaystyle \delta }$ for ordinary continuity at ${\displaystyle x_{0}\in D}$.

The square function is continuous but not uniformly continuous

As we have seen, every uniformly continuous function is also continuous. However, the converse does not hold. Let us consider again the square function as an example:

{\displaystyle {\begin{aligned}f:\mathbb {R} &\longrightarrow \mathbb {R} \\x&\longmapsto x^{2}\end{aligned}}}

As we have seen in the section visualization, if there is ${\displaystyle \epsilon >0}$ given, we cannot set a fixed ${\displaystyle \delta >0}$ , such that the graph is everywhere inside the ${\displaystyle 2\epsilon }$-${\displaystyle 2\delta }$-rectangle , independent from where we place it. The further we move the rectangle to the right, the steeper the square function gets. And at some point, the graph starts crossing he upper and lower borders of the ${\displaystyle 2\epsilon }$-${\displaystyle 2\delta }$-rectangle.

This can also be seen by checking the epsilon-delta definition of uniform continuity: ${\displaystyle \forall \epsilon >0\,\exists \delta >0\,\forall {\tilde {x}}\in \mathbb {R} \,\forall x\in \mathbb {R} :|x-{\tilde {x}}|<\delta \implies |f(x)-f({\tilde {x}})|<\epsilon }$. We want to prove the negation of this statement, i.e. ${\displaystyle \exists \epsilon >0\,\forall \delta >0\,\exists {\tilde {x}}\in \mathbb {R} \,\exists x\in \mathbb {R} :|x-{\tilde {x}}|<\delta }$ and ${\displaystyle |f(x)-f({\tilde {x}})|\geq \epsilon }$. Consider for instance ${\displaystyle \epsilon =1}$ and assume there was some ${\displaystyle \delta >0}$, such that ${\displaystyle |x_{1}^{2}-x_{0}^{2}|<\epsilon }$ for all real numbers ${\displaystyle x_{0},x_{1}\in \mathbb {R} }$ with ${\displaystyle |x_{1}-x_{0}|<\delta }$ . Now consider some ${\displaystyle x_{0}(\delta )>0}$ which we will determine later. We take the centre ${\displaystyle x_{0}}$ and some point ${\displaystyle x_{1}:=x_{0}+{\frac {\delta }{2}}}$ inside the ${\displaystyle \delta }$-interval. That means, ${\displaystyle |x_{1}-x_{0}|={\frac {\delta }{2}}<\delta }$.

Now, we want to show that ${\displaystyle |x_{1}^{2}-x_{0}^{2}|\geq \epsilon }$ holds.

${\displaystyle x_{1}^{2}=(x_{0}+{\frac {\delta }{2}})^{2}=x_{0}^{2}+x_{0}\delta +{\frac {1}{4}}\delta ^{2}\geq (x_{0}+{\frac {\delta }{2}})^{2}=x_{0}^{2}+x_{0}\delta }$

Further,

${\displaystyle |x_{1}^{2}-x_{0}^{2}|=(x_{0}+{\frac {\delta }{2}})^{2}-x_{0}^{2}=x_{0}^{2}+\delta x_{0}+{\frac {\delta ^{2}}{4}}-x_{0}^{2}\geq \delta x_{0}.}$

If we choose ${\displaystyle x_{0}\geq {\frac {1}{\delta }}}$ then it is guaranteed that ${\displaystyle |x_{1}^{2}-x_{0}^{2}|\geq 1=\epsilon }$. Hence, we have proven that

{\displaystyle {\begin{aligned}f:\mathbb {R} &\longrightarrow \mathbb {R} \\x&\longmapsto x^{2}\end{aligned}}}

is not uniformly continuous.

Examples

Example (uniformly continuous functions)

• The identity function ${\displaystyle f:D\to D}$ is uniformly continuous, since for ${\displaystyle |x-y|<\delta }$ , we can show ${\displaystyle |f(x)-f(y)|=|x-y|<\epsilon }$ by choosing ${\displaystyle \delta =\epsilon }$ .
• Above, we have seen that the square function ${\displaystyle f:\mathbb {R} \to \mathbb {R} }$ is not uniformly continuous on the real numbers. However, when restricting to a compact interval, the function gets uniformly continuous. For example,
{\displaystyle {\begin{aligned}f:[0,1]&\to \mathbb {R} \\x\mapsto x^{2}\end{aligned}}}

is uniformly continuous. We can prove this as follows: There is

${\displaystyle |f(x)-f(y)|=|x^{2}-y^{2}|=|x+y||x-y|\leq 2|x-y|,}$

because ${\displaystyle x,y\in [0,1]}$ . So we can choose ${\displaystyle \delta :={\frac {\epsilon }{2}}}$ and then for all ${\displaystyle x,y\in D}$ with ${\displaystyle |x-y|<\delta }$ the estimate ${\displaystyle |f(x)-f(y)|<2|x-y|<2\delta =\epsilon }$ will hold.

• The square root function is uniformly continuous on ${\displaystyle \mathbb {R} _{0}^{+}}$. Consider:
{\displaystyle {\begin{aligned}f:\mathbb {R} _{0}^{+}&\to \mathbb {R} \\x&\mapsto {\sqrt {x}}\end{aligned}}}

Let ${\displaystyle \epsilon >0}$ be arbitrary. Then, ${\displaystyle \delta =\epsilon ^{2}}$ is a suitable choice: Let ${\displaystyle x,y\in [0,\infty [}$ with ${\displaystyle |x-y|<\delta }$.

Without any restrictions, we may choose ${\displaystyle x\leq y}$. Then, there is also ${\displaystyle {\sqrt {x}}\leq {\sqrt {y}}}$, and hence we get ${\displaystyle |{\sqrt {x}}-{\sqrt {y}}|={\sqrt {y}}-{\sqrt {x}}}$.

Now, we want to prove that ${\displaystyle |f(x)-f(y)|=|{\sqrt {x}}-{\sqrt {y}}|={\sqrt {y}}-{\sqrt {x}}<\epsilon }$ .

By assumption there is ${\displaystyle 0\leq x\leq y. And therefore:

${\displaystyle y

So ${\displaystyle y<({\sqrt {x}}+\epsilon )^{2}}$. Since by assumption ${\displaystyle x,y\geq 0}$ and also ${\displaystyle \epsilon >0}$ , we may take the square root of this equation and obtain ${\displaystyle {\sqrt {y}}<{\sqrt {x}}+\epsilon }$, i.e.${\displaystyle {\sqrt {y}}-{\sqrt {x}}<\epsilon }$, which is what we wanted to show. Hence, we have proven that ${\displaystyle f}$ is uniformly continuous.

• The following example is not uniformly continuous:
{\displaystyle {\begin{aligned}f:(0,1]&\to \mathbb {R} \\x\mapsto \sin \left({\frac {1}{x}}\right),\end{aligned}}}

, which are sine waves oscillating faster and faster when approaching ${\displaystyle x=0}$. Assume that ${\displaystyle f}$ was uniformly continuous. Then we could find some global ${\displaystyle \delta }$ such that the epsilon-delta criterion holds everywhere. But now, for ${\displaystyle x\to 0}$ the frequency of ${\displaystyle f}$ gets arbitrarily high, so inside an interval close to ${\displaystyle x\to 0}$ , there will always be a full oscillation of the sine inside any ${\displaystyle \delta }$-ball. Since the peak-to-peak amplitude of the sine function is equal to ${\displaystyle 2}$ , the condition ${\displaystyle |f(x)-f(y)|<\epsilon }$ will never hold everywhere for ${\displaystyle \epsilon <2}$ . We just have to move the rectangle close enough to 0, as illustrated by the subsequent figure:

Properties

As we have seen, not every continuous function is also uniformly continuous. But if we restrict to a closed, compact interval ${\displaystyle [a,b]}$ , both continuity and uniform continuity will be equivalent:

Theorem (Heine-Cantor for ${\displaystyle \mathbb {R} }$)

Every function ${\displaystyle f:[a,b]\to \mathbb {R} }$ is uniformly continuous.

Proof (Heine-Cantor for ${\displaystyle \mathbb {R} }$)

We choose an indirect way of proof: suppose, the function ${\displaystyle f:[a,b]\to \mathbb {R} }$ was not uniformly continuous. That means, there is an ${\displaystyle \varepsilon >0}$ and for every ${\displaystyle n\in \mathbb {N} }$ there are two points ${\displaystyle x_{n},x'_{n}\in [a,b]}$, such that ${\displaystyle |x_{n}-x'_{n}|<{\tfrac {1}{n}}}$ but ${\displaystyle |f(x_{n})-f(x'_{n})|\geq \varepsilon }$.

The Bolzano Weierstraß theorem tells us (this is where compactness of ${\displaystyle f:[a,b]\to \mathbb {R} }$ comes into play) that the bounded sequence ${\displaystyle (x_{n})_{n\in \mathbb {N} }}$ must have a convergent subsequence ${\displaystyle (x_{n_{k}})_{k\in \mathbb {N} }}$, whose limit ${\displaystyle x}$ is inside the interval ${\displaystyle [a,b]}$ . Since ${\displaystyle |x_{n_{k}}-x'_{n_{k}}|<{\tfrac {1}{n_{k}}}}$ this is also the limit of the subsequence ${\displaystyle (x'_{n_{k}})_{k\in \mathbb {N} }}$.

Now, continuity of ${\displaystyle f}$ implies ${\displaystyle f(x_{n_{k}})\to f(x)}$ and ${\displaystyle f(x'_{n_{k}})\to f(x)}$. Therefor, there must be a ${\displaystyle k_{0}}$, such that ${\displaystyle |f(x_{n_{k}})-f(x)|<{\tfrac {\varepsilon }{2}}}$ and ${\displaystyle |f(x'_{n_{k}})-f(x)|<{\tfrac {1}{n_{K}}}}$ for all ${\displaystyle k\geq k_{0}}$. We proceed by splitting and bounding ${\displaystyle |f(x_{n_{k}})-f(x'_{n_{k}})|=|(f(x_{n_{k}})-f(x))+(f(x)-f(x'_{n_{k}}))|\leq |(f(x_{n_{k}})-f(x))|+|(f(x)-f(x'_{n_{k}}))|<{\tfrac {\varepsilon }{2}}+{\tfrac {\varepsilon }{2}}=\varepsilon }$ ,which holds for all ${\displaystyle k\geq k_{0}}$ . This contradicts our assumption ${\displaystyle |f(x_{n_{k}})-f(x'_{n_{k}})|\geq \varepsilon }$ for all ${\displaystyle k}$. The assumption of ${\displaystyle f}$ not being uniformly continuous must therefore have been wrong and we obtain uniform continuity.