Suppose $K \subset \mathbb{R}^n$ is a compact set and $f:K \rightarrow \mathbb{R}$ is continuous. Let $\epsilon >0$ be given. Prove that there exists a positive number $M$ such that for all $x$ and $y$ in $K$ one has the inequality:
$|f(x)-f(y)| \leq M||x-y||+\epsilon$. Then given a counter-example to show that the inequality is not general true if one take $\epsilon =0$.
My attempt: Since $K$ is a compact set and $f:K \rightarrow R$ is a continuous function. This implies $f$ is a uniformly continuous function.
Let $\epsilon =1>0$, there is a $\delta>0$ such that if $x,y \in K$ and $||x-y||<\delta$. Then $|f(x)-f(y)| \leq 1$.
Now, choose $n$, such that $n\delta \leq ||x-y|| \leq (n+1) \delta$. Then,
$|f(x)-f(y)|\leq |f(x)-f(x+\delta)| +|f(x+\delta)-f(x+2\delta)| +|f(x+2\delta)-f(x+3\delta)|+......+|f(x+n\delta)-f(y)|\leq n+1.$
This implies $|f(x)-f(y)|\leq \frac{||x-y||}{\delta}+1$.
Assume that $M=\frac{1}{\delta}$, and we choose $\epsilon =1$., then $|f(x)-f(y)|\leq M||x-y||+\epsilon$.
Is this proof is correct?
Let me bring my view for easy case and sorry for little off top - it is not exactly sentence above, but may be interesting. I can put it in comments, if it will be more good, but there is hard to type formulas and is limitation on length.
Suppose $E=[a, +\infty)$ and $f:E \rightarrow \mathbb{R}$ is uniformly continuous. Then exists $M$ and $d$ such, that for $\forall x,y \in E$ will be $\left| f(x)-f(y) \right| \leqslant M \left| x-y \right|+d$
If desire is put forward I can bring my proof.