$f=0$ almost everywhere be $G\subseteq \mathbb{R}$ a open set. Be $f:G\rightarrow \mathbb{R}$* measured and for all  interval $[a,b] \subseteq G$ to have that $f$ is lebesgue integrable function in $[a,b]$ and $\int_{a}^b f dm=0$. Show that $f=0$ almost everywhere.
I know that if for all set measured $A\subseteq E$, if $\int_{A}f=0$ so $f=0$ almost everywhere, I try to use this for the problem but dont work.
thanks
 A: $\newcommand{\d}{\ \mathrm d}$
Another way to approach this is by using the Lebesgue differentiation theorem (LDT).
Since $G$ is open, given $x\in G$, there is a $\delta\gt 0$ such that $(x-\delta, x+\delta)\subseteq G$. This says that for any $\delta\gt 0$, small enough, we can consider $\int_{x-\delta}^{x+\delta} f(t)\d m(t)$. Therefore
$$\begin{align*}
f(x) &= \lim_{\delta\to 0} \frac1{2\delta}\int_{x-\delta}^{x+\delta} f(t)\d m(t)\quad\text{a.e.} &&\text{by LDT}\\
&= \lim_{\delta\to 0} \frac1{2\delta}\cdot 0\quad\text{a.e.} &&\text{by your hypothesis}\\
&= 0\quad\text{a.e.}
\end{align*}$$
as we wanted.
A: Suppose $f(x) > \epsilon  >0$ on some $A \subseteq G$ such that $\mu (A) >0.$ Since $G$ is open, there exists open $U$ with $A \subseteq U \subseteq G.$ Note that $U$ can be written as the countable union of disjoint intervals $\displaystyle\bigcup_{n\in \mathbb{N}} I_n$ with each $I_n \subseteq G.$  Hence $\displaystyle\sum_{n=1}^{\infty} \displaystyle\int_{I_n} f d\mu = \displaystyle\int_U f d\mu  \ge \displaystyle\int_A f d\mu > \epsilon \cdot \mu (A) >0,$ a contradiction.
A: The Lebesgue measure is based on the borelian $\sigma$-algebra on $\mathbb{R}$. That means that measurable sets come as a limit of open and closed sets in terms of unions and intersections. That implies that for every measurable set $A$, there is a sequence of unions of intervals $I_n$ such that $\chi_{I_n}\to \chi_A$ pointwise. Because:
$$
\int_{I_n}fd\mu=\int \chi_{I_n}fd\mu
$$
then in each $A$ where the integral makes sense, there will be a 0 limit. And then you can use your argument. That works also for functions that are not necessarily positive.
A: Although this  is a very old problem in MSE, I would like to present yet another solution. It is enough to assume that $f$ is Borel-measurable.
Starting with any interval of the form $I_n:=[-n,n]$, consider the class $\mathcal{D}_n$ of (Borel) measurable sets $A\subset[-n,n]$ such that $\int_Af\,dm=0$.

*

*$\mathcal{D}_n$ contains $I_n$, and all intervals $[a,b]\subset[-n,n]$.

*$\mathcal{D}_n$ is a $d$-system, that is, if $A,\,B\in\mathcal{D}_n$ and $B\subset A$, then $A\setminus B\in\mathcal{D}_n$; if $\{A_m:m\in\mathbb{N}\}\subset\mathcal{D}_n$ and $A_n\nearrow A$, then $A=\bigcup_mA_m\in\mathcal{D}_n$.

*The collections of intervals $[a,b]\subset[-n,n]$ is closed under intersection (a $\pi$--system) and generate the collection $\mathscr{B}_n$ of all Borel measurable sets in $[-n,n]$.

It follows from Dynkin's theorem that $\mathcal{D}_n=\mathscr{B}_n$. In particular, $\{x\in[-n,n]:f>0\},\{x\in [-n,n]: f<0\}\in\mathcal{D}_n$ whence we conclude  that $f=0$ $m$-a.s. in $[-n,n]$.
This method has the advantage that it can be generalized to any ($\sigma$--finite) measure $m$ on $(\mathbb{R},\mathscr{B}(\mathbb{R}))$.
