# Showing the existence of a continuous, strictly increasing function $f$ on $\mathbb{R}$ such that $f'(x) = 0$ almost everywhere

Problem: Show that there exists a continuous strictly increasing function $f$ on $\mathbb{R}$ such that $f'(x) = 0$ almost everywhere.

Attempt:

Perhaps we could modify the Cantor Function which is non-decreasing, continuous, and constant on each interval in the complement of the Cantor Set in $[0,1]$.

Of course, we'd need to do the following:

1. Make the Cantor function strictly increasing (since the Cantor Function is constant on certain intervals, it's certainly not strictly increasing as is).

2. Extend our modified Cantor Function from $[0,1]$ to all of $\mathbb{R}$.

3. Verify that $f'(x) = 0$ for all irrational $x$ (or for all but a countable subset of $\mathbb{R}$).

• For 3. Uncountable is not good enough. Even uncountable and dense is not enough – David Peterson Apr 26 '14 at 19:54
• True -- I modified my post accordingly. – user1770201 Apr 26 '14 at 19:57
• This provides one construction. – David Mitra Apr 26 '14 at 20:07

Aside. Your item 3 sets an unattainable goal. If a continuous function $f$ satisfies $f'=0$ for all but countably many points of $\mathbb R$, then $f$ is a constant function. See Set of zeroes of the derivative of a pathological function.

Here is a more explicit construction than in the post link in comments. Fix $r\in (0,1/2)$. Let $f_0(x)=x$. Inductively define $f_{n+1}$ so that

1. $f_{n+1} (x) = f_n(x)$ when $x\in 2^{-n}\mathbb Z$
2. If $x\in 2^{-n}\mathbb Z$, let $f_{n+1}(x+2^{-n-1}) = r f_n(x) + (1-r) f_n(x+2^{-n})$.
3. Now that $f_{n+1}$ has been defined on $2^{-n-1}\mathbb Z$, extend it to $\mathbb R$ by linear interpolation.
4. Let $f=\lim f_n$.

Here is a piece of this function with $r=1/4$:

and for clarity, here is the family $f_0$,$f_1$,... shown together. All the construction does is replace each line segment of previous step with two; sort of like von Koch snowflake, but less pointy. (It's a monotonic version of the blancmange curve).

To check that the properties hold, you can proceed as follows:

1. Since $\sup|f_{n+1}-f_{n}| \le 2^{-n}$, it follows that $f_n$ is a uniformly convergent sequence. So the limit is continuous.
2. The values of $f$ at every dyadic grid $2^{-n} \mathbb Z$ are strictly increasing, by direct inspection. Since $f$ eventually stabilizes at dyadic rationals, it is strictly increasing.
3. Being increasing, $f$ is differentiable almost everywhere. Let $x$ be a point of differentiability (note that $x$ is not a dyadic rational). Then $$f'(x) = \lim_{n\to\infty} 2^{n} (f_n(x_n+2^{-n})-f_n(x_n)) \tag{1}$$ where $x_n\in 2^{-n}\mathbb Z$ is such that $x\in (x_n,x_n+2^{-n})$. The expression inside the limit in (1) is a product of the form $r^{i}(1-r)^j$ where $i+j=n$. More precisely, $i$ and $j$ are the numbers of $1$s and $0$s in the first $n$ digits of the binary expansion of the fractional part of $x$. It follows that $f'(x)=0$ unless $x$ has a lot more $0$s than $1$s in the binary expansion; but the number of such points $x$ has zero measure.

(It may be more enjoyable to prove part 3 using the Law of Large Numbers from probability.)