Suppose $D\subset \mathbb R$ is bounded but not compact. Prove that there is a function that is continuous on $D$ but is not uniformly continuous.

analysiscontinuityreal-analysisuniform-continuity

Suppose $D\subset \mathbb R$ is bounded but not compact. Prove that there is a function that is continuous on $D$ but is not uniformly continuous.

So, I'm having these type of thoughts:

Let $f:D→\mathbb R$. Since $D$ is bounded, and not compact, then $D$ is not closed. Which is to say there exists an accumulation point $x_o$ of $D$ such that $x_o\notin D$. In order for $f$ to be uniformly continuous, $f$ must have a limit at $x_o$. We want to show $f$ is not uniformly continuous, so the limit at $x_o$ must not exist? But then I think this contradicts a theorem about $f$ being continuous at $x_o$ if the $\lim_{x→x_o}f(x)$ does not exist. I'm not sure what to do from here or if this is even the right approach.

Update: I did see this problem elsewhere, but I don't know if I can assume a conclusion for a proof. In that description, they assume $f$ is continuous, but isn't that what we want to show?

Suppose $A \subset \mathbb{R}$ is bounded, not compact. Continuous but not uniformly continuous

Best Answer

In the link you provided the function constructed is $f(y)=\frac 1 {|x-y|}$ where $x \in \overline {D} \setminus D$. This function is continuous because ratio of two continuous functions is continuous. [$y \to |x-y|$ is continuous because $||x-y|-|x-y'|| \leq |y-y'|$]. This function is not uniformly continuous because there is a sequence $(x_n)$ in $D$ converging to $x$ and $f(x_n) -f(x_m)$ does not tend to $0$ as $n,m \to \infty$ even though $|x_n-x_m| \to 0$. [ Indeed, if $|f(x_n) -f(x_m)| \to 0$, then $(f(x_n)$ would be a Cauchy sequence of real numbers hence convergent and bounded. This is a contradiction since $f(x_n) \to \infty$].