Let $\alpha \in (0,1)$. Find a Borel subset $E$ of $[-1,1]$ s.t. $\lim_{r\to 0^{+}} \frac{m(E\cap [-r,r])}{2r}=\alpha.$
Let $\alpha \in (0,1)$. Find a Borel subset $E$ of $[-1,1]$ s.t. $$\lim_{r\to 0^{+}} \frac{m(E\cap [-r,r])}{2r}=\alpha.$$
In fact, for a similar result in $\mathbb{R}^d$ also holds: $$D_{E}(x)=\lim_{r\to 0} \frac{m(E\cap B(r,x))}{m(B(r,x))}$$ we just consider the unit circle and $E$ is a sector with angle $2\pi \theta$ where $\theta\in(0,1)$, then $$D_{E}(x)=\frac{2\pi \theta }{2\pi}=\theta$$
But how about the $\mathbb{R}$?
There is a standard construction that helps elicit all kinds of possible values for limits of the form $$ \lim_{r\rightarrow0}\frac{\lambda(E\cap[-r,r])}{2r} \tag{1}\label{1} $$
Choose a strictly decreasing sequence $a_n\xrightarrow{n\rightarrow\infty}0$ with $0<a_n\leq 1$. and define $E$ as a symmetric set around $0$ such that $$ E\cap(0,\infty)=\bigcup_{n=0}[a_{2n+1},a_{2n}]$$
- The sequence $a_n=\frac{1}{n!}$ provides an example in which $$0=\liminf_{r\rightarrow0}\frac{\lambda(E\cap[-r,r])}{2r}<\limsup_{r\rightarrow0}\frac{\lambda(E\cap[-r,r])}{2r}=1$$
The sequence $a_n=\theta^n$, where $0<\theta<1$, provides an example where along $r=(1-\alpha)\theta^{2n} + \alpha\theta^{2n-1}$, where $0\leq \alpha\leq 1$, $$\frac{\theta}{1+\theta}\frac{1}{(1-\alpha)+\alpha\theta}=\lim_{r\rightarrow0}\frac{\lambda(E\cap[-r,r])}{2r}$$ This shows that any value between $\theta/(1+\theta)$ and $1/(1+\theta)$ is a possible (sub)limit value of \eqref{1}.
The sequence $a_{2n}=\frac{n+\alpha}{n(n+1)}$, $a_{2n+1}=\frac{1}{n+1}$, where $0<\alpha<1$ gives $$\alpha=\lim_{r\rightarrow0}\frac{\lambda(E\cap[-r,r])}{2r}$$
You can try to use technique to find other interesting examples.
Take $$C_n=(-\frac{1}{n},-\frac{1}{n+1}] \cup [\frac{1}{n+1},\frac{1}{n})$$
By regularity of Lebesgue measure we can find Borel measurable $A_n \subseteq C_n$ such that $m(A_n)=am(C_n)<m(C_n),\forall n \in \Bbb{N}$
Define $A:=\bigcup_{n=1}^{\infty}A_n$
If $\frac{1}{n+1} \leq r<\frac{1}{n}$ then
$$\frac{m(A \cap (-r,r))}{2r}\leq \frac{m(A\cap (-\frac{1}{n},\frac{1}{n}))}{\frac{2}{n+1}}=\frac{\frac{2a}{n}}{\frac{2}{n+1}}\leq a(1+2r)$$ since $\frac{2}{n+1} \geq \frac{1}{n}$
$$\frac{m(A \cap (-r,r))}{2r} \geq \frac{m(A\cap (-\frac{1}{n+1},\frac{1}{n+1}))}{\frac{2}{n}}=\frac{\frac{2a}{n+1}}{\frac{2}{n}}\geq a(1-r)$$
Sending $r \to 0^+$ we have the conclusion.