Uniformly continuous function $\rightarrow 0$ as $x\rightarrow\infty$ 
Possible Duplicate:
$f$ uniformly continuous and $\int_a^\infty f(x)\,dx$ converges imply $\lim_{x \to \infty} f(x) = 0$ 

Given that $f$ is uniformly continuous function on real and is integrable with respect to lebesgue measure, we need to show $f(x)\rightarrow 0$ as $x\rightarrow\infty$.
I have no clue for this problem, thank you for help.
 A: Expanding my comment into an answer, since the ones at the duplicate I found are comparatively hard to read.
Since $f$ can be rewritten as the difference of two nonnegative uniformly continuous functions, we can proceed by showing this holds for such functions $f\geq 0$.
The definition of uniform continuity says that for any $\epsilon>0$, there exists $\delta>0$ such that the entire graph can be covered with rectangles of width $2\delta$ and height $2\epsilon$, placed end to end.
Suppose $f(x)$ did not converge to zero on the right. Then there exists a $k>0$ such that $f(x)$ jumps above $k$ infinitely many times. Set $\epsilon=k/4$ and find the associated $\delta$. By this choice of $\epsilon$, there will always be a box of width $2\delta$ and height at least $k/2$ fully under the curve at each point where $f(x)$ goes above $k$.
Such boxes have area at least $\delta k$, and since there are infintely many of them under the curve, this would contradict Lebesgue integrability. Hence, $f$ tends to zero on the right.
A: Suppose that $f(x) \not \to 0$ as $x \to \infty$. This means that:
$$
\exists \epsilon > 0 : \forall M > 0, \exists x > M : x > M \implies \left|f(x)\right| > \epsilon 
$$
Since $f$ is uniformly continuous, for this $\epsilon$ there is $\delta > 0$ satisfying:
$$
\forall x, y > 0 : |x - y| < \delta \implies \left|f(x) - f(y)\right| < \epsilon/2
$$
Putting the two together, we find that:
$$
\forall M > 0 : \exists x > M : y \in (x -\delta, x +\delta) \implies f(y) > \epsilon /2
$$
Thus:
$$
\int_{x-\delta}^{x+\delta} \left|f(y)\right| \,dy \ge \dfrac{\delta \epsilon}{2}
$$
This process can be repeated as many times as we like. We start by finding $x_0 > 1$. Next, we find $x_1 > x_0 + 2\delta$. And we continue by finding $x_n > x_{n-1} + 2\delta$. None of the intervals $(x_n - \delta, x_n + \delta)$ overlap. Thus:
$$
\int_0^\infty \left|f(y)\right| \,dy \ge \dfrac{\delta \epsilon n}{2} \quad \forall n \in \mathbb{N}, n > 0
$$
We conclude that $f$ is not Lebesgue integrable.
