Let $f:[a.b] \rightarrow \mathbb{R}$ a function that satisfies $|f(u)-f(v)|\leq |u-v|$ $\forall u,v \in \mathbb{R}$. Prove that f is continouos for $a < c < b$.
My attempt:
For a function to be continuous, then $\forall \epsilon>0 \exists\delta$ such that $|x-c|<\delta \Rightarrow |f(x)-f(c)|<\epsilon$.
If $\delta=\epsilon$ such that, $|x-c|<\delta=\epsilon \Rightarrow |f(x)-f(c)|\leq |x-c|<\epsilon$, then $|f(x)-f(c)|<\epsilon$. So $f$ is continouos.
Am I correct? or there is a better way to prove it.
It is exactly as this.
Note that your "assumed condition" is what goes under the name of “ $f$ is Lipschitz continuous with Lipschitz constant $1$", and if you want to dig deeper you can show that any Lipschitz function is indeed continuous.
Indeed $f:\mathbb{R} \rightarrow \mathbb{R}$ is said to be Lipschitz continuous if there exists a non-negative real number $K>0$, called Lipschitz constant, such that $$|f(x) - f(y)| \le K|x-y|$$ for all $x,y \in \mathbb{R}$.
As a simple exercise try to show every Lipschitz continuous function is continuous (hint: what is the right $\delta$?).