bounded function and compact issue Here is the problem, i have a definite fonction on an open set and I feel that the question is asking to use a compact argument 
let $f:\mathbb{R^n}\rightarrow\mathbb{R}$ continuous, we also admit that $\lim_{\lVert x\rVert \to\infty}f(x) =+\infty$.
1)Prove that $f$ is bounded lowerly.
2)prove that $\inf_{x\in\mathbb{R^n}}f(x)$ is reached
So what I tried to do : $\mathbb{R^n}$ is an open set but it is known that all closed and bounded intervals of $\mathbb{R^n}$ are compacts.
So I decided to proceed this way : 
let A $\subset \mathbb{R^n}$ a compact with $T_A$ its induced topology possible because $\mathbb{R^n}$ is a finite dimensional set. Basing on Tychonoff's theorem saying that a product of compacts is a compact, let's take the known set $\forall i \in \{1,..,n\}$ $\forall a_i,b_i\in\mathbb{R}$, $\prod_{i=1}^n[a_i;b_i] \subset A$ which is a compact.
I want to prove that $f$ is lowerly bounded so I use my admitted hypothesis that $f$ is continuous on $\mathbb{R^n}$ so it would mean it is continuous on all of its closed subsets, so continuous on all of its compact because $\mathbb{R^n}$ is a finite dimensional set (I don't remember well but it seems to me that it was a necessary and sufficient condition to say that compacts are equivalent to closed and bounded sets).
And finally because it is continuous on a compact and has its value in $\mathbb{R}$
 then, $f$ would be lowerly bounded and reach its infimum but not its supremum because we supposed $\lim_{x\to\infty}f(x)=+\infty$. And then answer the two questions at the same time.
Question 1 : Can I just take a compact subset of $\mathbb{R^n}$ just the way I did and finally conclude with my $f$ function generalizing it is bounded on all $\mathbb{R^n}$ ? I just feel it isn't enough.
Question 2 : $\mathbb{R^n}$ is an open set, I don't understand how is it possible to just take a gathering of compacts and then "globalizing" the results to an open one.
Thank you for your help !
 A: We will apply:

If $C$ is a compact subset of $\mathbb{R}^{n}$ and $g:C\rightarrow\mathbb{R}$
  is continuous then some $x_{0}\in C$ exist such that $g\left(x_{0}\right)=\inf_{x\in C}g\left(x\right)$.

(If you need explanation of this then let me know)
Find some constant $c\geq0$ such that $\left\Vert x\right\Vert >c$
implies that $f\left(x\right)\geq f\left(0\right)$. From $\lim_{\left\Vert x\right\Vert \rightarrow\infty}f\left(x\right)=+\infty$ it follows that such a $c$ indeed exists.
Define $C=\left\{ x\in\mathbb{R}^{n}\mid\left\Vert x\right\Vert \leq c\right\} $
and notice that $C$ is compact (bounded and closed) and contains $0$. 
If $\iota:C\rightarrow\mathbb{R}^{n}$
denotes its inclusion then $g=f\circ\iota:C\rightarrow\mathbb{R}$
is a continuous function and we can apply what is mentioned above. 
Taking into account that $f$ and $g$ coincide on $C$ there will exist some $x_{0}\in C$ with $f\left(x_{0}\right)=\inf_{x\in C}f\left(x\right)$.
For $x\notin C$ we have $f\left(x\right)\geq f\left(0\right)\geq f\left(x_{0}\right)$. 
This together
shows that $\inf_{x\in\mathbb{R}^{n}}f\left(x\right)=f\left(x_{0}\right)$ and consequently $f$ is bounded lowerly.
A: Here are some remarks and hints:  First, it seems that the second statement (the greatest lower bound is achieved) implies the first statement (there is a lower bound).  
Secondly, for any number $c$ you can divide up the domain as
$$\mathbb{R}^n = \left\{x\mid f(x) \leq c \right\} \cup \left\{x\mid f(x) > c\right\}$$
Using the limit at $\infty$ you should be able to show one of these sets is compact.
