# Proof that a continuous function is bounded below

I have this question:

Assuming the theorem that a continuous real-valued function on a closed bounded interval is bounded and attains its bounds, prove that if $f\colon\mathbb R\to\mathbb R$ is continuous and $f(x)\to+\infty$ as $x\to+\infty$ and $f(x)\to+\infty$ as $x\to-\infty$ then there exists some $x_0\in\mathbb R$ such that $f(x)\geq f(x_0)$ for all $x\in\mathbb R$.

My first thoughts are to consider $f\colon[a,b]\to\mathbb R$. Then we know that $f$ is bounded and attains its bounds, so we have an $x_0$ such that $f(x)\geq f(x_0)$ for all $x\in[a,b]$. But how can I increase this interval to be the whole of $\mathbb R$? Could I take the limit as $a\to-\infty$ and $b\to+\infty$?

-

HINT: Let $u=f(0)$. Since $\lim_{x\to-\infty}f(x)=\infty$, there is an $a\in\Bbb R$ such that $f(x)>u$ for all $x\le a$. Since $\lim_{x\to\infty}f(x)=\infty$, there is a $b\in\Bbb R$ such that $f(x)>u$ for all $x\ge b$. Thus, $$0\in\{x\in\Bbb R:f(x)\le u\}\subseteq[a,b]\;.$$
Now apply your hypothesis to the interval $[a,b]$.