Counterexample for "if every continuous function on $E$ is bounded, then $E$ is compact" Give me counter example for this false statement:
 "Every continuous function on the set $E$ is bounded this implies $E$ is compact".
 A: A space $X$ in which every continuous function from X to the reals is bounded is called pseudocompact.
An example of a space that's pseudocompact but not compact is any infinite space with the particular point topology. That's the topology in which you pick some arbitrary point, call it $x$, and then say that the open sets are any set containing $x$, along with the empty set. You can see that such a collection of sets is closed under arbitrary unions and finite intersections (arbitrary intersections in fact), and that the empty set and the entire space are in the collection. So this is a topology.
Consider a space $X$ whose points are the natural numbers 1, 2, 3, 4, ... with the particular point topology on the number 1. This space is not compact, because if I take the collection {1,2}, {1,3}, {1,4}, {1,5}, ... this is an open  cover of $X$; but any finite subcollection does not cover $X$. So $X$ is not a compact space.
On the other hand, any continuous function from $X$ to $\mathbb{R}$ is bounded. To see this, suppose that $f : X \rightarrow \mathbb{R}$ is continuous. If $f$ is a constant function it's bounded, so suppose $f$ is non-constant. Then its image contains two distinct reals $a$ and $b$, with two disjoint open neighborhoods $A$ and $B$ containing $a$ and $b$, respectively. That's a consequence of the usual topology on the reals, in which any two distinct points can be separated by epsilon-neighborhoods. Moreover, $A$ and $B$ are each nonempty.
A function on a topological space is continuous if and only if the inverse image of any open set is open. (It's a nice exercise to show that this definition is equivalent to the usual epsilon-delta definition from calculus).
Therefore the inverse images $f^{-1}(A)$ and $f^{-1}(B)$ are nonempty disjoint open sets in $X$. But this is impossible, because there are no two nonempty open sets in $X$ that are disjoint; their intersection always contains at least the number 1.
Therefore $f$ is constant after all. In other words, every continuous function from $X$ to $\mathbb{R}$ is constant, hence bounded. But $X$ is not compact.
A: Claim: $E$ is closed i.e $E=\bar{E}$
suppose not, then $\exists c\in \bar{E}\setminus E$
then the function $f(x)={1\over x-c}$ is unbounded
so $E$ must be closed.
Claim: E must be bounded.
If not then take $f(x)=x$ continous on $E$ but unbounded.
So $E$ must be closed bounded subset of reals must be compacto!
