Confusion in GH Hardy's proof of $\lim_{x\to \infty} (f(x)+f'(x))=0\implies \lim_{x\to \infty} f(x)=0 \land \lim_{x\to \infty} f'(x)=0$

First, it is relevant that $\phi(x)+\phi'(x) \to 0$ in Hardy's proof. Also note that $\phi$ is continuous.

There are three cases, depending on the behaviour of $\phi'$ for large $x$.

(i) There is some $M$ such that $\phi'(x) \ge 0$ for all $x \ge M$,

(ii) There is some $M$ such that $\phi'(x) \le 0$ for all $x \ge M$ and

(iii) For all $M$ there exists $x, x^* \ge M$ such that $\phi'(x) >0$, $\phi'(x^*) <0$.

Cases (i), (ii) were dispatched above.

From Darboux's theorem we see that there in a strictly increasing sequence $x_n \to \infty$ such that $\phi'(x_n) = 0$. By assumption, we also have $\phi(x_n) \to 0$.

Let $\epsilon>0$ and find $M$ such that for $x \ge M$ we have $|\phi(x)+\phi'(x)| < \epsilon$. Choose the smallest $N$ such that $x_N \ge M$ and suppose $x \ge x_N$. Note that $|\phi(x_n)| < \epsilon $ for all $n \ge N$. In particular, note that $|\phi(x_N)| < \epsilon$.

I claim that $|\phi(x)| < \epsilon$ for all $x \ge x_N$. Suppose $|\phi(x)| \ge \epsilon$ for some $x$ and choose $N' > N$ such that $x< x_{N'}$. In particular, $|\phi|$ has a $\max$ at some $x^* \in (x_N, x_{N'})$ and so $\phi'(x^*) = 0$ and so $|\phi(x^*)| < \epsilon$, a contradiction.

Hence $\phi(x) \to 0$.


Here is a solution which has a "sequence" flavor instead of an "$\varepsilon$" flavor:

By hypothesis there exists an increasing sequence of points $x_n \geq 0$ for which $f'(x_n) = 0$ and such that $x_n \to \infty$. Because $f(x)$ is locally extremal at each such point, and by hypothesis $f'(x)$ is zero infinitely often for $x \geq 0$, then for all $x \geq x_n$ we have the bound (for each fixed $n$) $$ \lvert f(x) \rvert \leq \sup_{k \geq n}\,\lvert f(x_k) \rvert. $$ But $f(x) + f'(x) \to 0$ as $x \to \infty$, so in particular if we take the sequence $(x_n)$ which converges to $\infty$ as $n \to \infty$ we conclude that $$ f(x_n) = f(x_n) + f'(x_n) \to 0 $$ as $n \to \infty$. This means that $\sup_{k \geq n}\ \lvert f(x_k) \rvert \to 0$ as $n \to \infty$ as well, and therefore $$ \lim_{x \to \infty} \lvert f(x) \rvert \leq \lim_{n \to \infty} \sup_{k \geq n}\, \lvert f(x_k) \rvert = 0 $$ which completes the proof.