The function is continuous but not uniformly continuous at $[0,1) \cup (1,2]$.

I want to show that the function $$f=\left\{\begin{matrix} 0, \text{ if } x \in [0,1)\\ 1, \text{ if } x \in (1,2] \end{matrix}\right.$$ is continuous but not uniformly continuous at $[0,1) \cup (1,2]$.

A function $f:A \rightarrow \mathbb{R}$ is continuous at a point $x_0$: $\forall ε > 0$, $\exists δ > 0$ such that $\forall x \in A$ with $$|x-x_0|<\delta \Rightarrow |f(x)-f(x_0)|<\epsilon\tag 1$$ In this case do I have to show that the function is continuous at $[0,1)$ and then at $(1,2]$? But how can I show that it is continuous at an interval using the definition $(1)$? Do I have to take $x_0 \in [0,1)$ for any $x$ to show that the function is continuous at $[0,1)$ and then a $x_0 \in (1,2]$ for any $x$ to show that the function is continuous at $(1,2]$??

• This comment refers the second part of your question. Assume you could choose the same $\delta$ for all $x$, then take a series of points $x_{n}$ converging to zero and see, that $\delta$ has to be arbitrarily small. -Edit: while $\epsilon$ just has to be smaller than $1$.
– Max
Feb 23 '14 at 13:43
• @Max note you want the sequence to converge to $1$, not to $0$. Feb 23 '14 at 13:47
• thanks, but cant edit anymore. whoever made this excercise: you normally NEVER put an interesting point on 1, it's Always on zero... what an evil trap... :-)
– Max
Feb 23 '14 at 13:49
• @Max haha not really. The poisson kernel gets interesting for $r\nearrow 1$, for example :D Feb 23 '14 at 13:51

Continuity:

let $\delta = |1-x|$ (the distance from $1$), then for all $\epsilon > 0$ and $x,y$ with $|x-y|<\delta$ $$|f(x)-f(y)| = 0 < \epsilon$$

Uniform continuity:

Let $1>\epsilon>0$. if $f$ were uniformly continuous,there would exist $\delta>0$ such that $$|x-y|<\delta \Rightarrow |f(x)-f(y)|<\epsilon$$ now chose $x:=1-\frac\delta4,y:=1+\frac\delta4$ then $|x-y|=\frac\delta2<\delta$ but $$|f(x) - f(y)| = 1 > \epsilon$$ Since $\delta$ was arbitrary, we have shown that there is no global $\delta$ for any $\epsilon<1$ and thus $f$ cannot be uniformly continuous.

• @MaryStar Where are you stuck? It's proven in my first part, note that if $|x-y|<|1-x|$ then $y$ is in the same part ($[0,1)$ or $(1,2]$) as $x$ and thus the function values are equal. Feb 23 '14 at 14:13
• @MaryStar You force $y$ to be in the same part, so the difference of the function values becomes $<\epsilon$. Feb 23 '14 at 16:11
• @MaryStar I don't think sequences will help you with the uniform part, as they do with (simple) continutiy. Uniform continuity is somewhat more restrictive. Feb 24 '14 at 23:11
• @MaryStar Well, if it is correct (seems plausible), you have found the connection to the sequence-definition of continuity :) Feb 24 '14 at 23:53
• For uniform continuity you have to show it for any two sequences with any coinciding limit. (corresponding to any $\epsilon>0$ and any point within distance of at most $\delta$ in the other variant). Therefor a counter-example can be given by $x_n := 1-\frac1n$ and $y_n:=1+\frac1n$ where the limits coincide but the limit of the function values do not. Feb 25 '14 at 0:01

For $x_0\in A$ we have $|x_0-1|>0$. Show that (for arbitrary $\epsilon>0$) you can pick $\delta=|x_0-1|$ and that with this choice $f(x)=f(x_0)$ for all $x\in A$ with $|x-x_0|<\delta$.

Obviously, this $\delta$ depends on $x_0$. If it were possible to make the choice of $\delta$ not depend on $x_0$, we could show that $f$ is uniformly continuous. However, no matter what $\delta>0$ is "suggested" for $\epsilon=1$, we can pick $x_0=\min\{1+\frac14\delta,2\}$ and find that $x=\max\{1-\frac14\delta,0\}$ give us $|x-x_0|=\frac12\delta<\delta$ but $|f(x)-f(x_0)|=1\ge\epsilon$.

• But how can I show that the function is continuous at $[0,1) \cup (1,2]$? Is it maybe as I said at my first post, that I have to take a $x_0$ at each interval and show that for $|x-x_0|< \delta \Rightarrow |f(x)-f(x_0)|< \epsilon$? Feb 23 '14 at 13:56
• @MaryStar see my answer for the continuity part. basically the choice $\delta =|x_0-1|$ suffices for any $x_0$ in the domain and for all epsilon. Feb 23 '14 at 14:13
• As I said, this works for any $x\in A$. But you are welcome t odo it per case distinction (which allows you to get rid of absolute value). Feb 23 '14 at 14:13

Generalizing: Let $M$ and $N$ metric spaces and $f:M\to N$ a continuous map. If there are two distinct points $a, b\in N$ such that the subsets $F=f^{-1}(a)$ and $G=f^{-1}(b)$ are closed, disjoint and satisfy the condition $d(F, G) = 0$, then $f$ is not uniformly continuous.

Indeed, taking $\varepsilon=d(a,b)$. The condition $d(F,G)=0$ give us, $\forall \delta>0$ there exist points $x\in F$ and $y\in G$ such that $d(x,y)<\delta$. But $d(f(x),f(y))=d(a,b)=\varepsilon$.

In your case, $F=[0,1)$ and $G=(1,2]$ and $f$ is continuous by the gluing lemma.