TITLE: Composition of almost-everywhere differentiable functions $\mathbb{R} \rightarrow \mathbb{R}$
QUESTION [7 upvotes]: Suppose $g, f : \mathbb{R} \to \mathbb{R}$ are almost-everywhere differentiable. Is $g \circ f$ almost-everywhere differentiable? 
(This question deals with a-e. continuity, but the answer does not apply. 
This question deals with a-e. differentiability but in higher dimensions; the answers do not apply either.)

REPLY [5 votes]: There exist almost everywhere differentiable functions $f$ and $g$ such that $g\circ f$ is not measurable. One example is given in Ciesielski et al. - $\mathcal{I}$-Density Continuous Functions on page 104. Their construction is as follows:

Consider a perfect nowhere dense set $P\subset\mathbb{R}$ and a nonmeasurable set $S\subset P$. Let $f$ be a homeomorphism s.t. $f^{-1}(C)=P$, where $C$ is a Cantor set of measure $0$, and let $g=1_S\circ f^{-1}$. Then $f$ is a.e. differentiable as a homeomorphism, and $g$ is a.e. differentiable because $g=1_{f(S)}$ and $f(S)\subset C$ has measure $0$. However, $g\circ f=1_S$ is not measurable.