If $f(x):[0,\infty)\to\mathbb{R}$ is continuous with $\lim_{x\to\infty}f(x)=0$, then does there exist a maximum in $[0,\infty)$ of $f$?
I think it should, but not sure how to prove it. Now, if there does not exist a maximum, it should either diverge at $0$ (by continuity) or oscillate infinitely at $0$. But, it is well defined on the closed interval $[0,\infty)$. Any examples of this kind? Thanks beforehand.
Let consider the case
Note that to guarantee a maximum by EVT we need to set $f(0)=0$.