Is this proof correct? [$\lim_{x\to-\infty}f=\lim_{x\to+\infty}f=+\infty\implies\ f$ has a global minimum] I'm trying to prove that if $f : \Bbb R\to\Bbb R$ is a continuous function that verifies:
$$\lim\limits_{x\to-\infty}f=\lim_{x\to +\infty}f+\infty$$
Then $f$ has a global minimum
So, since:
$\lim\limits_{x\to-\infty}f=\lim\limits_{x\to+\infty}f=+\infty\to\exists x\in\Bbb R, \exists \delta_1,\delta_2 \gt 0 \phantom{2} / \phantom{2}\forall c\in (x, x + \delta_2) :f(c)\geqslant f(x), \forall c \in (x - \delta_1, x) : f(c) \leqslant f(x) $
Since x may not be unique, letting:
$$m=\min \{f(x_1),\ldots,f(x_i)\}, \phantom{2} i\in\Bbb N$$
We have that there is a global minimum at the $x_i$ of $m$
Is my reasoning correct?
 A: *

*It is not clear how you've used the continuity of $f$ to conclude that $f$ has any local minimum. (What you've written after the $\implies$ is precisely that $x$ is a local minimum.)  

*Even assuming that that were true, you don't know whether $f$ has finitely many local minima and so, it may not make sense to take $\min$. (In fact, you don't even know if $f$ has countably many local minima. It is actually easy to construct an $f$ which does not.)



The correct idea would be to do something like the following:
Let $y_0 = f(0)$. Since $f(x) \to \infty$ as $x\to\pm\infty$, there exist $M_1, M_2$ with $M_1 < 0 < M_2$ such that
$$f(x) > y_0 \quad \forall x < M_1$$
and
$$f(x) > y_0 \quad \forall x > M_2.$$
Now, $I = [M_1, M_2]$ is compact and so, $f$ achieves its minimum on it. Let $m$ be this minimum. The claim is that this is the global minimum. Proving this is not tough. (Note that you must necessarily have $m \le y_0$ since $0 \in I$.)

Additional note: 


*

*It is possible that this minimum is achieved at uncountably many points. For example, consider $f(x) = |x-1| + |x+1|$. $f$ achieves its global minimum at all points in $[-1, 1]$. However, you do have that the function values at all these points is the same.

*It is also possible that the function has infinitely many minima of different values. For example, consider
$$f(x) = \begin{cases}
0 & x = 0\\
x^2\sin\left(\dfrac1x\right) & x \in \left[-\dfrac1\pi,\dfrac1\pi\right]\setminus\{0\}\\
\left|x^2 - \dfrac{1}{\pi^2}\right| & \text{otherwise}
\end{cases}$$
Here, $f$ has infinitely many distinct local minima. Thus, your original construction (which assumes that you have only finitely many mimima) will not work.

A: Let $M=\max \{f(x):|x|\le 1\},$ which exists because $f$ is continuous. 
Let $r\ge 1$ such that $|y|> r\implies f(y)>M.$
Let $m=\min\{f(x): |x|\le r\},$  which exists because $f$ is continuous. And let $|x_0|\le r$ with $f(x_0)=m=\min \{f(x): |x|\le r\}$.
Clearly $|y|\le r\implies f(x_0)=m=\min \{f(x): |x|\le r\}\le f(y).$ 
Since $r\ge 1$ we have $$|y|>r\implies f(x_0)=\min \{f(x):|x|\le r\}\le$$ $$\le \min \{f(x):|x|\le 1\}\le$$ $$\le \max \{f(x): |x|\le 1\}=M<f(y).$$
