I recently ran into this interesting exercise:
Define$$h(x)=|x|$$on the interval $[-1,1]$ and extend the definition of $h$ on all of $\mathbb{R}$ by requiring that $h(x+2)=h(x)$. The result is a periodic "saw tooth" function.
Now, define$$g(x)=\sum_{n=0}^{\infty}\frac{1}{2^n}h(2^nx).$$Consider the sequence $x_m=1/2^m$, where $m\in\mathbb{N}\cup\{0\}$. Show that$$\frac{g(x_m)-g(0)}{x_m-0}=m+1$$and use this to prove that $g'(0)$ does not exist.
I solved this the following way:$$g(x_m)=\sum_{n=0}^{\infty}\frac{1}{2^n}h\left(\frac{2^n}{2^m}\right)=\frac{1}{2^m}(m+1),$$$$\frac{g(x_m)-g(0)}{x_m-0}=\frac{1/2^m(m+1)}{1/2^m}=m+1,$$$$g'(0)=\lim_{m\to\infty}\frac{g(x_m)-g(0)}{x_m-0}=\lim_{m\to\infty}m+1=\infty.$$Therefore, the equality holds, and $g'(0)$ does not exist.
I also extended the above 'proof' to how that neither $g'(1)$ nor $g'(1/2)$ exist. However, I now want to show that if $x=p/2^k$, where $p\in\mathbb{Z}$ and $k\in\mathbb{N}\cup\{0\}$, then $g'(x)$ does not exist, but I am running into the problem where I am having to consider lots of cases, such as when $k
Edit 1: I have not been able to progress any further than showing that the summation boils down to$$g(x)=\sum_{n=0}^{k}\frac{1}{2^n}h\left(\frac{2^n}{2^k}p\right).$$