# For $E \subseteq \mathbb{R}^n$, if every real valued continuous function on $E$ is uniformly continuous, then $E$ is closed and bounded.

Let $E$ be a subset of Euclidean space $\mathbb{R}^n$. Assume every continuous real-valued function of $E$ is uniformly continuous. Prove that $E$ is closed and bounded.

The preceding exercise asked to show that if $E \subset \mathbb{R}^n$ such that every continuous real valued function on $E$ attains a minimum value, then $E$ is closed and bounded. I solved that by noting that $f(x) = x$ and $f(x) = -x$ both attain minimum values $m$ and $M$, respectively, so $E = [m,M]$ is closed and bounded. However, a similar approach doesn't seem to be working here, and I am not sure in which direction to go.

I have that a metric space is compact if and only if every continuous real-valued function on $X$ takes a maximum and a minimum value, but I'm not sure how to show demonstrate that the premise for the reverse implication holds.

• To see that $E$ is closed proceed by contradiction, suppose $x_0$ is a limit point of $E$ such that $x_0 \not\in E$. Define $f(x)={1 \over \left \| x-x_0 \right \|}$, and prove that $f$ is not uniformly continuous on $E$, although it is continuous on $E$. – Reveillark Feb 27 '15 at 1:51
• I don't see the argument for boundedness using $f(x) = |x|$. – user169845 Feb 27 '15 at 1:57
• It doesn't, I was too quick to jump to the wrong conclusion. I'm not sure whether the boundedness assertion works. Take $n=1$ and $E=\Bbb{N}$. Since every point of $E$ is isolated, every function defined in $E$ is continuous. Furthermore, taking $\delta = 1/2$ in the definition of uniform continuity we see that every function defined in E is uniformly continuous. However $E$ is clearly not bounded. – Reveillark Feb 27 '15 at 1:58

As per Reveillark's comment on the original question, for a limit point $x_0$ of $E$ not in $E$, $1/|x-x_0|$ is continuous but not uniformly continuous, which is a contradiction, so $x_0 \in E$ and $\overline{R} = E$.
For boundedness, $x^2$ is uniformly continuous on every bounded interval but not on an unbounded untercal, so $E$ must be bounded.