TITLE: Prove that $\,f=0$ almost everywhere.
QUESTION [9 upvotes]: Let $f$ be a Lebesgue integrable function on $[0,1]$ such that, for any $0 \leq a < b \leq 1$,
$$\biggl|\int^b_a f(x)\,dx\,\biggr| \leq (b-a)^2\,.$$
Prove that $f=0$ almost everywhere.
I would be thankful if somebody tell me whether my attempt is correct or not:
Consider the partition 
$$
[0,1]=\left[0,\frac{1}{n}\right) \cup \left[\frac{1}{n},\frac{2}{n}\right) 
\cup \cdots \cup \left[\frac{n-1}{n},1\right]. 
$$
I am going to use the fact that if $g$ is an integrable over a measurable set $E$, $g$ is finite almost everywhere on $E$, i.e. there is $M>0$ such that 
$\vert g\rvert<M$ a.e. on E, moreover $$
\bigg|\int_Eg(x)dx\,\bigg|\leq M m(E)
$$
Now using the hypothesis
$$
\biggl|\int^{\frac{1}{n}}_{0} f(x)\,dx\biggr| \leq \biggl( \frac{1}{n} \biggr)^2 
\Rightarrow |f(x)| \leq \frac{1}{n} \ \ a.e. \ on \ \biggl[0,\frac{1}{n} \biggr) 
$$
$$\biggl|\int^{\frac{2}{n}}_{\frac{1}{n}} f(x)\,dx\biggr| \leq \biggl(\frac{1}{n}\biggr)^2  \Rightarrow |f(x)| \leq \frac{1}{n} \ \ a.e. \ on \ \biggl[\frac{1}{n},\frac{2}{n}\biggr) $$
and similarly
$$\biggl|\int^{1}_{\frac{n-1}{n}} f(x)\,dx\biggr| \leq \biggl(\frac{1}{n}\biggr)^2  \Rightarrow |f(x)| \leq \frac{1}{n} \ \ a.e. \ on \ \biggl[\frac{n-1}{n},1\biggr]$$
Hence,
$$ |f(x)| \leq \frac{1}{n} \ \ a.e. \ on \ [0,1]$$ we can let $n \rightarrow \infty$ which yields that $f=0$ almost everywhere on $[0,1]$.

REPLY [5 votes]: The Lebesgue differentiation theorem states that if $f$ is integrable, then $f(x) = \lim_{\epsilon \downarrow 0} {1 \over 2\epsilon} \int_{x-\epsilon}^{x+\epsilon} f(t) dt$ for ae. [$m$] $x \in [0,1]$. Since $| {1 \over 2\epsilon} \int_{x-. \epsilon}^{x+\epsilon} f(t) dt | \le { (2 \epsilon)^2\over 2 \epsilon} $, we see that $f(x) = 0$ ae. [$m$] $x \in [0,1]$.