In another thread, I remarked that if $$\int_0^1 \vert f'(x)\vert\mathrm dx=0,$$ then $f'(x)=0$ for all $x\in(0,1)$ can only be concluded if $f'$ is continuous. This would certainly be correct if we were talking about a general integrable function $(0,1)\to\mathbb R$. Take the characteristic function of a singleton set as a counterexample where the integral vanishes, but the function doesn't. But such a function is not a valid derivative of any function, since it doesn't have the mean value property. And I couldn't find any functions where the integral of the absolute value vanishes and which have the mean value property. That's why I'm wondering:
Is there a differentiable function $f:(0,1)\to\mathbb R$ such that $f'$ is not identically $0$, but $$\int_0^1\vert f'(x)\vert\mathrm dx=0,$$ or equivalently, $f'$ is $0$ almost everywhere, but not everywhere.