Q. Let $f$ be continuously differentiable on $(0, \infty)$ and let $f(0)=1$. Show that if $|f(x)| \leq e^{-x}$ for $x \geq 0$, then there is $x_{0}>0$ such that $f^{\prime}\left(x_{0}\right)=-e^{-x_{0}}$.
I think
Setting $g(x)=f(x)-e^{-x}, x \geq 0$. Then $g(0)=0, g(x) \leq 0$ and $\lim _{x \rightarrow \infty} g(x)=0$. If $g(x) \equiv 0$, then $f^{\prime}(x)=-e^{-x}$ for $x \in(0, \infty)$. So, suppose that there is $a>0$ such that $g(a)<0$. Then for sufficiently large $x$, say $x>M$, we have $g(x)>\frac{1}{2} g(a)$. Consequently, $g$ attains its minimum value at some $x_{0}$ in $(0, M )$. Thus $g^{\prime}\left(x_{0}\right)=0$.
Is this okay? Also give me another approach.