$\int_a^\infty f(x) \, dx$ converges $\Rightarrow$ $\lim_{x\to \infty}f(x)=0$ $\int_a^\infty f(x) \, dx$ converges $\Rightarrow$ $\lim_{x\to \infty}f(x)=0$.
Give a proof or counterexample.(Assume $f(x)$ positive and continuous.)
I can show that $\int_R^{R'}f(x)\,dx \approx 0$ for $R,R'$ large. $f(c)(R'-R) \approx 0$ for some $c \in (R,R')$ by mean value theorem. Then I don't know how to prove.  

Construct a piecewise-linear function $f$ such that around every positive integer $n$ the function describes an isosceles triangle with height $1$ and base length of $\frac{1}{2^n}$.   
Clearly $\lim_{x\rightarrow \infty} f(x) \nrightarrow 0$, however the integral $\int_0^\infty f(x)dx$ is the sum of the areas of the triangles:  $$\int_0^\infty f(x)d = \sum_{n=1}^\infty {\frac{1}{2}\cdot 1 \cdot \frac{1}{2^n}} = \frac{1}{2} \sum_{n=1}^\infty {\frac{1}{2^n}} = \frac{1}{2}$$
