Can we infer $\lim\limits_{x \to +\infty}f(x)=0$? Assume that $f(x)$ is continuous over $[a,+\infty)$ where $a>0$, and $\displaystyle\int_{a}^{+\infty}\dfrac{f(x)}{x}{\rm d}x$ is convergent. Can we infer that $\lim\limits_{x \to +\infty}f(x)=0$? If not, what conditions else are needed?
 A: The limit as $x\to\infty$ may not exist at all for $f(x)$; consider $f(x)=x\sin(x^2)$. Then $$\int_a^\infty \frac{f(x)}{x}\,dx$$ is convergent (see Fresnel integrals on wikipedia), but $f(x)$ oscillates so has no limit.
At each $n\in\mathbb N$, place a triangle of height $1$ and width $1/n^2$. The base need not rest on the $x$-axis; indeed, the base could be placed $\frac{1}{n^2}$ above the $x$-axis. Now just connect the endpoints of the triangles by straight lines. This guarantees that $f(x)>0$ for all $x>0$ and that $\lim_{x\to\infty}f(x)$ does not exist.
To force the limit of $f(x)$ to be $0$, requiring that $f(x)$ is monotone suffices.
A: An example where $f$ is non-negative but $f(x)$ does  not tend to is obtained as follows: let $f(x)=n^{2}(n+\frac 1 {n^{2}}-x)$ for $x \in  (n,n+\frac 1 {n^{2}})$,$f(x)=n^{2}(x-n+\frac 1 {n^{2}})$ for $x \in  (n-\frac 1 {n^{2}},n)$, $n=2,3,...$  and $0$ elsewhere. 
A: Let $f>0$ with $\lim\limits_{x \to +\infty} f(x)=b > 0$. Then we have that $\exists y$ so that $\forall x \geqslant y$ we have that
$$\frac{b}{2} \leqslant f(x) \leqslant \frac{3b}{2}$$
We have that
$$\int_a^{+\infty} f =\int_a^y f + \int_y^{+\infty} f$$
The first integral has a finite value, so we need to take a look at the second one only. But on that interval, we have that
$$\frac{f(x)}{x} \geqslant \frac{b}{2x}$$
And the integral of the RHS is divergent, which would imply that the original integral is divergent as well, which is a contradiction. So $f$ cannot have a positive limit, which means that it's either $0$ or does not exist. Which means that we need to assume the existence of $\lim\limits_{x \to +\infty} f(x)$ as well.
