For $\delta >0,$let $I(\delta)$ be the segment $(- \delta, \delta) \subset \mathbb{R}.$ Given $\alpha,\beta,$ and $0 \leq \alpha < \beta \leq 1,$ construct a measurable set $E \subset \mathbb{R}$ so that the upper and lower limits of $$m(E \cap I(\delta))/2 \delta$$ are $\beta$ and $\alpha$ repsectively as $\delta \rightarrow 0.$
This is a question from Rudin's book on Real and Complex Analysis and it has been taken up before here:
Lebesgue measurable subset of $\mathbb{R}$ with given metric density at zero .
Yuval Filmus has posted an answer which I'm trying to verify, but I can't make it to work. In his answer, he sets $E$ to be the duplication around zero of
$$\bigcup_{n \geq 1} \left[\frac{1}{(2n)!}-\alpha\left(\frac{1}{(2n)!} - \frac{1}{(2n+1)!}\right),\frac{1}{(2n)!}\right] \cup \left[\frac{1}{(2n+1)!}-\beta\left(\frac{1}{(2n+1)!} - \frac{1}{(2n+2)!}\right),\frac{1}{(2n+1)!}\right].$$
I have no problem with showing that $\beta$ and $\alpha$ can occur as limits, but I can't show that any limit must lie between $\beta$ and $\alpha.$
My questions are thus:
1. Is the construction of Yuval correct? Does this work?
2. If not, what is an example that does work?
My attempt with Yuval's example
Let us try to show that any limit must lie between $\alpha$ and $\beta.$ Say that $0< r <1$ and that $ \dfrac{1}{(2n+1)!} < r \leq \dfrac{1}{(2n)!}.$ Then we have that $$m(E \cap I(1/(2n+1)!)) \leq m(E \cap I(r) ) \leq m(E \cap I(1/(2n)!)).$$ We have that $$m(E \cap I(1/(2n+1)!)) = 2\sum_{k=n+1}^\infty \beta \frac{2k}{(2k+1)!} + 2 \sum_{k=n+2}^\infty \alpha \frac{2k}{(2k+1)!}$$ while $$m(E \cap I(1/(2n)!)) = 2\sum_{k=n}^\infty \alpha \frac{2k}{(2k+1)!} + 2 \sum_{k=n+1}^\infty \beta \frac{2k}{(2k+1)!}.$$
We have $$m(E \cap I(1/(2n+1)!))/(2r) \leq m(E \cap I(r) )/(2r) \leq m(E \cap I(1/(2n)!))/(2r).$$ We now want an upper and a lower bound on $m(E \cap I(r))/(2r).$For the upper bound, the obvious thing would be, since $(2n)!/2 \leq 1/(2r) < (2n+1)!/2$ would be to calculate $$(2n+1)!/2m(E \cap I(1/(2n)!)).$$ This is $$(2n+1)!\sum_{k=n}^\infty \alpha \frac{2k}{(2k+1)!} + (2n+1)! \sum_{k=n+1}^\infty \beta \frac{2k}{(2k+1)!}.$$ But this upper bound is much too crude to give us anything valuable. I also tried by taking the midpoint of the interval $[1/(2n+1)!,1/(2n)!]$ but that similarily seemed to give me nothing.