TITLE: Functions that are approximately differentiable a.e
QUESTION [8 upvotes]: The classical definition of an approximately differentiable function is as follows:

Definition.
Let $f:E\to\mathbb{R}$ be a measurable function defined on a measurable set $E\subset\mathbb{R}^n$. We say that $f$ is
  approximately differentiable at $x\in E$ if there is a linear function
  $L:\mathbb{R}^n\to\mathbb{R}$ such that for any $\varepsilon>0$ the
  set $$ \left\{ y\in E:\, \frac{|f(y)-f(x)-L(y-x)|}{|y-x|} <\varepsilon
 \right\} \quad \text{has $x$ as a density point.} $$

It turns out that this definition is equivalent to the one described in the following result.

Theorem. A measurable function $f:E\to\mathbb{R}$ defined in a measurable set $E\subset\mathbb{R}^n$ is approximately differentiable
  at $x\in E$ if and only if there is a measurable set $E_x\subset E$
  and a linear function $L:\mathbb{R}^n\to\mathbb{R}$ such that $x$ is a
  density point of $E_x$ and $$ \lim_{E_x\ni y\to x}
 \frac{|f(y)-f(x)-L(y-x)|}{|y-x|} = 0. $$

Do you know any reference for the proof of this result? Since we could not find a good reference, we proved it in the appendix of the paper listed below, but I am pretty sure it can be found somewhere else. 
P. Goldstein, P. Hajłasz, A measure and orientation preserving homeomorphism with approximate Jacobian equal −1 almost everywhere. 
Arch. Ration. Mech. Anal. 225 (2017), 65–88.
In my opinion it is a folklore result that most of the people working with approximately differentiable functions know. The characterization given in the theorem is much easier to use than the original definition.

REPLY [3 votes]: The equivalence between the two definitions is in fact really straightforward. Call $E_x^\varepsilon$ the set appearing in the first definition. Clearly the second definition implies the first one, as for $r$ small enough (depending on $\varepsilon$) $E_x\cap B_r(x)\subseteq E_x^\varepsilon$.
Conversely, let $k_0:=0$ and take, for each integer $j>0$, the smallest integer $k_j>k_{j-1}$ such that
$$|E_x^{1/j}\cap(B_r(x)\setminus B_{r/2}(x))|\ge(1-1/j)|B_r(x)\setminus B_{r/2}(x)|$$
for all $r\le 2^{-k_j}$. Notice that you can pick
$$E_x:=\bigcup_{j=1}^\infty\bigcup_{k=k_j}^{k_{j+1}-1}E_x^{1/j}\cap (B_{2^{-k}}(x)\setminus B_{2^{-k-1}}(x)).$$