Lebesgue density strictly between 0 and 1 I am having trouble with the following problem:
Let $A\subseteq \mathbb{R}$ be measurable, with $\mu(A)>0$ and $\mu(\mathbb{R}\backslash A)>0$. Then how do I show that there exists $x\in \mathbb{R}$ such that $$\lim_{\varepsilon\to 0} \frac{\mu(B_\varepsilon(x) \cap A)}{\mu(B_\varepsilon(x))}$$
is $\alpha$, where $\alpha\neq 0,1$?
I know from Lebesgue density theorem that the limit is $1$ for a.e. $x\in A$ and $0$ for a.e. $x\in A^c$.
But I don't know how to show that given $A$, we can always find a point which makes the limit not equal to 0 or 1. Please help.
 A: First, by the Lebesgue density theorem, almost every point $x\in A$ has density
$$
\begin{align}
d(x)=\lim_{\epsilon\to0}\frac{\mu(B_\epsilon(x)\cap A)}{B_\epsilon(x)}&&{\rm(1)}
\end{align}
$$
equal to 1. Similarly, almost every point in $\mathbb{R}\setminus A$ has Lebesgue density $d(x)=0$. Every other point is known as an an exceptional point. By what has just been said, the set of exceptional points of a measurable $A\subseteq\mathbb{R}$ has measure $0$.
On the other hand, it is known that for any measurable $A$ such that both $A$ and $\mathbb{R}\setminus A$ have positive measure then there is always at least one exceptional point. By definition, at such points, one of the following holds.


*

*The limit (1) exists and is strictly between $0$ and $1$.

*The limit (1) does not exist.


While it is well known that such exceptional points do exist, the question asks whether there always exists exceptional points of case 1. That is, the density exists but is strictly between 0 and 1. For this, the answer is no. There are such sets $A$ for which the Lebesgue density does not exist at any exceptional point.
First, the follwoing argument shows that exceptional points exist. If $x$ is a density point of $A$ and $y$ is a density point of $\mathbb{R}\setminus A$ then, assuming (wlog) that $x < y$ we define $f\colon[x,y]\to\mathbb{R}$ by $f(t)=\mu((x,t)\cap A)-t/2$. We have $f^\prime(x)=1/2$, $f^\prime(y)=-1/2$. So, the maximum of $f$ occurs in the interior $(x,y)$. If $t^*$ maximises $f(t^*)$ then,
$$
\frac{\mu(B_\epsilon(t^*))}{\mu(B_\epsilon(x))}=\frac{f(t^*+\epsilon)-f(t^*-\epsilon)}{2\epsilon}+\frac12=\frac{f(t^*)-f(t^*-\epsilon)}{2\epsilon}-\frac{f(t^*)-f(t^*+\epsilon)}{2\epsilon}+\frac12
$$
As long as $0\le t^*-\epsilon \le t^*+\epsilon\le1$, each of the first two fractions on the right hand side is nonnegative and bounded by 1/4, showing that the Lebesgue density, if it exists, is in the range $[1/4,3/4]$, so $t^*$ is an exceptional point.
However, the question asks whether there are exceptional points where the density $d(x)$ exists (and is, by definition, strictly between $0$ and $1$). The answer to this is no, not necessarily. I will now construct a set $A$ for which $d(x)$ does not exist at any exceptional point.
I'll follow the construction given in the thesis by Jack Grahl, originally due to Szenes and Kurka. Let $U$ be a finite union of open intervals in the unit interval $[0,1]$ and $C=(-\infty,0)\cup U$. For each of the finite set of points $x\in\partial C=\bar C\setminus C$ suppose that there exists positive reals $r_1(x),r_2(x)$ with $\mu(B_{r_1(x)}\cap C)/\mu(B_{r_1(x)})\not=\mu(B_{r_2(x)}\cap C)/\mu(B_{r_2(x)})$. For example this is true for $U=(u,v)$ with $0 < u < v\le1$ and $u\not=v/2$. Then choose $\delta > 0$ with $\mu(B_{r_1(x)}\cap C)/\mu(B_{r_1(x)})-\mu(B_{r_2(x)}\cap C)/\mu(B_{r_2(x)}) > \delta$ for all $x\in\partial C$.
For any open $V$ I'll write $\partial_L V$ (resp. $\partial_R V$) for the set of limit points of $V$ which are left (resp. right) end points of intervals in $V$. For a fixed $\epsilon > 0$ set
$$
\begin{align}
&A_0=(0,1),\\
&A_{n+1}=A_n\cup\bigcup_{x\in\partial_L A_n}(x-\epsilon^{n+1}U)\cup\bigcup_{x\in\partial_R A_n}(x+\epsilon^{n+1}U),\\
&A=\bigcup_{n=0}^\infty A_n.
\end{align}
$$
For $\epsilon$ small enough, the Lebesgue density will not exist at any point of $\partial A$. I give a proof of this below, follow the arguments of 1. It is a little messy though...

Any $x\in\partial A$ is within a distance $\epsilon^{n+1}+\epsilon^{n+2}+\cdots=\epsilon^{n+1}/(1-\epsilon)\le 2\epsilon^{n+1}$ of a point $y$ of $\partial A_{n}$ (assuming $\epsilon\le1/2$). It follows that
$$
\begin{align}
\left\lvert\mu(B_r(x)\cap A)-\mu(B_r(y)\cap A)\right\rvert\le 2\epsilon^{n+1}.&&{\rm(2)}
\end{align}
$$
Next, letting $L$ be the minimum length of the connected components of $U$, the connected components of $A_{n-1}$ have length at least $\epsilon^{n-1}L$, so none are strictly contained in the intervals $(y-\epsilon,y)$ or $(y,y+\epsilon)$ so long as
$$
\begin{align}
r\le\epsilon^{n-1}L.&&{\rm(3)}
\end{align}
$$
Letting $M$ be the minimum length of a connected component of $\mathbb{R}\setminus C$ then the minimum length $M_n$ of connected components of $\mathbb{R}\setminus A_n$ satisfies $M_1=\epsilon M$ and $M_{n+1}\ge\min(\epsilon^{n+1}M,M_n-2\epsilon^{n+1})$. So long as
$$
\begin{align}
(M+2)\epsilon\le M&&{\rm(4)}
\end{align}
$$
this gives $M_{n+1}\ge\epsilon^{n+1}M$. We assume that $\epsilon$ is small enough for (4) to hold.
Now, as $y$ is a limit point of $A_n$, there is a $z\in\partial_R A_{n-1}$ (resp. $\partial_L A_{n-1}$) such that $y=z$ or $y\in z+\epsilon^n\partial U$ (resp. $y\in z-\epsilon^n\partial U$). Assume, wlog, that $z\in\partial_R A_{n-1}$. Then, $y$ is in the boundary of $z+\epsilon^nC$. If (3) holds then
$$
B_r(y)\cap(-\infty,z)=B_r(y)\cap(-\infty,z)\cap A_{n-1}=B_r(y)\cap(-\infty,z)\cap A_{n}.
$$
Next, if
$$
\begin{align}
r+\epsilon^n\le\epsilon^{n-1}M&&{\rm(5)}
\end{align}
$$
(so $r+\epsilon^n\le M_n$) then $(y,y+r+\epsilon^n)$ does not strictly contain any interval of $\mathbb{R}\setminus A_{n-1}$. This means that $B_r(y)$ does not intersect $z^\prime-\epsilon^n U$ for any $z^\prime > z$ in $A_{n-1}$. Hence,
$$
B_r(y)\cap[z,\infty)\cap A_n=B_r(y)\cap(z+\epsilon^nU).
$$
So, if (3) and (5) are satisfied, we have
$$
\begin{align}
&B_r(y)\cap A_n= B_r(y)\cap(z+\epsilon^n C),\\
&\frac{\mu(B_r(y)\cap A_n)}{\mu(B_r(y)}=\frac{\mu(B_{\epsilon^{-n}r}(y^\prime)\cap C)}{\mu(B_{\epsilon^{-n}r}(y^\prime)}&&{\rm(6)}
\end{align}
$$
where $y^\prime=\epsilon^{-n}y-z$. Letting $r^*$ be the maximum of $r_1(x)$ and $r_2(x)$ over $\partial C$ we can plug in $r=\epsilon^n r_1(y^\prime)$ and $r=\epsilon^n r_2(y^\prime)$ respectively and (2),(5) will be satisfied as long as $\epsilon$ is small enough that
$$
\begin{align}
&\epsilon r^*\le L\\
&\epsilon(r^*+1)\le M.
\end{align}
$$
Also, in this case, $(A_{m+1}\setminus A_m)\cap B_r(y)$ contains at most $N^{m-n+1}$ copies of $U$ scaled by $\epsilon^{m+1}$ (where $N$ is the size of $\partial C$). So, for small $\epsilon$,
$$
\mu(B_r(y)\cap A)-\mu(B_r(y)\cap A_n)\le\sum_{m=n}^\infty N^{m-n+1}\epsilon^{m+1}=N\epsilon^{n+1}/(1-\epsilon)\le 2N\epsilon^{n+1}.
$$
by at most $2\epsilon^{n+1}$ and this differs from $\mu(B_r(y)\cap A_{n})$ by at most $(3\epsilon)^{n+1}$. So,
$$
\left\lvert\frac{\mu(B_r(x)\cap A)}{\mu(B_r(x))}-\frac{\mu(B_r(y)\cap A_{n})}{\mu(B_r(y))}\right\rvert\le r^{-1}(4\epsilon)^{n+1}.
$$
Combining this with (2) and (6) gives
$$
\left\lvert\frac{\mu(B_{s_1}(x)\cap A)}{\mu(B_{s_1}(x)}-\frac{\mu(B_{s_2}(x)\cap A)}{\mu(B_{s_2}(x)}\right\rvert\ge\delta-\frac{2\epsilon}{\tilde r}-\frac{2N\epsilon}{\tilde r}
$$
where $s_1,s_2\le \epsilon^n r^*$ and $\tilde r$ is the minimum of $r_1(x)$ and $r_2(x)$ over $\partial C$. Choosing $\epsilon$ small enough that the right hand side is strictly positive, the left hand side does not vanish as $s_1,s_2\to0$, and the Lebesgue density does not exist at any point of $\partial A$.
A: A professor whom I asked give the following solution. It seems correct to me.
Since $\mu(A)>0$ and $\mu(\mathbb{R}\backslash A)>0$, there is a density point $y_1$ in $A$ and $z_1$ in $\mathbb{R}\backslash A$. Choose $r>0$ sufficiently small such that
$$\frac{\mu(A\cap B_{r_1}(y_1))}{2r_1}> \frac{3}{4} \quad \text{and} \quad \frac{\mu(A\cap B_{r_1}(z_1))}{2r_1}< \frac{1}{4}.$$
Define
$$f_r(x):= \frac{\mu(A \cap B_{r_1}(x))}{2r_1}.$$
For each $r>0$, $f_r$ is continuous, and so by Intermediate value theorem there is $x$ between $y_1$ and $z_1$ such that
$$\frac{\mu(A \cap B_{r_1}(x))}{2r_1}=\frac{1}{2}.$$
Next, there are density points $y_2$ and $z_2$ of $A$ and $\mathbb{R}\backslash A$ in $B_{r_1}(x_1)$. Then choose $r_2<r_1/2$ sufficiently small such that $B_{r_2}(y_2), B_{r_2}(z_2) \subset B_{r_1}(x_1)$, and
$$\frac{\mu(A\cap B_{r_2}(y_2))}{2r_1}> \frac{3}{4} \quad \text{and} \quad \frac{\mu(A\cap B_{r_2}(z_2))}{2r_1}< \frac{1}{4}.$$
Again by Intermediate value theorem, there is $x_2$ between $y_2$ and $z_2$ such that
$$\frac{\mu(A \cap B_{r_2}(x_2))}{2r_2}=\frac{1}{2}.$$
Continuing this, we have a sequence of points $\{x_n\}$ and radius $\{r_n\}$ such that
$$\frac{\mu(A \cap B_{r_n}(x_n))}{2r_n}=\frac{1}{2}\quad \text{and} \quad B_{r_n}(x_n)\subset B_{r_{n-1}}(x_{n-1}) \quad \text{and} \quad r_n \downarrow 0,$$
and so $(x_n)$ converges to the point $x\in \bigcap_{n=1}^\infty \overline{B_{r_n}(x_n)}$.
Also, $x$ is not a density point of both $A$ and $\mathbb{R}\backslash A$ since $\mu(A\cap B_{2r_n}(x))\leq 2r_n+ 2r_n/2$ (since half of $B_{r_n}(x_n)$ is in $\mathbb{R}\backslash A$), and so
$$ \frac{\mu(A\cap B_{2r_n}(x))}{4r_n}\leq \frac{3}{4} \text{  for each $n$},$$
which implies $x$ is not a density point of $A$. Similarly, $x$ is not a density point of $\mathbb{R}\backslash A$. This is the required $x$.
