If $f$ is continuously differentiable on $[a,b]$, then show that for all $x,y\in(a,b)$ using the definition of derivative $$ |f(x)-f(y)|\leq|x-y|\sup_{x\in[a,b]}|f'(x)| $$
My attempt: Since $f'$ is continuous on $[a,b]$, it is bounded so there is $M>0$ such that $|f'(y)|\leq M$ for all $y\in[a,b]$. On the other hand, the extreme value theorem implies that $\sup_{y\in[a,b]}|f'(y)|$ exists so we can have $|f'(y)|\leq\sup_{y\in[a,b]}|f'(y)|$ for all $y\in[a,b]$. Since $f$ is differentiable at $y$ by the definition of derivative I have $$ f'(y)=\lim_{x\to y}\frac{f(x)-f(y)}{x-y} $$ By using the precise definition of limit and some manipulations I get: for $\epsilon=1$ there exists $\delta>0$ such that $$ 0<|x-y|<\delta\Longrightarrow|f(x)-f(y)|\leq(1+|f'(y)|)|x-y| $$ But because of $|f'(y)|\leq\sup_{y\in[a,b]}|f'(y)|$ for all $y\in[a,b]$, I get $$ 0<|x-y|<\delta\Longrightarrow|f(x)-f(y)|\leq\left(1+\sup_{y\in[a,b]}|f'(y)|\right) |x-y| $$ which is different from what I was supposed to prove!