Proving f has no min but has a max Let f be a function from the real numbers to (0, $\infty$) and be continuous. Suppose the limit as x approaches negative infinity of f(x) equals 0, as well as the limit as x approaches infinity of f(x) equals 0.
a) Prove f does not have a minimum on R.
b) Prove f has a maximum on R.
I know intuitively why these statements are true and can explain them but am struggling to use the given information to write a formal proof of it. Any help?
Thank you!!
 A: *

*Suppose it has a minimum $\ell$. By definition, this minimum is achieved, and so $\ell\in(0,\infty)$. Now use the fact that $\lim_{\infty} f = 0$ to show that there exists $x$ such that $f(x) < \ell$: contradiction.

*For the maximum, observe that there must exist $M>0$ such that $0< f(x) < f(0)$ whenever $ x< -M$ or $x> M$ (since $\lim_{\pm \infty} f = 0$, taking $\varepsilon = 1$ in the definition of the limit). Since $f$ is continuous, it achieves a maximum $A$ on the compact $[-M,M]$. so it achieves a maximum overall, either $f(0)$ or $A$.
(0 for $f(0)$ is of course arbitrary, use $f(487)$ if you prefer.)
A: A general scheme for this problem:
For A:


*

*Assume $f$ does attain a minimum $m$.

*Show $m > 0$.

*Show that for "large" $x$, $f(x) < m$, contradicting $m$ being a minimum value.


For B:


*

*Show there exists an $R \geq 0$ such that $f(x) < f(0)$ when $|x| > R$.

*Show that $f$ attains a maximum on $[-R, R]$.

*Conclude there is an overall maximum attained by $f$.

A: Intuitively, the graph of $f$ looks like some kind of "hill" (I'd imagine something that looks like a graph of $y=1/(1+x^2)$ though you could have very nasty ones. Draw graph and try to translate my argument to this particular graph, that might make things easier to see for you) with sides going down and down as go left/right so there must be a highest point somewhere at the "middle", which is maximum of $f$.
You can translate this intuition into formal argument as follows. Look at the hill, the reason by it has highest point is precisely because height of this hill must go to $0$ as you go further to the right/left.
You can "cut" this hill somewhere below the top of the hill, and look at the parts of hill that are above/below this cut.
To say this formally, we can do the following. Let's consider a real number $\varepsilon>0$. Since $f(x)\to 0$ as $x\to\pm\infty$ we must be able to find some $x_m,x_M$ such that $f(x)<\varepsilon$ for $x<x_m$ and $x>x_M$. We have cut the hill with the line $y=\varepsilon$.
Now, we could have some weird cases where $x_m\ge x_M$. But in that case we can just choose another $x_m'<x_M$ with similar properties, because $x_m'<x_M\le x_m$ and we'd still have $f(x)<\varepsilon$ for all $x<x_m'$. So we can assume that $x_m<x_M$ (if not we just choose $x_m'$ and rename it $x_m$).
One final thing: notice that we could be looking at some ridiculous case in which $f(x)<\varepsilon$ for all $x$. For reasons that will be clear later on, we don't want this. We can just choose smaller $\varepsilon>0$ such that $f(x)\ge\varepsilon$ for some $x$. If we can't do that, then $f(x)<\varepsilon$ for all $x$ and $\varepsilon>0$ so it must mean $f(x)\le 0$ for all $x$. But in assumption is that $f>0$ so this cannot be the case. We will assume that there are some $x$ such that $f(x)\ge \varepsilon$ from now on.

Now we have all the ingredient we need. Part b) follows easily. Since $[x_m,x_M]$ is closed, $f$ achieves a maximum $K$ at $x_{0}$ on this interval, and outside of this interval we have $f(x)<\varepsilon$. By earlier discussion on $\varepsilon$ then $K\ge \varepsilon$ and $f(x_0)$ is maximum achieved by $f$.
For a) just notice that if $f$ has a minimum, say $\varepsilon$ then $f(x)\ge \varepsilon$ for all $x$ so we cannot find $x_m$ and $x_M$ for this $\varepsilon$, hence $f(x)\not\to 0$ as $x\to\pm\infty$. This is contradiction, so no minimum achieved.
