I state the exercise:
Given $f: [0, + \infty) \rightarrow R$, f continuous.
Prove that if $\lim_{x \rightarrow \infty} f(x) = \lambda$, where $\lambda \in R$ then $f$ is uniformly continuous.
My solution:
I know that for an $M > 0$ we have that $\forall{x} > M \implies |f(x) - \lambda|< \epsilon/2$.
Now any $x_1, x_2 \in [0, +\infty)$ can lie either both in $[0,M]$ or both in $(M, \infty)$ or one in each of the aforementioned intervals.
In the first case we can invoke the Heine-cantor theorem that proves the function is uniformly continuous.
In the second case we have that $|f(x_1) - \lambda| < \epsilon/2$ and $|f(x_2) - \lambda| < \epsilon/2$ this implies that $|f(x_1) - f(x_2) | < \epsilon$ by a case by case analisis.
In addition we can reduce the third case to the first case by choosing $M_1 = \max \{x_1, x_2 \} + 1$, because $\forall{x} >M_1 > M$ we still have the implication needed for the second case, i.e., that $|f(x) - \lambda|< \epsilon/2$.
I have a different solution to the third case but was wondering if this would suffice? In any case, is my solution correct? any other ways of doing this? points where I need to be preciser?
PS: Ah I had a doubt during the exercise that I was never explicitly finding the $\delta > 0$ s.t. $|x_1 - x_2| < \delta \implies |f(x_1) - f(x_2) | < \epsilon$. I think in the second case any $\delta$ would do, correct?