Prove that if f(x) is continuous and absolutely integrable on $[a,\infty)$ then $\lim\limits_{x\to\infty}f(x)=0$.
I tried proving it in the following way: First we need to prove the existence of the border. Let $\epsilon>0$. since f is continuous exists $\delta>0$ s.t $\forall x_0\in[a,\infty)$ if $|x-x_0|<\delta,|f(x)-f(x_0)|<\epsilon$. We need to find $S>0$ s.t $\forall x>S ||f(x)|<\epsilon$. Can we take $S=\delta+x_0$ (I hesitate since it mustn't shouldn't depand on $x_0$). After that if without loss of generality $\lim\limits_{x\to\infty}f(x)=L>0$, it follows $|f(x)|>L>0$ and by integrating both sides it follows the integral diverges in contradiction to the details and we finished.
Am I right? Which S should I take?