# Show that the following functi0n is bounded

Let $f: \mathbb{R} \rightarrow \mathbb{R}$ be a continuous function with $f(0)>0$ and $$\lim_{x \to \infty} f(x)= \lim_{x \to -\infty} f(x)=0$$
$(i)$ Show that $f$ is bounded.
$(ii)$ Let $A=sup\{f(x):x \in \mathbb{R} \}$ show that there is a point $x_0 \in \mathbb{R}$ such that $f(x_0)=A$

My Attempt
$(i)$ I am not really sure how to approach this as the question seems intuitive if you draw a sketch or think about it. But proving it rigorously is what I am struggling with. Start with definitions;
$\bullet$ $\lim_{x \to \infty} f(x)=0$ means $$\forall \ \ \epsilon>0 \ \ \exists \ \ N \ \ s.t \ \ |f(x)|<\epsilon \ \ for \ \ x>N$$
$\bullet$ $\lim_{x \to -\infty} f(x)=0$ means $$\forall \ \ \epsilon>0 \ \ \exists \ \ N \ \ s.t \ \ |f(x)|<\epsilon \ \ for \ \ x<N$$
but how do I show it is bounded, can't use the EVT as it is not on a closed interval...

any help on $(i) and (ii)$ would be very much appreciated

(i) The given limits allow you to find and interval $[-M,M]$ such that $|f|$ is bounded by a $\epsilon>0$ in its complement.
By Weierstrass $|f|$ is bounded by a $C$ inside $[-M,M]$.
Then $|f|$ is bounded by $\max\{\epsilon, C\}$ in $\mathbb{R}$.
(ii) Here is where we use $f(0)>0$. This information tells you that if you choose in the proof above $\epsilon< f(0)$, then the supremum of $f$ is in $[-M,M]$. By the same Weierstrass this supremum is attained (it is attained in $[-M,M]$).