For every null set $E$ there is a measurable set $F$ with different upper and lower Lebesgue density at every point of $E$

This answer is about non-centered densities.

I write $|\ |$ for the Lebesgue measure; $I$ is always an interval. The proof of Theorem 1 in On Lebesgue's density theorem (Proc. Amer. Math. Soc. 1 (1950) 384-388) by Casper Goffman shows that for every null set $E$ there is a measurable set $F$ such that for every $x\in E$ $$\liminf_{|I|\to 0,\ x\in I} \frac{|F\cap I|}{|I|}=0 \quad \text{ and }\quad \limsup_{|I|\to 0,\ x\in I} \frac{|F\cap I|}{|I|}=1 \tag1$$ This is weaker than the corresponding result for centered densities, for which I do not have a proof. For completeness and readability, I reproduce Goffman's short proof below.

Proof. Let $G_1\supset G_2\supset\dots $ be a decreasing sequence of open sets containing $E$. Each $G_n$ is the disjoint union of open intervals, which we call $I_n(p)$, $p=1,2,\dots$. Since $E$ has measure zero, we can choose $G_{n+1}$ so that $$|G_{n+1}\cap I_{n}(p)| \le \frac{1}{n} |I_{n}(p)| ,\quad \forall\ p \tag2$$ Define $$F = \bigcup_{k=1}^\infty (G_{2k-1}\setminus G_{2k})\tag3$$ Fix $x\in E$. For every $n$ there is $p_n$ such that $x\in I_n(p_n)$. When $n$ is odd, $$ |F\cap I_{n}(p_n)| \ge |(G_n\setminus G_{n-1})\cap I_{n}(p_n)| \ge \frac{n-1}{n} | I_{n}(p_n)| \tag4$$ When $n$ is even, $$ |F\cap I_{n}(p_n)| \le |G_{n+1}\cap I_{n}( p_n)| \le \frac{1}{n} | I_{n}( p_n)| \tag5$$ From (4) and (5) we get (1).


New readers should read over the comments first, as this "answer" is essentially an extended follow-up comment.

I believe the argument Goffman gave, as reproduced in words that end in GRY's answer, can be modified to give the result for centered densities (i.e. the version for symmetric Lebesgue density) in the following way. (It's still a little too hand-wavey for my tastes, by the way.)

Define the open sets $G_n$ as before, except replace equation (2) with $$ |G_{n+1}\cap I_{n}(p)| \; \le \; \frac{1}{n^2} |I_{n}(p)| ,\quad \forall\ p, $$ Next, for each $p$ and each $n,$ introduce $n$ many intervals (some open, some half-open) $$J_{n}^{1}(p), \;\; J_{n}^{2}(p), \;\; J_{n}^{3}(p), \;\; \ldots, \;\; J_{n}^{n}(p), $$ the interior of each of which is a translation of $I_{n}(p),$ so that each of the $n$ many consecutively appearing (from left to right) pairwise disjoint $\frac{1}{n}$-portions of $I_{n}(p)$ is centrally located within one of the $J$ intervals.

For example, suppose $I_{3}(7)$ is the open interval $(1,4).$ Since $n=3,$ we imagine $(1,4)$ divided into the $3$ disjoint intervals $(1,2]$ and $(2,3]$ and $(3,4).$ Then we choose $$J_{3}^{1}(7) = (0,3), \;\; J_{3}^{2}(7) = (1,4), \;\; J_{3}^{3}(7) = (2,5)$$ Notice that $J_{3}^{1}(7)$ provides a symmetric cover of length $3$ (the length of $I_{3}(7)\,)$ for the 1st $\frac{1}{3}$-portion of $(1,4),$ namely the interval $(1,2].$ Also, $J_{3}^{2}(7)$ provides a symmetric cover of length $3$ for the 2nd $\frac{1}{3}$-portion of $(1,4),$ namely the interval $(2,3].$ And lastly, $J_{3}^{3}(7)$ provides a symmetric cover of length $3$ for the 3rd $\frac{1}{3}$-portion of $(1,4),$ namely the interval $(3,4).$

As an additional example, suppose $I_{6}(20)$ is the open interval $(0,1).$ Since $n=6,$ we imagine $(0,1)$ divided into the $6$ disjoint intervals $\left(0, \, \frac{1}{6}\right]$ and $\left(\frac{1}{6}, \, \frac{2}{6}\right]$ and $\left(\frac{2}{6}, \, \frac{3}{6}\right]$ and $\left(\frac{3}{6}, \, \frac{4}{6}\right]$ and $\left(\frac{4}{6}, \, \frac{5}{6}\right]$ and $\left(\frac{5}{6}, \, 1\right).$ Then we choose $$J_{6}^{1}(20) = \left(-\frac{5}{12}, \,\frac{7}{12}\right), \;\; J_{6}^{2}(20) = \left(-\frac{3}{12}, \,\frac{9}{12}\right), \;\; J_{6}^{3}(20) = \left(-\frac{1}{12}, \,\frac{11}{12}\right)$$ $$J_{6}^{4}(20) = \left(\frac{1}{12}, \,\frac{13}{12}\right), \;\; J_{6}^{5}(20) = \left(\frac{3}{12}, \,\frac{15}{12}\right), \;\; J_{6}^{6}(20) = \left(\frac{5}{12}, \, \frac{17}{12}\right)$$ Notice that $J_{6}^{1}(20)$ provides a symmetric cover of length $1$ (the length of $I_{6}(20)\,)$ for the 1st $\frac{1}{6}$-portion of $(0,1),$ namely the interval $\left(0, \, \frac{1}{6}\right].$ Also, $J_{6}^{5}(20)$ provides a symmetric cover of length $1$ for the 5th $\frac{1}{6}$-portion of $(0,1),$ namely the interval $\left(\frac{4}{6}, \, \frac{5}{6}\right],$ and so on.

Define the set $F$ the same as before. Now pick $x \in E.$ Then, as before, for each $n$ there exists $p_n$ such that $x \in I_n(p_n).$ However, instead of proceeding directly to the relative measure calculations involving the interval $I_n(p_n),$ these being the equations labeled (4) and (5) in words that end in GRY's answer, choose $k$ so that $p_n$ lies in the $k$th $\frac{1}{n}$-portion of $I_n(p_n),$ and perform the relative density calculations using $J_n^{k}(p_n).$ I believe that by using $\frac{1}{n^2}$ instead of $\frac{1}{n}$ in defining the sets $G_n,$ even in the worst case scenarios we will be led to centered density calculations that are at least as strong as the previous un-centered calculations. Notice that as $n \rightarrow \infty,$ the relative position of $p_n$ in $J_n^{k}(p_n)$ approaches the center of $J_n^{k}(p_n),$ in the sense that the ratio of the distance between $p_n$ and the center of $J_n^{k}(p_n)$ to the length of $J_n^{k}(p_n)$ approaches $0.$

Some Historical and Literature Comments

The result, in the form stated as Theorem 1 in Goffman's 1950 paper [3], is stated as Theorem II (p. 23) in Chapter 2 of Goffman's 1942 Ph.D. Dissertation [2]. However, in his Dissertation Goffman neither proves nor states the $0$ and $1$ non-centered density result that arises in the proof of Theorem 1 in [3]. Rather, he simply says that a variation on the method used to prove Theorem I (p. 22) in Chapter 2 of his Dissertation can be used to prove the result. For the record, Theorem I in Chapter 2 of his Dissertation is: "If $Z$ is any set of measure $0,$ there exists a set $S$ whose metric density is different from $0$ and $1$ at every point of $Z.$"

Theorems 1 and 2 from Goffman's paper [3] appear in nearly identical form in his 1953/1967 book [4] (Chapter 14.4, pp. 175-176). Also, the two typos in the proof of his Theorem 1 in [3] are corrected in the 1967 printing of [4] that I have (these being: line 4 of the proof, $G$ should be $G_n;$ line 10 of the proof, $S \subset G_{n+1}$ should be $S \cap I_{np_{n}} \subset G_{n+1}),$ but I don't know if these corrections were in the original 1953 printing of Goffman's book.

The proof of Theorem 3 in Goffman's paper [3] shows that for each $F_{\sigma}$ measure zero subset $Z$ of $\mathbb R$ (note that any such set is also meager in the Baire category sense) there exists a measurable set $S$ such that at each point of $Z$ the density of $S$ equals $\frac{1}{2}.$ In 1960 Martin [6] generalized this so that $\frac{1}{2}$ can be replaced by any fixed real number $r$ such that $0 < r < 1.$ (Actually, this particular result forms the 2nd half of Martin's 1959 Ph.D. Dissertation.)

Goffman's results (and Martin's) can be found in Lukeš/Malý/Zajíček's 1986 monograph [5] (exercises in Section 6.A on pp. 152-161), and (versions of Goffman's Theorems 2 and 3) in Zajíček's 1974 paper [7] (Section 4, p. 206: Propositions 4, 5, 6) has some related results. In particular, Goffman's Theorem 1 (the $0$ and $1$ version in Goffman's proof) appears in [5] as Exercise 6.A.3 on p. 153 (a generous hint is provided), followed by: "REMARK: The same assertion is true for $d_{\text{sym}}(x,M)$ and $d^{\text{sym}}(x,M)$." I do not think I was aware of this remark in [5] when, in 1994, I was going through Goffman's paper and began wondering about this and other issues, but I suspect I was aware of the remark in [5] by 1996.

On 30 December 1994 I mailed a 7 page handwritten letter to Goffman (printed, not cursive) asking him who his Ph.D. advisor's Ph.D. advisor was (I was interested in mapping my genealogy back as far as I could; with the answer he gave, "Landau", in early 1995 I was able to trace it back to Frobenius) and a number of math questions, one of which was the symmetric density version of his Theorem 1 in [3]. I said that by tweaking his proof I was able to get the symmetric density version (I'm not sure what my argument was, as I have yet to find it written down anywhere; I could have been mistaken, of course) and asked if he was aware of this and whether he or others he knows have done any work on issues such as this (especially results in Ph.D. Dissertations that were never published). His response (handwritten letter back to me dated 5 January 1995) to my math questions was: "Regarding the mathematics you mention I have little to say. I was unable to do anything about a question asked about density in several variables. Here, if $S$ is measurable its ordinary and strong densities both exist almost everywhere. One of these sets of measure $0$ contains the other. What kind of set is the difference?" Note that Belna/Evans/Humke [1] (p. 266, Theorem 5) gives some information in the one dimensional case.

[1] Charles Leonard Belna, Michael Jon Evans, and Paul Daniel Humke, Symmetric and ordinary differentiation, Proceedings of the American Mathematical Society 72 #2 (November 1978), 261-267.

[2] Casper Goffman, On the Converses of Certain Theorems on the Symmetric Structure of Sets and Functions, Ph.D. Dissertation (under Henry Blumberg), Ohio State University, 1942, 61 pages.

[3] Casper Goffman, On Lebesgue's density theorem, Proceedings of the American Mathematical Society 1 #3 (June 1950), 384-388.

[4] Casper Goffman, Real Functions, The Prindle, Weber and Schmidt Complementary Series in Mathematics #8, Prindle, Weber, and Schmidt, 1967, x + 261 pages. [Reprint (corrected?) of the 1953 first edition.]

[5] Jaroslav Lukeš, Jan Malý, and Luděk Zajíček, Fine Topology Methods in Real Analysis and Potential Theory, Lecture Notes in Mathematics #1189, Springer-Verlag, 1986, x + 472 pages.

[6] Nathaniel Frizzel Grafton Martin, A note on metric density of sets of real numbers, Proceedings of the American Mathematical Society 11 #3 (June 1960), 344-347.

[7] Luděk Zajíček, On cluster sets of arbitrary functions, Fundamenta Mathematicae 83 #3 (1974), 197-217.