# Let $f$ be with $\lim_{|x|\to\infty} f(x) = 0$, show that: $\exists x_0\in\mathbb{R}: \, \mid f(x)\mid \, ≤ \, \mid f(x_0)\mid$.

Let $f: \mathbb{R} \rightarrow \mathbb{R}$ be continuous such that $$\lim_{x\to\infty} f(x) = \lim_{x\to -\infty}f(x) = 0$$ Show that there $\exists x_0\in\mathbb{R}: \, \mid f(x)\mid \, ≤ \, \mid f(x_0)\mid$ for $\forall x \in \mathbb{R}$.

Basically, this means I have to show that $f$ has a maximum on $\mathbb{R}$, right? There was a theorem in a lecture which said:

Let $f: D \rightarrow \mathbb{R}$ be continuous and $K \subset D$ be compact. Then $f$ has a maximum on $\mathbb{R}$.

However, I cannot use the theorem since $\mathbb{R}$ is not compact. From what I've understood the theorem fails if not compact because there is no maximum if one of the limits is $±\infty$. My approach would've been that:

But since $$\lim_{x\to\infty} f(x) = \lim_{x\to -\infty}f(x) = 0$$ and obviously $$\mid f(x)\mid\, ≥ 0$$ $f$ must have a maximum on $\mathbb{R} \setminus \{ \infty, -\infty \}$ since f is continuous.

Is the idea acceptable?

• I edited your question to incorporate $\displaystyle \lim_{x \rightarrow -\infty}$ otherwise there are obvious counterexamples. I hope this is what you meant. – hot_queen Jan 9 '14 at 2:12
• $\infty,-\infty \not\in \mathbb{R}$... – DanZimm Jan 9 '14 at 2:15
• I just realized given the $f$ you gave can be decreasing on $(-\infty, 0]$ and increasing on $[0,\infty)$ and then for any $x_0$ you propose, $f(2x_0) \ge f(x_0)$ – DanZimm Jan 9 '14 at 2:21
• ignore previous comment, didn't realize there were absolute values! – DanZimm Jan 9 '14 at 2:27

The conditions mean that for every $\epsilon > 0,$ there exists an $R>0,$ such that $|f(x)| < \epsilon$ for $|x|>R.$ On the compact set $[-R, R],$ you know that $|f|$ has a maximum $M.$ If $M > \epsilon,$ that is the global maximum. If not, repeat the argument with $M/2$ in place of $\epsilon.$ This works unless $M = 0,$ in which case, double $R.$ If the maximum is always $0$ then the function is the constant $0,$ and you are done.
• If not would mean that $M = \epsilon$, since $M \not < \epsilon$ by definition. Edit: I haven't quite understood why it could be that $M ≤ \epsilon$ and why we have to separately deal with $M = 0$. – Nhat Jan 9 '14 at 1:53
Let $\, f : \mathbb{R} \to \mathbb{R}$ be continuous s.t. $$f(x) > 0 \; \forall x \in \mathbb{R}, \lim_{x \to \infty} f(x) = \lim_{x \to -\infty} f(x) = 0$$ then $\exists \, x_0 \in \mathbb{R}$ s.t. $f(x) \le f(x_0) \; \forall x \in \mathbb{R}$
Let $a_n$ be a sequence in $\mathbb{R}$ s.t. $$a_n > 0 \; \forall \; n \in \mathbb{N}, \lim_{n \to \infty} a_n = \infty$$ (note this is notation that says $a_n$ is unbounded). Now create the set $A = \left\{ m_k \mid k \in \mathbb{N} \right\}$ where $m_k$ is the maximum specified by the theorem you referred to on the compact set $[-a_k, a_k]$ (bounded closed sets in $\mathbb{R}^n$ are compact). Now all that's left to prove is that $\sup A = \max A$ or that the maximum is actually achieved (which you can prove using the continuity of $f$ and strict positiveness of $f$).