If $x\mapsto \| x\|^2$ is uniformly continuous on $E$, the union of all open balls of radius $r$ contained in $E$ is bounded $\forall r > 0$

A subset $E$ contained in $\mathbb{R}^n$ is such that the function $x \mapsto \left\Vert x\right\Vert^2$ is uniformly continuous on $E$. For $r > 0$, let $E_r$ denote the union of all open balls of radius $r$ contained in $E$. Prove that $E_r$ is bounded for all $r > 0$. Find an example showing that $E$ itself does not have to be bounded.

I have been working on this one for a while and I seem to be stumped. I know what the definitions are, but I’m having trouble getting started on this problem.

Thanks

Solutions Collecting From Web of "If $x\mapsto \| x\|^2$ is uniformly continuous on $E$, the union of all open balls of radius $r$ contained in $E$ is bounded $\forall r > 0$"

The function $f$ is uniformly continuous on the subset $E_r$ as well.

If contrariwise $E_r$ is unbounded for some $r>0$, then there is a sequence of vectors $x_n$ such that $\Vert x_n\Vert\to\infty$, and $B(x_n,r)\subseteq E$. For all $\delta\in(0,r)$ both $x_n$ and $x’_n(\delta)=x_n(1+\delta/(2\Vert x_n\Vert))$ are then in $E_r$, because $\Vert x_n-x’_n(\delta)\Vert<\delta<r$. But
$$
f(x’_n(\delta))=f(x_n)\left(1+\frac{\delta}{2\Vert x_n\vert}\right)^2,
$$
so
$$
f(x’_n(\delta))-f(x_n)\ge f(x_n)\frac{\delta}{2\Vert x_n\Vert}=\frac{\delta}2 \Vert x_n\Vert.
$$
This set of differences of values of $f$ is unbounded in spite of the arguments being within $\delta$ of each other violating the assumption that the restriction of $f$ to $E_r$ is uniformly continuous.

For an example of unbounded $E$ I proffer $E=\mathbb{Z}\subset\mathbb{R}$ (map this on the $x$-axis, if you want this to work for any $n$). There are no distinct points within distance $<1$ of each other, so uniform continuity of any function is automatic. Yet $E$ is unbounded.

Given $r>0$ there is a positive $\delta<r$ such that $x$, $y\in E$ with $|y-x|<\delta$ implies $|y|^2-|x|^2<1$. Let $m$ be the center of an $r$-ball $B\subset E_r$. Then $m$ and $y:=m+\delta{m\over2|m|}$ are both in $E$; furthermore $|y-m|<\delta$. It follows that
$$|m|\delta+{\delta^2\over 4}=|y|^2-|m|^2<1\ ,$$
whence $|m|<{1\over\delta}$. This implies that all points of $B$ have a distance $<{1\over\delta}+r$ from $0$, and since $E_r$ is the union of such balls it follows that $E_r$ is bounded.

The set $E:=\{x\in{\mathbb R}^n\ |\ |x|\in {\mathbb N}\}$ is an unbounded set on which the function $x\to|x|^2$ is uniformly continuous.