1. ## Compact continuity question.

Prove that if $\displaystyle F\subset\mathbb{R}$, is not compact. Then there exists a continuous function $\displaystyle f:F\rightarrow\mathbb{R}$ which isn't bounded on $\displaystyle F$

Any help would be appreciated.

2. Originally Posted by skamoni
Prove that if $\displaystyle F\subset\mathbb{R}$, is not compact. Then there exists a continuous function $\displaystyle f:F\rightarrow\mathbb{R}$ which isn't bounded on $\displaystyle F$
If F is not compact then it is either unbounded or not closed (or both). If it is unbounded then (obviously) the function f(x) = x is unbounded on F. If F is not closed, let z be a point in the closure of F but not in F, and let f(x) = 1/(x–z).

3. Originally Posted by skamoni
Prove that if $\displaystyle F\subset\mathbb{R}$, is not compact. Then there exists a continuous function $\displaystyle f:F\rightarrow\mathbb{R}$ which isn't bounded on $\displaystyle F$

Any help would be appreciated.
Two possibilities: (i) either F is not closed, (ii) F is not bounded.

If F is not closed then there exists $\displaystyle p\in \partial F$ so that $\displaystyle p\not \in F$. Now define $\displaystyle f(x) = \tfrac{1}{|p-x|}$.
This function is continous and unbounded since $\displaystyle x$ gets arbitrary close to $\displaystyle p$.

If F is not bounded then for some $\displaystyle p\in F$ define $\displaystyle f(x) = |p-x|$.
Certainly this is not bounded since $\displaystyle x$ gets arbitrary away from $\displaystyle p$.

EDIT: Opalg beat me too it .

By the way I think it is possible to find a $\displaystyle \mathcal{C}^{\infty}$ function , do you agree ?