Prove that $\lim\limits_{x\to+\infty}f'(x)=\lim\limits_{x\to+\infty}f''(x)=0$ 
Given $f \in C^3(\mathbb{R}).$ Suppose that
$\lim\limits_{x\to+\infty}f(x)=a \in \mathbb{R}$ and
$\lim\limits_{x\to+\infty}f'''(x)=0$. Prove that
$\lim\limits_{x\to+\infty}f'(x)=\lim\limits_{x\to+\infty}f''(x)=0$.

My solution: Since $\lim\limits_{x\to+\infty}f(x)=a$, there exists $M>0$ that for all $x, x' \in \mathbb{R}$, if $x,x'>M$ then $f(x), f(x') \in \left(a-\varepsilon^2/2, a+\varepsilon^2/2\right)$. This yields
$$\vert f(x)-f(x') \vert < \varepsilon^2.$$
Therefore $\frac{\vert f(x)-f(x') \vert}{\varepsilon} < \varepsilon$. So, for all $x>M$, $x'=x+\varepsilon$ we have
$$0\le\frac{\vert f(x+\varepsilon)-f(x) \vert}{\varepsilon} < \varepsilon.$$
Let $\varepsilon \to 0$ we have
$$0 \le f'(x) \le 0 \text{ or } f'(x)=0.$$
That means $\lim\limits_{x\to+\infty}f'(x)=0$.
Doing similarly as above we have
$$\lim\limits_{x\to+\infty}f''(x)=0.$$
My question: $\lim\limits_{x\to+\infty}f'''(x)=0$ is really necessary or not (because I don't use it in my proof)?
 A: First, consider
$$
f(x)=\frac{\sin(x^2)}{x}.
$$
As $x\rightarrow\infty$, this approaches $0$.  On the other hand,
$$
f'(x)=\frac{2x^2\cos(x^2)-\sin(x^2)}{x^2}=2\cos(x^2)-\frac{\sin(x^2)}{x^2}
$$
does not have a limit as $x\rightarrow\infty$.  Therefore, the condition on $f'''$ is necessary for the result.
The problem with your setup is that you never specify when you're quantifying $\varepsilon$.  You're actually quantifying it before computing $M$, so we'll write $M=M(\varepsilon)$.  Next, you consider
$$
\frac{|f(x+\varepsilon)-f(x)|}{(x+\varepsilon)-x}.  
$$
At this point, you let $\varepsilon$ go to $0$, but here's your problem, as $\varepsilon$ goes to $0$, $M(\varepsilon)$ may go to infinity, so you don't get a bound on the derivative when $\varepsilon$ is too small, so the squeeze theorem cannot be applied.
A: Here's a proof that shows how the condition on the 3rd derivative could be utilized.
Take Taylor's remainder theorem to 3rd order and apply it to the intervals $(x,x+h)$, $(x,x+k)$, $h\neq k$. Now consider only the first interval since the second one can be done similarly.
There exists $\xi\in(x,x+h)$ such that
$$f(x+h)=f(x)+f'(x)h+\frac{f''(x)}{2!}h^2+\frac{f'''(\xi)}{3!}h^3$$
Now since $\lim_{x\to\infty}f(x)=\lim_{x\to\infty}f(x+h)=a$, and $\lim_{x\to\infty}f'''(\xi(x,h))=0$ (why?) we conclude that
$$\lim_{x\to\infty}\left(f(x+h)-f(x)-\frac{f'''(\xi)}{3!}h^3\right)=h\lim_{x\to\infty}\left(f'(x)+\frac{h}{2}f''(x)\right)=0 ~~~~~~~~~~(1)$$
Similarly we conclude
$$\lim_{x\to\infty}\left(f'(x)+\frac{k}{2}f''(x)\right)=0~~~~~~~~~~~~~(2) $$
Taking the linear combinations $(2)-(1)$ and $h(2)-k(1)$ and exploiting the linearity of the limit operation when two limits exist, we obtain the desired result. The result is generalizable to a $C^n$ function whose $n$th derivative goes to zero for any $n$.
