Continuous function on a non-compact set

810 Views Asked by At

I'm trying to show if $X$ is non compact ($X \subseteq \mathbb{R}$) then there is a cont function $f:X \rightarrow \mathbb{R}$ which is bounded but doesn't attain it's bounds.

I'm trying it for a set X of the form ($-\infty,a$) and ($-\infty,a$]- and can't draw a cont function where neither bound is attained. I can draw a graph in which one of the bounds is always attained but not the other- however not a graph where neither is attained. Is it implicit in the question that what it means is "is bounded but doesnt attain both it's bounds"?

1

There are 1 best solutions below

0
On BEST ANSWER

Sketch of proof:

Exploit the fact that there is a countably infinite subset $A \subseteq X$ which has no limit points in $X$. Let $(a_n)$ be an enumeration of the elements of $A$. For each $a_n$ there is some $\delta_n > 0$ such that the interval $I_n = (a_n - \delta_n, a_n + \delta_n)$ contains no elements of $A$ except $a_n$ itself. Moreover, we can choose $\delta_n$ small enough so that $I_n$ does not intersect any of the previously constructed $I_k$ with $k < n$.

Now define $f$ in the interval $I_n$ to be, say, an isosceles triangle of height $1-1/n$ and support equal to $I_n$. Define $f = 0$ everywhere outside of $\bigcup_{n=1}^{\infty}I_n$. It should be clear that $f$ (restricted to $X$) is continuous on $X$ and becomes arbitrarily close to $1$ but never achieves that value.

You can modify the construction by making the triangle heights negative instead of positive for even $n$. Then $f$ will approach upper and lower bounds $+1$ and $-1$ arbitrarily closely but never achieve them.