Let $B \subset \mathbb R^n$ be the unit ball.
Consider a Borel measurable set $E \subset B$ with positive Lebesgue measure $|E|>0$ (say $|E| = |B|/2$).


Then, Lebesgue's density theorem, says that for a.e. $x\in E$
$$
\lim\_{r \downarrow 0} \frac{|B(x,r)\backslash E|}{|B(x,r)|} = 0.
$$


We can restate it as follows: for a.e. $x\in E$, for all $\epsilon>0$ there exists $r\_0 = r\_0(x, \epsilon)>0$ such that
$$
|B(x,r)\backslash E| \leq \epsilon |B(x,r)|, \quad 0<r<r\_0(x,\epsilon) .
$$
I am particularly interested in the dependence $\epsilon(r, x)$.


I have a question about this. Probably it has been studied but I have not been able to find any reference.


Given $E$, can we prove some uniformity for $\epsilon$ in a positive measure set (maybe of measure smaller than $|E|$)? That is, can we find some $r\_\*>0$ and $\phi$ continuous with $\phi(0)=0$ such that
$$
\epsilon(r,x) \leq \phi(r), \quad 0<r<r\_\*
$$
for all $x \in \tilde E$ for some Borel set $\tilde E\subset E$ with $0<|\tilde E|\leq |E|$.


**Edit:**
Initially I had two questions but I have decided to delete one.



Set where the speed of convergence is uniform in Lebesgue's density theorem
Let $$f\_n(x) = \sup\_{r \in {\mathbb Q} \cap [\frac{1}{n+1},\frac{1}{n})} \frac{|B(x,r)\setminus E|}{|B(x,r)|}\,,$$ so that $f\_n(x) \to 0$ for a.e. $x \in E$. By Egorov's theorem [1], for every $\epsilon>0$ there is a subset
$\tilde{E} \subset E$ with $|E \setminus \tilde{E}| <\epsilon$, such that
$f\_n(x) \to 0$ uniformly on $\tilde{E}$. It follows that
$$
\lim\_{r \downarrow 0} \frac{|B(x,r)\backslash E|}{|B(x,r)|} = 0
$$
uniformly in $\tilde{E}$, even when the limit is considered for real $r>0$.


[1] <https://en.wikipedia.org/wiki/Egorov%27s_theorem>


