Show a function is continuous but nowhere differentiable Define $h(x)=|x|$ on the interval $[-1,1]$. Suppose that $h(x+2)=h(x)$ for all $x \in \mathbb{R}$. Sketch a graph of $(\frac{1}{2})h(2x)$ on $[-2,3]$. Give a qualitative description of the functions 
$$h_n(x)=\frac{1}{2^n}h(2^nx)$$
as $n \rightarrow \infty$.
Now, define 
$$g(x)=\sum_{n=0}^{\infty}{h_n(x)}=\sum_{n=0}^{\infty}{\frac{1}{2^n}h(2^nx)}$$
The claim is that $g(x)$ is continuous on all of $\mathbb{R}$ but fails to be differentiable at any point.
My attempt: The graph of $(\frac{1}{2})h(2x)$ is same as $|x|$ because $(\frac{1}{2})h(2x)=(\frac{1}{2})|2x|=|x|$.
Therefore, $h_n(x)=\frac{1}{2^n}h(2^nx)=|x|$ for all $n \in \mathbb{N}$. However, $g$ will not be defined as $\sum_{n=0}^{\infty}{|x|}$ does not converge. 
May I know where is my mistake? 
 A: It seems to me that your main problem is that you’re not picturing $h(x)$ and the functions $h_n(x)$ correctly. I’ll get you started on that, and then you can try to prove that $g$ has the desired properties.
The condition that $h(x+2)=h(x)$ for all $x\in\Bbb R$ makes $h$ periodic, with period $2$. For example, $1=h(1)=h(3)=h(5)=\ldots$. Thus, the graph of $h$ for $1\le x\le 2$ looks exactly like the graph of $h$ for $1-2\le x\le 2-2$, i.e., for $-1\le x\le 0$: it’s a line segment with slope $-1$, dropping from a height of $1$ down to the $x$-axis. In fact the graph of $y=h(x)$ is a zigzag, or sawtooth:
$$\ldots\diagdown\diagup\diagdown\diagup\diagdown\diagup\diagdown\diagup\diagdown\diagup\diagdown\ldots$$
Now what happens when we change $h$ to $h_1(x)=\frac12h(2x)$? 
This is very much like what happens when we go from $\cos x$ to $\frac12\cos(2x)$: the amplitude is cut in half, and the frequency is doubled. The function $\cos x$ goes through one complete cycle as $x$ goes from $0$ to $2\pi$. As $x$ goes from $0$ to $2\pi$, however, $2x$ goes from $0$ to $4\pi$, and $\cos 2x$ goes through two full cycles.
Similarly, $h(x)$ goes through one complete up-down cycle as $x$ goes from $0$ to $2$. As $x$ goes from $0$ to $2$, however, $2x$ goes from $0$ to $4$, and $h(2x)$ goes through two complete up-down cycles. So, of course, does $h_1(2x)$, but the cycles are only half as tall.
Once you see that, it’s not hard to see that $h_{n+1}$ is related to $h_n$ in exactly the same way that $h_1$ is related to $h$. Then you can make a rough sketch showing the graphs of $h_n$ for $n=0,1,2,3$, say, and use that to think about $g$.
