5

Question: If $f(\mathbb{R})$ is compact and $f$ is continuous, then is $f$ uniformly continuous?

Background:

I thought of the question when proving that "If a function is periodic and continuous, then the function is uniformly continuous" (Proof that a periodic function is bounded and uniformly continuous.)

It turns out that if $f$ has a period of $p$, then $f([0,p]) = f(\mathbb{R})$. Since the image of a continuous function on a compact set is compact, $f(\mathbb{R})$ is compact.

Therefore, I was wondering if it is possible to generalize: If $f(\mathbb{R})$ is compact and $f$ is continuous, then is $f$ uniformly continuous?

Attempt:

Let $f:\mathbb{R} \to [0,1]$ be continuous. Then $f$ is not a bijection (see: http://at.yorku.ca/cgi-bin/bbqa?forum=ask_a_topologist_2011&task=show_msg&msg=2700.0002).

Let $f(p) = 0$ and let $f(q) = 1$. Without loss of generality, let $p < q$. For all $y \in (0,1)$, by the Intermediate Value Theorem, there exists a $c \in R$ such that $f(c) = y$ and $p < c < q$.

Therefore, $f([p,q]) = f(\mathbb{R}) = [0,1]$. Recall that a continuous function on a compact set is uniformly continuous. Thus $f$ is uniformly continuous on $[0,1]$.

Let $\epsilon > 0$. For $x,y \in [p,q]^c$ such that $|x-y|< \delta_{[p,q]}$, by the definition of $f$, we have $f(x),f(y) \in [0,1]$. By the intermediate value theorem, there exists $a,b \in [p,q]$ such that $f(a) = f(x)$ and $f(b) = f(y)$. Thus, $|f(a) - f(b)| = |f(x) - f(y)| < \epsilon$.

Finally:

Is the theorem correct? Am I missing a counter-example or is there a gap in my proof?

Is it true in $\mathbb{R}^n$? Is there an intermediate value theorem for vector spaces?

Thanks

tmastny
  • 488
  • 7
    $f(x)=\sin\bigl(x^2\bigr)$? – gniourf_gniourf Dec 21 '14 at 21:58
  • 5
    The gap in your proof is clear: you take $x,y$ such that $\lvert x-y\rvert<\delta_{[p,q]}$, you claim that there exists $a,b\in[p,q]$ such that $f(a)=f(x)$ and $f(b)=f(y)$. All this is correct. But then, you use the fact that $\bigl\lvert f(a)-f(b)\bigr\rvert<\varepsilon$ and this is not correct since you never checked that $\lvert a-b\rvert<\delta{[p,q]}$._ – gniourf_gniourf Dec 21 '14 at 22:07
  • Thanks, that makes sense. That is why periodicity is required to make that statement true. It is what guarantees $|a-b|<\delta_{[p,q]}$. – tmastny Dec 21 '14 at 22:17
  • I think the more general result (on a metric space) is that if f is continuous over a compact set then it is uniformly continuous over that set. (It's called the Heine-Cantor theorem) – Jack Dec 22 '14 at 00:24

1 Answers1

11

$$f:x\mapsto\sin(x^2){}{}{}{}$$

Did
  • 284,245