Is the condition $ \intop_{a}^{b}f\left(s\right)ds=0 $ for any $ a,b \in \mathbb{R} $ enough to conclude that $f=0$ almost everywhere? Assume we have $ f:\mathbb{R}\to \mathbb{R} $,Riemann integrable in any closed interval, such that for any $ a,b \in \mathbb{R} $ the following condition holds $$ \intop_{a}^{b}f\left(s\right)ds=0 $$
Is it enough to conclude that $ f =0 $ almost evereywhere?
If so, how can we prove it? Is it trivial?
Thanks in advance.
 A: If we define the integral using the Riemann integral, then there is a nice elementary approach:
First restrict our attention to an interval $[L_1, L_2]$, and we have that for any $[a,b]$ contained in $[L_1, L_2]$, the integral of f is $0$
(1) Define $osc (a,  \delta) = \sup |f(x)-f(y)|$ such that $x,y$ are in $D_\delta(a)$ and define $osc(a)$ = $\lim _{\delta \rightarrow 0} osc (a,  \delta)$
(2) Prove that for any Riemann integrable function, $\{x: osc(x)>0\}$ is of measure $0$. Note that no advanced measure theory is needed for this statement. We will simply need that we can find open intervals of arbitrarily small total length which cover the set.
Hint: we simply need to show that for any given rational $q$, $\{x: osc(x)>q\}$ is of measure zero. As the rationals are denumerable, the result would then follow.
(3) Observe that $osc(x)=0$ implies that $f$ is continuous at $x$
(4) At the points where $f$ is continuous, clearly it must be zero, or we could construct an interval on which its integral was non zero.
(5) As the points of discontinuity were measure $0$, we are done.
Unfortunately, I only cover lebesgue integration next year in my course, so apologies if that isn't what you are looking for, but hopefully it is interesting :)
