Let $f$ be uniformly continuous and (Lebesgue) integrable on $\mathbb{R}$. Show that $\lim_{x \to \infty} f = 0$.
I am aware this exercise has been posted numerous times on math.stackexchange. However, my solution seems different than the ones posted and I am not fully confident in it. Any feedback/critique would be highly appreciated.
Proof
The general plan is to first show that if the limit does exist, then it must be 0. Then, we use uniform continuity to show that the limit does exist.
We immediately rule out the case of $\lim_{x \to \infty} f = \pm\infty$ for that would obviously contradict integrability. Next, we show that $\lim_{x \to \infty} f \ne L$, where $L > 0$. On the contrary, suppose the limit equals $L$. Then, $\exists a \in \mathbb{R}$ such that $f(x) > \frac{L}{2}$ whenever $x \geq a$. As a consequence: $$\int_{a}^{\infty}f(x)dx > \int_{a}^{\infty}\frac{L}{2}dx$$ But we notice here that the integral on the left is bounded below by an integral that diverges. This contradicts that $f$ is integrable. Thus, $\lim_{x \to \infty} f \ne L$.
Next, we quickly show that $\lim_{x \to \infty} f \ne -L$. Suppose it does. Then, $\exists c \in \mathbb{R}$ such that $f(x) < -\frac{L}{2}$ whenever $x \geq c$. But then, by taking absolute values on both sides, we see that $|f(x)| > \frac{L}{2}$ for $x \geq c$. Now the argument made previously implies that this would contradict integrability of $f$. Thus, if the limit exists, it must be 0.
Yet again, by way of contradiction, suppose the limit does not exist. Then, $\exists \epsilon > 0 \space \forall N, \space x > N \Rightarrow |f(x) - L| \geq \epsilon$. Choose this special epsilon and by uniform continuity we know $\exists \delta > 0, \space \forall x,y \space |x - y| < \delta \Rightarrow |f(x) - f(y)| < \epsilon$. For an arbitrary $N$ choose $x, y > N$ so that $|x - y| < \delta \Rightarrow \epsilon > |f(x) - f(y)| = |f(x) - L + L - f(y)| \leq |f(x) - L| + |f(y) - L| \geq \epsilon + \epsilon = 2\epsilon$. So we have that $\epsilon \geq 2 \epsilon$, a contradiction. Thus the limit exists, and by the remarks earlier it must be 0.
This needs a bit of cleaning up but you are close.
Firstly, you need another "there exists" before $x$.
And also remember that you've shown that $L$ would have to be zero.
Now: the trick is to pick a sequence of '$N$'s going to infinity.
So you can say: "If $f(x)$ doesn't converge as $x \to \infty$, then there is an $\epsilon > 0$ such that for any $N \geq 1$ there exists $x_N > N$ with $|f(x_N)| > \epsilon$. Thus there is $x_N \to \infty$ with $|f(x_N)| > \epsilon > 0$.
Then you want to say "By uniform continuity we know that there is a $\delta > 0$ such that for any $N$ and every $y$ with $|y - x| < \delta$, we have $|f(y) - f(x)| < \epsilon/2$". Why did I choose $\epsilon/2$? Can you finish it from here?