**EDIT:**


Perhaps a more reasonable question after thinking about the answer I got would have been. 


Is there a set $N$ of measure $1-\varepsilon$ and a disjoint partition of that set $N$ with finitely many disjoint sets $I\_i$ such that each of them contains an $x$ for which
$$\left\lvert \left\lvert I\_n \right\rvert^{-1} \int\_{I\_n} f(s) ds- f(x) \right\rvert \le \varepsilon?$$


**END EDIT.**


The differentiation theorem teaches us that for a $L^1\_{loc}$ function


$$\frac{1}{B(x,R)}\int\_{B(x,R)} f(s) ds \rightarrow f(x)$$


almost everywhere.


Now consider a Lebesgue integrable function on the interval $[0,1]$ and the partition $I\_n^k=[k/n,(k+1)/n]$ for $k=0,..,n-1.$


**Uniform rational case:**
I would like to ask whether for all $\varepsilon>0$ there exists a natural number $n$ such that for all $I\_n^k$ there is an $x \in I\_n^k$ such that 


$$\left\lvert n\int\_{I\_n^k} f(s) ds- f(x) \right\rvert \le \varepsilon.$$


**Uniform real case:**
Is the assumption of disjoint intervals $I\_{\delta}^k$ of same size $\delta$ where $\delta>0$ is an arbitrary real number stronger?-Of course in this case, we do not always exactly cover $[0,1]$ but you may assume that the function actually lives on $[0,2]$ for convenience.


**And even less restrictive:**


Is there any finite disjoint partition of intervals $I\_n$ of $[0,1]$ such that each of them contains an $x$ for which
$$\left\lvert \left\lvert I\_n \right\rvert^{-1} \int\_{I\_n} f(s) ds- f(x) \right\rvert \le \varepsilon?$$



Differentiation on $[0,1]$
The answer to all your questions is **no**.




---


Consider $f(x) = (-1)^n$ when $x \in (2^{-n-1}, 2^{-n}]$, $n = 0, 1, \ldots$ Suppose that $\delta \in (2^{-k-1}, 2^{-k}]$. The indefinite integral of $f$ is linear on $[2^{-k-1}, 2^{-k}]$ with values $(-2)^{-k-1}/3$ and $(-2)^{-k}/3$ on the endpoints. Therefore,
$$\left|\int\_0^\delta f(s) ds\right| \leqslant 2^{-k}/3 ,$$
and hence
$$\left|\frac{1}{\delta} \int\_0^\delta f(s) ds\right| \leqslant 2/3 .$$
On the other hand, $|f(x)| = 1$ in $[0, \delta]$. We conclude that
$$\left|\frac{1}{\delta} \int\_0^\delta f(s) ds - f(x)\right| \geqslant 1/3 $$
for every $x \in [0, \delta]$.


