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 ?