Show that a continuous function with infinite “tails” with value $0$ and $f(0)=1$ must have a maximum.

real-analysis

Let $f : R \rightarrow R$ be continuous, where $f(0) = 1$, and
$$\lim_{x \rightarrow – \infty}
f(x) = \lim_{x \rightarrow + \infty}
f(x) = 0$$

Show: there is an $x^* \in \mathbb{R}$ such that $f(x^*) = \max\{f(x)| x \in \mathbb{R}\}$

Intuitively this makes sense, we have some function that is above the $x$-axis for $x=0$, then as we look at its tails, we notice that for very large and for extremely small values the tails of the function go to zero. There must be some point where it is maximal, and this point must lie between $-\infty$ and $+ \infty$. I have been working on intermediate value theorem questions so far and I think this question is again an IVT-like question. I feel a bit lost when it comes down to "showing there exists a maximum". The intermediate value theorem tells you there must exist some intermediate point, but it does not say anything about it being a maximal point. Am I moving in the right direction or should I consider a different theorem (like the extreme value theorem $\dots$ but then the question is, what is the interval because $[-\infty, + \infty]$ is just ridiculous)?


Edit: on a second note, this is probably more of an extreme value question, but I still am quite lost because it only works on a closed and compact/bounded interval $(-\infty, + \infty)$ is not bounded.

Best Answer

Find some $n>0$ such that $f(x)<0.5$ for $|x|>n$.

Now focus on $f$ restricted to closed and bounded (hence compact) interval $[-n,n]$.

A continuous function on a compact set takes a maximum so some $x^*\in[-n,n]$ will exists with $f(x^*)=\max(\{f(x)\mid x\in[-n,n]\}$.

Then $f(x^*)\geq f(0)=1>\frac12$ so that also $f(x^*)>f(x)$ for every $x\notin[-n,n]$.

That means that $f(x^*)=\max(\{f(x)\mid x\in\mathbb R\}$.