function has global maximum [duplicate]

Solution 1:

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.