[Math] Is a continuous function locally uniformly continuous

continuityexamples-counterexamplesgeneral-topologyuniform-continuity

Assume a function, $f : X \to Y$, mapping between two metric spaces, $X,Y$, is pointwise continuous, i.e. for every $\varepsilon >0$ and $x \in X$ there exists a $\delta>0$ such that
$$
\|x-x'\|_X < \delta
\implies
\|f(x) – f(x')\|_Y < \varepsilon
, \qquad
\forall x' \in X.
$$

Does this imply $f$ is locally uniformly continuous, i.e. for every $x \in X$ there exists a neighbourhood $U \subset X$ such that for every $\varepsilon > 0$ there exists a $\delta > 0$ such that
$$
\|x_1-x_2\|_X < \delta
\implies
\|f(x_1) – f(x_2)\|_Y < \varepsilon
, \qquad
\forall x_1,x_2 \in U?
$$

A positive answer without proof, under the condition that $X$ and/or $Y$ are locally compact, is implied here.

Best Answer

Let $I_n = \left(\frac1{n+1}, \frac1{n} \right)$ for natural $n$, and let $X = \{0\} \bigcup_n I_n$. Now define $f : X \to\Bbb R$ by $$ x \mapsto \begin{cases} 0, & \text{ if }x=0\\ \frac1n, & \text{ if } x\in I_n \end{cases} $$ This function is continuous but not locally uniformly continuous at $0$.

Related Question