This problem is Sect. 6.2 no. 3 of Measure Theory of Cohn, I want to know is my proof correct and is there a more concise proof?
Let $f$ be a nonnegative function in $\mathscr{L}^1(\mathbb{R},\mathscr{B}(\mathbb{R}^d),\lambda,\mathbb{R})$, and $\mu$ be the finite Borel measure on $\mathbb{R}^d$ given by $\mu(A)=\int_A f d\lambda$. Show that $(D\mu)(x)=f(x)$ at each $x$ at which $f$ is continuous ($\lambda$ is the Lebesgue measure).
Proof. Let $a \in \mathbb{R}^d$ such that $f$ is continuous at $a$. For each $\epsilon>0$, there is a closed cube $C^{\epsilon}$ containing $a$ s.t. $f(x)\in [f(a)-\epsilon,f(a)+\epsilon]$ whenever $x\in C^\epsilon$, then $$(f(a)-\epsilon)\lambda(C^{\epsilon})\leq\mu(C^\epsilon)=\int_{C^\epsilon} fd\lambda\leq(f(a)+\epsilon)\lambda(C^\epsilon)$$ This means $$\frac{(f(a)-\epsilon)\lambda(C^\epsilon)}{\lambda(C^\epsilon)}\leq \frac{\mu(C^\epsilon)}{\lambda(C^\epsilon)}\leq \frac{(f(a)+\epsilon)\lambda(C^\epsilon)}{\lambda(C^\epsilon)}$$ and therefore, $$(\overline{D}\mu)(a)=limsup_{\epsilon\rightarrow0}\{\frac{\mu(C)}{\lambda(C)}:C\in\mathscr{C},a\in C, e(C)<\epsilon\}=f(a)$$ ($\mathscr{C}$ is the collection of all sets of the form $[a_1,b_1]\times...\times[a_d,b_d]$ and $e(C)$ the volume of $C$) and Similarily, $(\underline{D}\mu)(a)=f(a).$ Q.E.D.
Not quite. Using continuity, for every $\epsilon>0$ you find $\delta_\epsilon$ such that $f(x)\in [f(a)-\epsilon,f(a)+\epsilon]$ for all $x\in Q$ for every cube centered at $a$ with $e(Q)<\delta_\epsilon$. Taking $\delta\le\delta_\epsilon$ you get $$(f(a)-\epsilon)\leq \frac{\mu(C)}{\lambda(C)}\leq (f(a)+\epsilon)$$ for all cubes with measure less than $\delta$. Hence $$f(a)-\epsilon\le \underline{D\mu}(a)\le\overline{D\mu}(a)\le f(a)+\epsilon$$ Now you let $\epsilon$ go to zero.