# Derivative zero almost everywhere but not bounded variation function

This question comes from my class. The instructor asks if there is a bounded function defined on $[0,1]$ whose derivative is $0$ almost everywhere (in the Lebesgue sense) but does not have bounded variation.

The example he gives is the limit of the following sequence.

Consider the Cantor-Lebesgue function $f(x)$ defined on $[0,1]$ with $f(0)=0$ and $f(1)=1$. This function is increasing and has total variation $1$ on $[0,1]$ and has derivative $0$ almost everywhere.

Now we squeeze the function to the left and each time we add another copy.

Let $f_2(x) = f(2x)$ if $x\in[0,\frac{1}{2}]$ and $f_2(x) = f(2(x-\frac{1}{2}))$ if $x\in(\frac{1}{2},1]$. Then $f_2$ still has derivative $0$ almost everywhere but its variation increase to $2$.

Let $f_3(x) = f(3x)$ if $x\in [0,\frac{1}{3}]$, $f_3(x)=f(3(x-\frac{1}{3}))$ if $x\in(\frac{1}{3},\frac{2}{3}]$ and $f_3(x)=f(3(x-\frac{2}{3}))$ if $x\in (\frac{2}{3},1]$. Then the function still has derivative $0$ almost everywhere but its total variation increases to $3$.

Keep doing this process, For each $i =0,1,\dots,n-1$, $f_n(x) = f(n(x-\frac{i}{n}))$ if $x\in[\frac{i}{n},\frac{i+1}{n})$.

Then each $f_n$ has derivative $0$ but total variation $n$. So if the limit exists, we would expect it to have derivative $0$ almost everywhere but unbounded variation.

But I did not see a way to argue such limit do exist (I feel it diverges at each point...) and even if it exists, the zero derivatives almost everywhere and unbounded variation seem to be hard to argue.

I would like to see if the above serves as an example to the claim that there is a bounded function on $[0,1]$ with derivative $0$ almost everywhere but unbounded total variation. It would be more helpful if one can give me another (simpler?) example or whether the claim is true or false.

• @LeeDavidChungLin Read the question again. Commented Oct 15, 2021 at 0:10

Consider the point $x = 1/2$. If $n$ is odd, then $x = 1/2$ lies in the middle of one of the copies of the Cantor-Lebesgue function, meaning that $f(x) = 1/2$. However, if $n$ is even then $x = 1/2$ lies at the end of one of the copies of the Cantor-Lebesgue function, meaning that $f(1/2) = 1$, so the function doesn't converge pointwise at $x = 1/2$. You can show by similar reasoning that the function does not converge for any rational $x$ in the unit interval.

Because the rationals are dense in the unit interval, you wouldn't be able to define a derivative for $f$ at any irrational because the definition

$$f'(x) = \lim_{h \to 0} \frac{f(x + h) - f(x)}{h}$$

wouldn't make sense for any fixed irrational $x$ if we chose $h$ such that $x + h$ is rational because $f(x+ h)$ wouldn't be defined.

Try this for an example of a function that is unbounded variation but still has derivative zero almost everywhere:

Let $c(x)$ denote the cantor lebesgue function. Start with

$$f_1(x) = \begin{cases} c(2x) & x \in [0,1/2] \\ 0 & x \in (1/2, 1] \end{cases}$$ $$f_2(x) = \begin{cases} \frac{1}{2} c(4x) & x \in (1/2, 3/4] \\ 0 & \text{else} \end{cases}$$ $$f_3(x) = \begin{cases} \frac{1}{3} c(8x) & x \in (3/4, 7/8] \\ 0 & \text{else} \end{cases}$$

So that in general

$$f_n(x) = \begin{cases} \frac{1}{n} c(2^n x) & x \in (1 - 2^{1 - n}, 1 - 2^{1 - n} + 2^{-n}] \\ 0 & \text{else} \end{cases}$$

Essentially, I'm making copies of $c(x)$, shrinking them by $1/n$ and shifting them over in geometrically smaller intervals of width $2^{-n}$. Now define

$$g_n(x) = \sum_{k = 1}^n f_n(x)$$

Then what $g_n(x)$ represents is a growing collection of copies of $c(x)$ that decrease in size, and are placed at the points $\{2^{-n}\}$ on the unit interval. Can you imagine what this function looks like? Clearly each $g_n(x)$ is piecewise continuous. Moreover

$$\lim_{n \to \infty} g_n(x) = g(x)$$

and the convergence is uniform. And based on the construction, we have $g'(x) = 0$ almost everywhere because if we take any subinterval of the form

$$E = [0, r) \qquad r < 1$$

then

$$\exists n > 0 \;\; \text{s.t.} \;\; g\Big|_E (x) = g_n(x)$$

so that we prove $g'(x) = 0$ at least in all of $E$ (because each $g_n(x)$ has zero derivative almost everywhere), meaning that we can conclude $g'(x) = 0$ almost everywhere by taking $r \to 1$ (formally I would prove this by a proof by contradiction).

Finally if we let $V(f)$ denote the variation of a function, then it is clear that

$$V(g_n) = \sum_{k = 1}^n \frac{2}{n} = O(\log(n))$$

Moreover

$$\forall n \quad V(g) \geq V(g_n) \implies V(g) = \infty$$

so that the variation is not bounded.

EDIT: Changed $\sum \frac{1}{n}$ to $\sum \frac{2}{n}$ because I forgot that the function "jumps" down to zero at the end of each copy, thus doubling the variation.

• Nice Example. I guess there could be more reasoning for my example does not work. Though the example I give does not converge at all rational points but I can put them to be $0$. Would the modified function being still non-differentiable? I feel the function does not converge at almost every point. Commented Sep 24, 2016 at 3:18