I have been struggling with this question for almost a week, which was one of the questions in a past exam. I would really appreciate it if anyone could help me with this problem.
Let $\mathcal{M}$ be the set of finite signed Borel measure on $\mathbb{R}$. Given $x \in \mathbb{R}$ and $r > 0$, let $B(x, r) = \{y \in \mathbb{R}: |x - y| < r \}$. Given two measures $\mu$, $\nu$ in $\mathcal{M}$, define:
$$\langle\mu, \nu\rangle_r = \int_{\mathbb{R}}\mu(B(x, r))\nu(B(x, r))dx$$
Let $\|{\mu}\|_r = \sqrt{\langle\mu, \mu\rangle_r}$. We can easily show that $\| \cdot \|_r$ is a norm on $\mathcal{M}$ (?). Now let $\mu \in \mathcal{M}$ be such that $\mu(\mathbb{R}) = 1$. Define:
$$f(\mu) = \liminf_{r\rightarrow0} \frac{||\mu||_r}{r}$$
Given $f(\mu) < \infty$, then prove that $\mu \ll m$ where $m$ is the Lebesgue measure. Moreover, show that:
$$\left\| \frac{d\mu}{dx} \right\|_{L^2(m)} \leq f(\mu)$$
The hint to the question is as following: For $r > 0$, we define $g_r(x) = \frac{\mu(B(x, r))}{r}$. We need to show that there exists a sequence $r_k \rightarrow 0$ so that $\lim_{k \rightarrow \infty} \|g_{r_k} \|_{L^2(m)} \leq f(\mu)$ and $g_{r_k}$ converges weakly to some $\tilde{g}$. Then, show that $\frac{d\mu}{dx} = \tilde{g}$.
A comment regarding the hint: I think it is possible to construct such a sequence due to the following post and the fact that $L^2$ is a reflexive Banach space.
First of all, as the hint suggests, we have $$\lVert g_r \rVert_{L^2(m)}=\frac{1}{r} \left(\int_{\mathbb{R}}\mu(B(x,r))^2\, dx\right)^{1/2} = \frac{\lVert \mu \rVert_r}{r}.$$ By definition of $\liminf$, there exists a sequence $r_k\to 0$ such that $\frac{\lVert \mu \rVert_{r_k}}{r_k}\to f(\mu)$. In particular, the sequence $\frac{\lVert \mu \rVert_{r_k}}{r_k}$ is bounded. It follows from the above equality that $g_{r_k}$ is bounded in $L^2(m)$. As a result, up to extracting, it converges weakly in $L^2(m)$ to some $\tilde{g}$ which satisfies $$\lVert \tilde{g}\rVert_{L^2(m)} \leq \liminf_k \ \lVert g_{r_k} \rVert_{L^2(m)} = f(\mu).$$
It remains to show that $\tilde{g}$ is the density of $\mu$. Take $\phi \in C(\mathbb{R})\cap L^2(m)$. Using Fubini's theorem, we have
$$\int_{\mathbb{R}} \phi(x) g_{r_k}(x)\,dx = \int_{\mathbb{R}} \phi(x) \left(\frac{1}{{r_k}}\int_{\mathbb{R}}\mathbf{1}_{|x-y|<{r_k}} \,\mu(dy)\right)\,dx =\int_{\mathbb{R}}\left(\frac{1}{r_k}\int_{B(y,{r_k})}\phi(x)dx \right)\mu(dy).$$ Observe that since $\phi$ is continuous, the following convergence holds for every $y \in \mathbb{R}$ $$ \lim_{k\to \infty} \frac{1}{r_k}\int_{B(y,{r_k})}\phi(x)dx = 2\phi(y).$$ Moreover $$\left|\frac{1}{r_k}\int_{B(y,{r_k})}\phi(x)dx\right| \leq 2\lVert \phi\rVert_\infty.$$ Thus by dominated convergence we have $$\lim_k \int_{\mathbb{R}} \phi(x) g_{r_k}(x)\,dx = \lim_k\int_{\mathbb{R}}\left(\frac{1}{r_k}\int_{B(y,{r_k})}\phi(x)dx \right)\mu(dy) = \int_{\mathbb{R}}2\phi(y)\, \mu(dy).$$ On the other hand, by definition of weak convergence, $$\lim_k \int_{\mathbb{R}} \phi(x) g_{r_k}(x)\,dx = \int_{\mathbb{R}} \phi(x)\tilde{g}(x) \, dx.$$ Comparing the last two equations, $\mu$ has density $\tilde{g}/2$. (The extra factor $1/2$ might be a mistake, I'll let you check).