TITLE: $f(x)/x \to l$ and $f''(x) = O(1/x)$
QUESTION [6 upvotes]: $f \in C^2(\mathbb{R}, \mathbb{R})$ such that $f(x)/x \to l \in \mathbb{R}$ as $x \to + \infty$, and such that $f''(x) = O(1/x)$ at $+\infty$. Find : $$\lim_{x \to +\infty} f'(x)$$

Some thoughts : 
It seems to me that the limit is $l$, but I am unable to prove it. Moreover it seems that we have $f''(x) = o(1/x)$. 
I think I need somehow to relate the derivatives to each other, maybe using  the series expansion of $f$, but it doesn't seem to work.
Thank you!

REPLY [7 votes]: First off, it's not necessarily true that $f''(x)=o(\frac1x)$. For example, we could take $f''(\frac1x)=\frac{\sin x}{x}$ and integrate twice. We get that (if $f'(x)=0$) $f'(x)\to \frac{\pi}{2}$ as $x\to\infty$, and $\frac{f(x)}{x}\to \frac{\pi}{2}$ as well by L'Hopital's rule.
On that note, L'Hopital's rule says that if $\lim_{x\to\infty} f'(x)$ exists, it's equal to $l$. The question is whether it must always exist. I tried some things with oscillating functions of $\ln x$; while it wasn't too hard to make the limit of $f'$ diverge, that also caused the limit of $f$ to diverge - and that inspired the next tactic.
WLOG, let $l=0$; we can just subtract $lx$ from $f$, without affecting either whether $f'$ converges or whether $xf''(x)$ is bounded. For any $\epsilon>0$, there is some $M$ such that $|f(x)|\le \frac{\epsilon^2}{\epsilon+2} x$ for $x>M$. Then, by the Mean Value Theorem, for any $x>M$, there is some $t\in (x,(1+\epsilon)x)$ such that
$$|f'(t)|=\left|\frac{f(x+\epsilon x)-f(x)}{\epsilon x}\right| \le \frac{\frac{\epsilon^2}{\epsilon+2}(\epsilon+2)x}{\epsilon x}=\epsilon$$
Now that we have one value for $f'$ on that interval, how large can it get? We also have the hypothesis that $f''(x)=O(x^{-1})$ as $x\to\infty$; let $f''(x)\le \frac Ax$ for $x\ge 1$. Let $g(y)=f'(e^y)$. Then $g'(y)=e^yf''(e^y)\le A$ for all $y\ge 0$. Also, for any $y\ge \max(0,\ln M)$, there is some $s\in (y,y+\ln(1+\epsilon))$ such that $|g(s)|\le \epsilon$. For such a pair $s$ and $y$, we then have
$$|g(z)|\le |g(s)|+A|z-s|\le \epsilon+A\ln(1+\epsilon)<(1+A)\epsilon$$
for any $z\in (y,y+\ln(1+\epsilon))$. Since $y$ was arbitrary, every $z\ge \max(0,\ln M)$ is in such an interval, and
$$(1+A)\epsilon > |g(\ln x)|=|f'(x)|\text{ for all }x\ge\max(1,M)$$
Looking back, there is such an $M$ for any $\epsilon$, and we have that $\lim_{x\to\infty} f'(x)=0$. We have proven the desired convergence.
Of course, if we add that $lx$ back in to $f$, the limit of $f'$ becomes $l$ instead of zero.