Define $f:[0,1]\to [0,1]$ by $f(0)=0$, and $$f(x)=\sum\limits\_{r\_n\le x} 2^{ -n }$$ with $0\lt x\le 1$ where $[r\_n]\_{n\in \mathbb{Z^+} } = \mathbb{ Q} \cap (0,1) $.


How to show that the derivative $f'(x)=0$ a.e.?


I can show this function is increasing and discontinuous at every rational, and how to word on?



Showing the derivative of this function is equal to $0$ a.e
The function $f(x)$ is $\mu([0,x])$ where $\mu$ is the radon measure $\sum\_{n\in\mathbb{Z} \_ +} 2^{-n}\delta \_ {q\_n}$, and $\mu$ is singular w.r.to the Lebesgue measure $\lambda$ (in fact, $\operatorname{supp}(\mu)=(0,1)\cap\mathbb{Q}$). So the absolutely continuous part $\mu ^ a$ w.r.to $\lambda$ is zero, and the Radon-Nikodym derivative $d\mu ^ a/d \lambda$ is also zero; but this coincides a.e. with the derivative of $f$.
Note that (depending on the particular chosen enumeration of $(0,1)\cap\mathbb{Q}$) there might be infinitely many irrational points $x$ where $f$ is continuous and derivable with any value of $f'(x)$; a Lebesgue null set though.


**edit**. A more elementary argument. Consider the nested family of open nbd's of $(0,1)\cap\mathbb{Q},$


$$A\_\epsilon:=\cup\_{n\in\mathbb{Z} \_ + } (r\_n- \epsilon 2^{-n/3},r\_n+ \epsilon 2^{-n/3}), \qquad \epsilon > 0.$$
So $|A \_\epsilon|=O(\epsilon)$ and $A:=\cap \_ {\epsilon > 0} A \_ \epsilon$ has measure zero. Let $x \in (0,1) \setminus A$: There exists $\epsilon > 0$ such that for any $n\in\mathbb{Z} \_ +$ there holds $ \epsilon 2^{-n/3}\le |x-r \_ n|$. Thus, for any $y\in (0,1)$ 


\begin{align\*}
|f(x)-f(y)| &\le \sum\_{|x- r \_ n|\le|x- y| } 2^{-n}\\
&= \frac{1}{\epsilon^2}\sum\_{|x- r \_ n|\le|x- y| } 2^{-n/3}(\epsilon 2^{-n/3})^2\\
&\le \frac{1}{\epsilon^2}\bigg(\sum\_{n=1}^\infty 2^{-n/3}\bigg)|x-y|^2\\
&= \frac{|x-y|^2}{\epsilon^2(2^{1/3}-1))}
\end{align\*} showing that $f'(x)=0.$


