Derivatives vanishing at infinity Take a subinterval of Euclidean space, for instance, which has infinite length.  WLOG let it be $\mathbb{R}$.  Is there an example of a function $f$ such that $f$ and $f''$ vanish at infinity, but not $f'$?  What are the important properties of such an $f$ that would help me to construct generalizations of this example myself to cases where $f, \dots f^{(k)}$ all exist, but only the first and last vanish at infinity?
 A: I think the right way to approach this is to think of how $f'$ has to look.
The conditions on $f$, $f'$, and $f''$ respectively imply


*

*The consecutive regions where $f'$ is above and below the $x$ axis have to have areas whose (alternating) sum adds to zero.

*There is some number $a$ such that for all $N$, you can find some $x > N$ with $|f'(x)| \geq a$.

*As $x \to \infty$, the graph of $f'$ becomes flatter and flatter.


In particular, the first bullet point says that the magnitude of the regions has to be decreasing to zero. However, the second point says are infinitely many regions that have height at least $a$, and the third point says that they become increasingly broader, which implies the areas must be diverging to $+\infty$, and thus we have a contradiction.
A: In fact, we can say something stronger: if $f(x)\to0$, and $f''$ is $bounded$ (a weaker condition then $f''\to0$), then $f'(x)\to0$. This proof just formalizes Hurkyl's argument.
Assume $|f''|\le B$ but $f'\not\to0$. Then for some $\epsilon>0$, there must exist a sequence $x_k\to\infty$ so that $|f'(x_k)|>\epsilon$. We must have $|f'(x)|>\frac{\epsilon}2$ on each interval $[x_k,x_k+\frac{\epsilon}{2B}]$, since $|f'(x_k)|>\epsilon$, and $f'$ changes by at most $\left|\int_{x_k}^{x_k+\epsilon/(2B)}f''(t)\,dt\right|\le\int_{x_k}^{x_k+\epsilon/(2B)}B\le\frac{\epsilon}2$ on this interval. In particular, $f'$ is either uniformly positive or negative on these intervals. Thus, we have
$$
|f(x_k+\epsilon/(2B))-f(x_k)|=\left|\int_{x_k}^{x_k+\epsilon/(2B)}f'(t)\,dt\right|
=\int_{x_k}^{x_k+\epsilon/(2B)}|f'(t)|\,dt\ge \frac{\epsilon}{2B}\cdot\frac{\epsilon}2
$$
The middle equality holds since $f'$ has the same sign on the interval it's being integrated over.
This shows that for all $N$, there is a pair of points, $x_k,x_k+\frac{\epsilon}{2B}$ greater than $N$ where $f(x_k)$ and $f\left(x_k+\frac{\epsilon}{2B}\right)$ are at least $\frac{\epsilon^2}{4B}$ apart, so we can't have $f(x)\to0$. Thus, we must have $f''$ bounded and $f\to0$ implies $f'\to0$.
