Given $f : \mathbb{R} \to (0,\infty)$ is continuous and $f(x)\to 0$ as $ x\to \pm \infty$, it attains its supremum

38 Views Asked by At

Given $f : \mathbb{R} \to (0,\infty)$ is a continuous function that satisfies $\lim_{x\to -\infty} f(x) =\lim_{x\to\infty} f(x) = 0$, prove that it attains its supremum.

Note: this is a variant of a previously posted question on this site, but I was just wondering if my proof will suffice.

1

There are 1 best solutions below

0
On BEST ANSWER

Let $\varepsilon = f(0)/2$. By the continuity, there is some $\delta > 0$ s.t. $|x| < 2\delta$ implies $f (x) > f(0)/2 = \varepsilon$. By definition of limits, there exists $M, N$ s.t. $$ 0 < f(x) < \varepsilon \quad [\forall x < M, x > N]. $$ Easy to see $-\delta < M$ and $\delta > N$ both fail. Therefore $M\leqslant -\delta < +\delta \leqslant N$.

Now by the continuity, $f$ has a maximum $S$ on $[2M, 2N]$ at some $b\in [2M, 2N]$. Then $$S \geqslant f(0) = 2\varepsilon > \varepsilon > f(x)$$ for all $x \in (-\infty, M) \cup (N, +\infty)$. Altogether $f(b) = S \geqslant f(x)$ on the whole $\Bbb R$, i.e. $f$ attain its supremum on $\Bbb R$.