# Is it always possible extend a uniformly continuous function?

Suppose we have some bounded Borel set $B\subset {\mathbb R}^n$. Let a function $f:B\to \mathbb R$ be uniformly continuous on B in the sense that $$w(r):=\sup_{x,y\in B\ :\ |x-y|\le r}|f(x)-f(y)|<\infty$$ for all $r>0$, and $w(r)\to 0$ as $r\to +0$. Is it always possible to extend the function $f$ to a convex envelope of $B$ or the whole ${\mathbb R}^n$ so that the uniform continuity would persist?

Can the extension be done preserving the modulus of continuity $w(r)$ when $w(r)$ is concave?

• Nov 30, 2017 at 18:33
• @anomaly Thank you for pointing it out, but it is somewhat different question. In my question we may assume that the set $B$ is closed. Nov 30, 2017 at 18:38
• It is, and I didn't mark this question as a duplicate. Nov 30, 2017 at 18:46
• That's not uniformly continuous, or even continuous, unless you assume $w(r) \to 0$ as $r \to 0+$. Are you assuming that? Nov 30, 2017 at 18:51
• Without that, you could just use the Tietze extension theorem to extend to some closed ball, with say $f(z) = 0$ on the surface of the ball, and make it $0$ outside the ball. Any continuous function on a compact set is uniformly continuous. Nov 30, 2017 at 20:36

You can't always have the same $w(r)$ for the extension. Take $n=1$, $B = [0,1] \cup [2,3]$, $f = 0$ on $[0,1]$ and $1$ on $[2,3]$. Then $w(r) = 0$ for $r < 1$. But of course this can't be true for any extension to $[0,3]$.
• Thank you for the counterexample. But can the extension preserve the modulus of continuity $w(r)$ when $w(r)$ is concave? Nov 30, 2017 at 20:50
• We have $w(a+b)\le w(a)+w(b)$ for a function $f$ with a convex domain. Nov 30, 2017 at 21:01
The extension can be built as $$f(x)=\sup_{y\in B}\ \{f(y)-w(|x-y|)\}.$$
Note that the value of $f(x)$ is preserved for $x\in B$, since $f(y)-w(|x-y|)\le f(x)$ by the definition of $w(r)$. It also easy to prove that the new $f(x)$ satisfies the modulus of continuity $w(r)$, since, for each $y$, $f(y)-w(|x-y|)$ satisfies it.
Actually for the proof we need that only $w(a+b)\le w(a)+w(b)$ for all positive $a,b,c$, but not the general concavity.