Limit of uniformly continuous functions with convergent improper integrals. I am struggling with the proof of the following theorem:
Let $f(x)$ be uniformly continuous in $[a, \infty)$ s.t. the integral $\int_a^{\infty} f(x)dx$ converges. prove that $\lim_{x \to \infty} f(x) = 0$.
I came to the conclusion that it is enough to prove that $\lim_{x \to \infty} f(x)$ exists, and from there I have a proof that the limit is $0$.
I tried to use Cauchy's equivalent definition for the convergence of the improper integral + his definition for a regular limit at $x \to \infty$ with no success...
I will be happy to get hints as for how I should proceed, not proofs, since I really want to crack this one by myself, only I spent a pretty long time with no success.
Thank you :)

Hint: The requirement of uniform continuity is precisely there so that you don't have to worry about the existence of a limit. The following statement is true as well:
Let $ f : [a, \infty) \to \mathbb R $ be a continuous map such that $ \lim_{x \to \infty} f(x) = L \neq 0 $ exists. Then, the integral
$$ \int_a^{\infty} f(x)\, dx $$
diverges.
Try to think of an example where your weaker statement fails with a continuous function that is not uniformly continuous. How does uniform continuity remedy the problem?
