Everywhere continuous and differentiable $f : \mathbb{R} → \mathbb{R}$ that is not smooth

derivativesfunctionsreal numbersreal-analysis

I can't seem to find any counterexamples to the statement "all functions that are continuous and differentiable at every point of the reals are smooth," nor can I find anyone asserting or proving this statement. Are there known functions that are continuous and differentiable at every point (with no holes / discontinuities / bounded domain) but are not smooth, that is, after some number of derivatives the derivative function is no longer fully differentiable?

Best Answer

Sure. Take, for instance$$f(x)=\begin{cases}x^2&\text{ if }x\geqslant0\\-x^2&\text{ otherwise.}\end{cases}$$