How to show lim sup is $0$ for $f \in L^1(R)$ For any $f \in L^1(R)$, I am trying to show that
$$\lim_{t\to0}\sup\left\{\frac{1}{|I|} \int
_I |f-f_I| :I \text{ is an interval that contains b with length t}\right\}=0$$
for a.e.  $b \in R$ and $$f_I = \frac{1}{|I|} \int_If$$ where $0 < |I| <\infty$.
I am almost sure that I have to use Lebesgue's Differentiation Theorem which states that
$$ \lim_{t\to0}\frac{1}{2t} \int_{b-t}^{b+t}|f-f(b)|=0 \text{ for a.e. } b \in \mathbb{R} \text{ and  }f\in L^1(R). $$
So I attempted to convert it to this form and  let I = ($b+t/2,b-t/2$) and let $a= t/2.$
By Lebesgue's Differentiation Theorem, I have  $$ \lim_{a\to0}\frac{1}{2a} \int_{b-a}^{b+a}|f-f(b)|=0.$$ If f is continuous at b, I know how to proceed because I can bound it with a difference that goes to 0. But I don't know how to proceed without assuming continuity. Any help is appreciated. Thanks!
 A: To prove this, you can follow the scheme presented in "Real and Complex Analysis" by W. Rudin page 138-139 (the same scheme has already been suggested in the comments) but you need to know some important facts about the Hardy-Littlewood maximal function.

*

*Define, for any $b \in \mathbb{R}$,
$$(T_tf)(b) = \frac{1}{|I_t|} \int_{I_t} |f-f(b)|dx$$
here $I_t$ stands for an interval of lenght $t$ whose center is $b$. Set
$$ (Tf)(b) = \limsup_{t \to 0} \hspace{0.1 cm} (T_tf)(b).$$
To prove that $Tf=0$ a.e., we will prove that for any $y>0$, the set
$$\{x \hspace{0.1cm}| \hspace{0.1 cm} T_f(x)> 2y \}$$
has measure 0.

*Your idea about using continuity is very useful:  Given any $n \in \mathbb{N}$, you may find a continuous function $g$ such that
$$\|f-g \|_{1}<\frac{1}{n}.$$
Set $h=f-g.$
Since $g$ is continuous, $Tg=0$ and it is also possible to show that $T_tf \leq T_tg + T_th$ and that
$$T_th \leq Mh+|h|,$$
where $Mh$ is the maximal function of $h$:
$$Mh(b) = \sup_{t} \frac{1}{I_t} \int_{I_t} |h| dx.$$

*By the above estimate, you can show that
$$ \{ x \hspace{0.1 cm}|\hspace{0.1 cm} Tf(x)> 2y\} \subset \{ x \hspace{0.1 cm}|\hspace{0.1 cm} Mh(x)> y\} \cup \{ x \hspace{0.1 cm}|\hspace{0.1 cm}|h(x)|> y\}$$
Now you have to estimate the measure of the members of the right hand side of the previous expression. Here is where you need some results regarding the Maximal function of $h$. More precisely, it is possible to show that
$$\left | \{ x \hspace{0.1 cm}|\hspace{0.1 cm} Mh(x)> y\} \right | \leq \frac{3}{y}\|h\|_{1}$$
and
$$ \left|\{ x \hspace{0.1 cm}|\hspace{0.1 cm}|h(x)|> y\} \right| \leq \frac{1}{y}\|h\|_{1}$$
see Rudin's book page 138.

*Using the previous estimates and bearing in mind that $\|h\|_1 < \frac{1}{n}$, you find out that
$$\left|  \{ x \hspace{0.1 cm}|\hspace{0.1 cm} Mh(x)> y\} \cup \{ x \hspace{0.1 cm}|\hspace{0.1 cm}|h(x)|> y\}\right| \leq \frac{4}{yn}$$

*Finally, you use the above fact to show that the set $ \{ x \hspace{0.1 cm}|\hspace{0.1 cm} Tf(x)> 2y\}$ has measure $0$. You consider the sets
$$E(y,n) = \{ x \hspace{0.1 cm}|\hspace{0.1 cm} Mh(x)> y\} \cup \{ x \hspace{0.1 cm}|\hspace{0.1 cm}|h(x)|> y\}$$
that arise when you take different continuous functions $g$ that approximate $f$. You can show that
$$ \{ x \hspace{0.1 cm}|\hspace{0.1 cm} Tf(x)> 2y\} \subset \bigcap_{n=1}^{\infty} E(y,n)$$
and by all the previous estimates, you can show that the set $\bigcap_{n=1}^{\infty} E(y,n)$ has measure zero and therefore,
$$ \left|\{ x \hspace{0.1 cm}|\hspace{0.1 cm} Tf(x)> 2y\}\right| =0 $$
for any $y>0$.

Rudin, Walter, Real and complex analysis., New York, NY: McGraw-Hill. xiv, 416 p. (1987). ZBL0925.00005.
