# Beginning to Prove that (a Version of) Weierstrass' Function Is Nowhere Differentiable

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<n$, $k=n$, etc. which seems to be a rather unfeasible way. Do you guys have any ideas about a better approach? Thanks in advance!

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).$$

-

Start by arguing that you don't need to worry about the first $k+1$ terms of $g$, because the sum of those terms is linear on the interval $[x,x+\varepsilon]$ for some small finite $\varepsilon$. Therefore you can subtract that linear functions and only consider the remaining part $\sum_{n=k+1}^\infty$ of the series instead -- which can be tackled in the same way as $g(0)$, except starting at a larger $m$.
I see. :) But would the series $g(x)=\sum_{n=k+1}^{\infty}\frac{1}{2^n}h(\frac{2^n}{2^k}p)=0$ in that case? – EsX_Raptor Mar 21 '12 at 19:40
I hope so -- the point of ignoring the first $k+1$ terms is to make the value of the resulting series be $0$ at $x$ and grow in the same way just to the right of $x$ as it does just to the right of $0$. I'm not quite sure that $k+1$ is exactly the right number of terms to drop, though; it's my intuitive guess, but you'll have to do the algebra to check if I've made a fencepost error... – Henning Makholm Mar 21 '12 at 19:43