# Points of differentiability of a function

Let $h : \mathbb{R} \to \mathbb{R}$ be defined by: $$h(t) = \sum_{r(k) < t} \left(\frac{1}{2}\right)^{k},$$ Where $\{r(1) , r(2),\dots\}$ is an enumeration of rational numbers.

Find the points of differentiability of $h$ .

I have found that it is a subset of $\mathbb{R}\setminus\mathbb{Q}$ , but cannot proceed further .

-

The set of differentiability will depend on the enumeration. Indeed, we can make $h$ differentiable at a given irrational point $\alpha$ by ensuring that $$|r(k)-\alpha|\ge \frac{1}{k} \quad \text{ for all }k$$ This requirement slightly restricts our choice of $r(k)$ but still allows for enumeration of all rationals. To see that $h'(\alpha)=0$, notice that $h(\alpha+1/k)-h(\alpha)\le \sum_{j=k}^\infty 2^{-j}=2^{1-k}$ is much smaller than $1/k$, and similarly for $h(\alpha)-h(\alpha-1/k)$.
On the other hand, we can also make $h$ non-differentiable at a given irrational point $\alpha$ by choosing $|r(k)-\alpha|<4^{-k}$ when $k$ is even, and using the odd indices to enumerate the rest of rationals. With this enumeration $h(\alpha+4^{-k})-h(\alpha)>2^{-k}$, which is much larger than $4^{-k}$. Hence $\limsup_{x\to \alpha}\frac{h(x)-h(\alpha)}{x-\alpha}=\infty$.