TITLE: Can every continuous function be continuously ''transformed'' into a differentiable function?
QUESTION [27 upvotes]: Can every continuous function $f(x)$ from $\mathbb{R}\to \mathbb{R}$ be continuously “transformed” into a differentiable function?

 More precisely is  there always  a continuous (non constant) $g(x)$ such that $g(f(x))$ is differentiable?

This seems to hold for simple functions, for instance $|x|$ can be transformed into a differentiable function by the function $x^2$. 
If $g(x)$ is additionally required to be increasing everywhere and
differentiable then the answer seems to be no by the inverse
function theorem, because of the existence of continuous nowhere
differentiable functions.

REPLY [3 votes]: Gillis, Note on a conjecture of Erdos, Quart. J. of Math.,Oxford 10, (1939),151-154, has an example of a continuous function $f$, all of whose level sets are Cantor sets. Unless $g$ is a constant function, it seems $g \circ f$ won't be differentiable.
(Gillis made other claims that were false, but his function does have every level set being a Cantor set).
Foran also has an example, but I don't think he published it. He constructs its graph as the intersection of a nested sequence of rectangles in the unit square.