If $f$ is differentiable on $[a,b]$, then it is also Lipschitz on it. He guys, I am trying to show that a differentiable function defined on a closed interval is also Lipschitz on it. I managed to weave the below proof, but I have a feeling that it may be just a tad too general for this purpose:
Theorem. If $f$ is differentiable on $[a,b]$, then it is also Lipschitz on it.
Recall that $f:A\to\mathbb{R}$ is Lipschitz on $A$ if there exists an $M>0$ such that$$\left|\frac{f(x)-f(y)}{x-y}\right|\leq M$$for all $x,y\in A$.
Proof. Let $f$ be differentiable on $[a,b]$. Because $f$ is continuous and $[a,b]$ is compact, by the Extreme Value Theorem, it follows that $f$ attains a maximum value $M$. Moreover, since $f$ is differentiable on $[a,b]$,$$f'(y)=\lim_{x\to y}\left|\frac{f(x)-f(y)}{x-y}\right|\leq M,$$for all $x,y\in[a,b]$, as required. $\square$
What do you guys think?
Edit: What if we were to add that $f'$ is also continuous on $[a,b]$?

You need to make the slightly stronger assumption that $f$ is $C^1$ or continuously differentiable on $[a,b]$, in order to avoid counterexamples like Norbert's. In this case, we have that $f'(x)$ attains a maximum $M$ on $[a,b]$, and if $$\left|\frac{f(x)-f(y)}{x-y}\right|>M$$ for some $x,y\in [a,b]$ then by the mean value theorem we would have some $z\in (a,b)$ such that $f'(z)>M$, a contradiction, hence $f$ is Lipshitz.
