Existence of maximum and minimum 
Let $f:\mathbb{R}_+\rightarrow \mathbb{R}$ be continuous  and such that $f(0)=1$ and $lim_{x\rightarrow+\infty}f(x) = 0$.
Prove that $f$ must have a maximum in $\mathbb{R}_+$. What about the minimum?

I started working on that trying to verify Weierstrass theorem on a smaller interval of $\mathbb{R}_+$. The fact is that I am not sure on how to use the data contained in the text.
Moreover, I assumed that once Weierstrass theorem holds, both maximum and minimum exist since both argmax and argmin are non empty compact sets; but looking at the solutions this is not the case, since minimum exists only in certain cases.
Can you give me any hint/starting point to solve this problem?
 A: Let $\epsilon>0 $ .
$\lim_{x\to \infty}f(x)=0\implies \exists G>0$ such that $x>G\implies |f(x)|<\epsilon$.
Now $f$ is continuous on the compact set $[0,G]$ and hence bounded by say $M$ and thus attains its bounds therein. 
A: Suppose $f$ doesn't have a maximum.  
Pick any non-zero $x_{1} \in \Bbb R_{+}$. Since $[0, x_{1}]$ is compact, and $f$ is continuous, we know $f$ has a maximum $M > 0$ on this interval.  
But since $f$ doesn't have a maximum on $\Bbb R_{+}$, we also know there is some $x_{2} \not \in [0,x_{1}]$ with $f(x_{2}) > M$.  
But $[0,x_{2}]$ is compact, so $f$ attains a larger maximum on this interval than $M$ (since $f$ is continuous).  In particular, we can find $z \in [0, x_{2}]$ so that $f(z) > M$.  
Since $f$ doesn't attain a maximum on $\Bbb R_{+}$, proceeding as above we can find $\{x_{i}\}_{i = 1}^{\infty}$ with $x_{1} < x_{2} < x_{3} < x_{4} < \dots$ and $f(x_{i}) > M$ for each $i$.  What does this tell you about the limit of $f(x)$ as $x \to \infty$?  Can it be $0$ as we assumed? 
