I was studying for a test and encountered the following problem in a textbook:
Suppose $f(x)$ is continuous, with $f >0$ for all $x$ and $\lim_{x \to \infty} f(x) = \lim_{x \to -\infty}f(x)= 0$Show that there is some number $y$ such that $f(y) \geq f(x)$ for all $x$.
My solution goes like this:
Since $\lim_{x \to \pm \infty} = 0$, there is a large enough $N>0$ such that if $\left|x\right|>N$, then $f(x)<f(N)$.
Then, consider the interval $I=\left[-N,N\right]$. Since$f$ is continuous on $I$, by the extreme value theorem, there exists $y\in I$ such that $f(y) \geq f(x) \forall x\in I$. In particular, $f(y) \geq f(N)$, implying that $f(y)>f(x)$ when $\left|x\right|>N$.
Therefore, $f(y)\geq f(x)\forall x\in \left(-\infty,-N\right)\cup\left[-N,N\right]\cup\left(N,\infty\right) \Rightarrow f(y)\geq f(x) \forall x$.
However, how can I make the argument for the existence of $N$ more rigorous?
Thank you!