Prove the uniformly continuity of a function with a certain property I need to prove this:
Suppose that $f: \mathbb{R} \to  \mathbb{R}$ is continuous and has the property that for each $\epsilon >0$ there is $M>0$ such that if $|x| \ge M$, then $|f(x)|< \epsilon$.Show that $f$ is uniformly continuous.
And I am stuck in how to find the $\delta$ that works no matter the point, I dont know how to use the propety and the continuity right to get the result.Thank you I am a little worry because I dont know how to attack this problems. 
 A: For any $\epsilon >0$, by assuming, there is $M>0$ such that  if $|x| \ge M$, then $|f(x)|<\frac \epsilon 2$. As we know, $f(x)$ is uniformaly continuous on the compact interval $[-M-1,M+1]$, so for the given $\epsilon$, there exists $\delta>0$, and $\delta<1$, such that for any $x_1, x_2 \in  [-M-1,M+1]$, when $|x_1-x_2|<\delta$, we have $|f(x_1)-f(x_2)|<\epsilon$.
If $|x_1-x_2|<\delta<1$, then there are following cases:


*

*$x_1, x_2 \in  [-M-1,M+1]$. It is obvious that $|f(x_1)-f(x_2)|< \epsilon $.

*$x_1, x_2 \notin  [-M-1,M+1]$. So $|x_1|, |x_2|\ge M$, and hence $|f(x_1)-f(x_2)|\le |f(x-1)|+|f(x_2)| \le \frac \epsilon 2+\frac \epsilon 2=\epsilon $.

*$x_1\in  [-M-1,M+1]$ and  $x_2 \notin  [-M-1,M+1]$. Since $\delta<1$,  $|x_1|, |x_2|\ge M$, and hence $|f(x_1)-f(x_2)|\le |f(x-1)|+|f(x_2)| \le \frac \epsilon 2+\frac \epsilon 2=\epsilon $.

*$x_2\in  [-M-1,M+1]$ and  $x_1 \notin  [-M-1,M+1]$. Since $\delta<1$,  $|x_1|, |x_2|\ge M$, and hence $|f(x_1)-f(x_2)|\le |f(x-1)|+|f(x_2)| \le \frac \epsilon 2+\frac \epsilon 2=\epsilon $.
May it helps!
