A composition of differentiable functions can be non-differentiable.

Intro

I was a little surprised to find that \(\sqrt{1-\cos(x)}\), which is a composition of differentiable functions, is not itself differentiable (at e.g. \(x=0\)). A plot illustrates what goes wrong.

Plot of \sqrt{1-\cos(x)}.

Plot of \(\sqrt{1-\cos(x)}\).

Its derivative is \[\frac{-\sin(x)}{2\sqrt{1-\cos(x)}}\] which is indeed \(0/0\) at \(x=0\).