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$?