TITLE: If $f$ is continuous and piecewise $C^1$ and $f'$ is bounded a.e., is $f$ Lipschitz?
QUESTION [8 upvotes]: If $f$ is continuous and piecewise $C^1$ on $\mathbb{R}$ (only a finite number of pieces) and $f'$ is bounded a.e., is $f$ globally Lipschitz?
So $f$ is only not differentiable in a finite number of places.
If $f$ is absolutely continuous then it is Lipschitz but I don't see it.

REPLY [10 votes]: Yes.
Suppose $|f'|\leq L$ almost everywhere.
Take any two points $a,b\in\mathbb R$ so that $a<b$ and let $x_1<x_2<\dots<x_n$ be the points where $f'$ may fail to be continuous.
Then, using the fundamental theorem of calculus on each interval separately, we get
$$
\begin{split}
|f(b)-f(a)|
&\leq
|f(b)-f(x_n)|+|f(x_n)-f(x_{n-1})|+\dots+|f(x_1)-f(a)|
\\&=
\left|\int_{x_n}^bf'(x)dx\right|+\dots+\left|\int_a^{x_n}f'(x)dx\right|
\\&\leq
\int_{x_n}^b|f'(x)|dx+\dots+\int_a^{x_n}|f'(x)|dx
\\&\leq
L(b-a).
\end{split}
$$
Therefore $f$ is Lipschitz with Lipschitz constant $L$.
In fact, $f:\mathbb R\to\mathbb R$ is Lipschitz if and only if it has a weak derivative and the weak derivative is in $L^\infty$.
In your case we don't have to rely on such heavy weaponry, but I wanted to let you know that Lipschitz functions can be characterized as functions having a bounded derivative in a suitable sense.