Find continuous function $f: \mathbb R \to \mathbb R$ that is differentiable everywhere except $ \forall c \in \mathbb Z$ 
Find continuous function $f: \mathbb R \to \mathbb R$ that is differentiable everywhere except $\forall c \in \mathbb Z$

Attempt:
Let $$f(x) = \sqrt{1-\cos(2 \pi x)}$$
Then $f: \mathbb R \to \mathbb R$ and is continuous everywhere.
$$f'(x) = \frac{\pi \sin(2 \pi x)}{\sqrt{1 - \cos(2 \pi x)}}$$
This is undefined $\forall c \in \mathbb Z$
However, since this is a case of $\frac00$, it seems necessary to me to observe the limiting behavior before I conclude it's undefined for all integers. A quick test on Mathematica showed that the left hand limit is $-\sqrt2 \pi$ and right hand limit is $\sqrt2 \pi$, so the limit does not exist. This should validate my function, however I'm still a little unsatisfied. First, is the function a valid candidate? second, how would I go about calculating that limit if so?
 A: Draw a sequence of semi-circles that are above the $x$-axis, but the diameters on the $x$-axis: each semicircle is of diameter  unit length starting at an integer point $(n,0)$ and ending at the next integer point $(n+1,0)$. Regard this as the graph of a function. Write down the formula for that function. It will meet your requirement. 
A: Notice that $1 - \cos(2\pi x) = 2 \sin^2(px)$, therefore $f' = \frac{2\pi \sin(\pi x) \cos(\pi x)}{\sqrt{2} |\sin(\pi x)|} = \sqrt{2}\pi \cos(\pi x) \frac{\sin 2\pi x}{|\sin 2\pi x|}$, and the last factor is $\pm 1$ depending on which side you approach an integer.
A: Take the function $f(x):=|x|$ $\ (-1\leq x\leq 1)$, extended periodically with period $2$ to all of ${\mathbb R}$.
A: Consider $g(x)=\sqrt{1-\cos x}$; then
$$
g'(x)=\frac{\sin x}{2\sqrt{1-\cos x}}
$$
for $x\ne 2k\pi$ ($k$ an integer). On the other hand
$$
\frac{g(2k\pi+h)-g(2k\pi)}{h}
=\frac{\sqrt{1-\cos h}}{h}=\frac{\lvert\sin h\rvert}{h}\frac{1}{\sqrt{1+\cos h}}
$$
so $g$ is not differentiable at $2k\pi$: the limit for $h\to0$ doesn't exist: it equals $-1/\sqrt{2}$ from the left and $1/\sqrt{2}$ from the right.
Now consider $f(x)=g(2\pi x)$. (Yes, it's exactly your idea.)
