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

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.

• Use definition of the limits, fix explicitly some large value of $x$ such that maximum is not attained beyond it. So now you have a bounded interval to work with. – AdditIdent Dec 8 '18 at 14:53
• Extreme value theorem is the right way to go. The point of the exercise is that the limit to $\pm\infty$ conditions will make up for the fact that the interval is not bounded (please do note that $(-\infty, \infty) = \mathbb{R}$ is closed, but it is not bounded/compact). Try using the limit conditions, with a particular choice of $\varepsilon > 0$, to find a compact interval, the maximum over which must be the maximum over $\mathbb{R}$. – Theo Bendit Dec 8 '18 at 14:53

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\}$$.

By definition of the limits we can find $$M$$ such that $$|x|>M \implies f(x)<\frac{1}{2}$$. Now consider the restriction $$f|_{[-M,M]}$$. You can prove that the max of $$f_{[-M,M]}$$ is the max of (unrestricted) $$f$$.

Another way to think about it is that the one-point compactification of $$\mathbb{R}$$ is $$S^1$$, and the limit condition means you can extend $$f$$ continuously to $$S^1$$.

Pick $$x_+$$ so large that $$|f(x)| < \frac{1}{10}$$ for $$x \geq x_+$$. And pick $$x_-$$ such that $$|f(x)| < \frac{1}{10}$$ for $$x \leq x_-$$ (we can do this since $$f(x) \to 0$$ for $$|x| \to \infty$$. We may pick $$x_- < x_+$$. Now $$f$$ has a maximum in the interval $$[x_-, x_+]$$ and because $$f(0)=1 > \frac{1}{10}$$ we know that this is a global maximum.

• The function might oscillate a bit before it goes to zero. So we define it to be $\frac{1}{x+1}\sin(x) + \frac{1}{x+1}$ and near $x=-1$ we define it differently piecewise so the two parts connect and it is continuous. – Wesley Strik Dec 9 '18 at 9:55
• Then we don't attain a maximum at $1$ but it still satisfies the conditions. – Wesley Strik Dec 9 '18 at 9:57
• I'm not saying that 1 is a maximum. Just that a maximum is not located outside $[x_-, x_+]$. – Martin Dec 9 '18 at 9:58