TITLE: Find f ae-differentiable with $f´\in L^1(0,1)$ but not in $BV$...
QUESTION [5 upvotes]: Here is a natural question which I didn't find in Measure Theory books:
Construct a continuous function $f(x)$ in $[0,1]$ with derivative at ae $x\in(0,1)$, and so that $f'(x)\in L^1(0,1)$, but such that $f$ is not of bounded variation.
The motivation would be the following: A well-known sufficient condition for absolute continuity asserts that 
if $f$ is continuous, $f'(x)$ exists for all $x\in(0,1)$ except a countable set, and $f'(x)\in L^1(0,1)$, then $f$ is absolutely continuous (hence $f\in BV$).
In this theorem, "countable set" cannot be replaced by "null set", as the Cantor staircase shows. Is this also the case if we just want $f\in BV(0,1)$?
Some observations about temptative constructions:
(i) Cantor staicases alone would not work, since they are increasing, hence $BV$...
(ii) Volterra type constructions, which fill the complement of a Cantor set with
 blocks $x^a \sin(x^{-b})$ are not good either. For the derivatives of these blocks to be in $L^1$ one needs $a>b$, but then blocks are in $BV$, and probably also the resulting function...
Are there other natural examples to test with?

REPLY [3 votes]: I just came out with a counterexample.
One produces a function similar to $x\sin(1/x)$ (which is not in $BV$),
but with the oscillating blocks made of Cantor staircases (hence continuous and with $f'(x)=0$ ae).
Here are the details:
Call $h(x)$ the usual Cantor staircase, ie $h:[0,1]\to[0,1]$, continuous, increasing, onto and with $h'(x)=0$ at almost every $x\in(0,1)$.
Next, dilate this function to  $h_n:[\frac1{n+1},\frac1n]\to [0,\frac1n]$
by
$$ h_n(x)= \frac1n h\Big(\frac{x-\frac1{n+1}}{\frac1n-\frac1{n+1}}\Big),\quad \mbox{if $n$ odd}$$
or 
$$ h_n(x)= \frac1n h\Big(1-\frac{x-\frac1{n+1}}{\frac1n-\frac1{n+1}}\Big),\quad \mbox{if $n$ even.}$$
Finally, define $f(x)=h_n(x)$ if $x\in [\frac1{n+1},\frac1n]$ and $f(0)=0$.
It is straightforward to verify that $f\in C[0,1]$ and $f'(x)=0$ a.e. $x\in(0,1)$.
Finally, $f\not\in BV[0,1]$ since 
$$\sum_{n=1}^{2N}\big|f(\frac1n)-f(\frac1{n+1})\big|=\sum_{n=1}^N\frac1{2n+1}\to\infty,\quad \mbox{as }N\to\infty.$$