TITLE: Does the derivative of a differentiable function have to be Lebesgue integrable in some interval?
QUESTION [8 upvotes]: I know that the derivative of a differentiable function doesn't have to be continuous.  How discontinuous can a derivative be?.
Inspired by Limits and continuity of a derivative, I was thinking of defining the notion of pseudo-continuous: $f:(a,b) \to \mathbb R$ is pseudo-continuous at $x \in (a,b)$ if
$$ f(x) = \lim_{y\to x} \frac1{y-x} \int_x^y f(t) \, dt .$$
And then I wanted to show that a function is the derivative of a differentiable function if and only if it is pseudo-continuous.
But then I realized that the derivative doesn't have to be Lebesgue integrable, for example
$$ f(x) = \frac x{\log|x|} \sin\left(\frac1x\right) , \quad x \in (-\tfrac12,\tfrac12) ,$$
or
$$ f(x) = x^2 \sin\left(\frac1{x^2}\right)  ,$$
Does there exist a differentiable function $f:(0,1) \to \mathbb R$ such that its derivative restricted to any subinterval of $(0,1)$ fails to be in $L^1$?

REPLY [2 votes]: The derivative is the (pointwise) limit of a sequence of continuous functions, e.g.
$$g_n(x) = \frac{f(x + h_n(x)) - f(x)}{h_n(x)}$$
where we can take $h_n(x) = \frac{1}{n+1}$ if $b = +\infty$, and if $b < +\infty$ we can take $h_n(x) = \frac{b-x}{n+1}$. It follows that the family $\{ \lvert g_n\rvert :  \in \mathbb{N}\setminus \{0\}\}$ is pointwise bounded.
Take an arbitrary nonempty interval $(u,v) \subset (a,b)$. For each $k \in \mathbb{N}$ the set
$$A_k = \bigl\{ x \in (u,v) : \lvert g_n(x)\rvert\leqslant k \text{ for all } n\bigr\}$$
is relatively closed, and since the family is poinwise bounded we have
$$(u,v) = \bigcup_{k \in \mathbb{N}} A_k\,.$$
Furthermore, $(u,v)$ is a Baire space (it's completely metrisable), hence there is a $k \in \mathbb{N}$ such that
$$V = \operatorname{int} A_k \neq \varnothing\,.$$
Then $\lvert f'(x)\rvert \leqslant k$ for all $x \in V$
Thus every nonempty open interval in $(a,b)$ contains a nonempty open interval on which $f'$ is bounded. This means the set of points $x$ such that $f'$ is Lebesgue integrable on some neighbourhood of $x$ is a dense open subset of $(a,b)$, hence topologically very large.
However, the measure of this set would be the more important type of size. I don't know whether it can be arbitrarily small (of course it's nonzero), but I suspect it can.