Let $([0,1], \mathcal{B}([0,1]), \mu)$ be a measure space with Lebesgue measure $\mu$. Let $f\in L_1([0,1])$ and a fixed constant $b\in (0,1)$ so that $$ \int_B fd\mu=0 $$ for all $B\in \mathcal{B}([0,1])$ with $\mu(B)=b$. Show that $f=0$ $\mu$ a.e.
My proof is as follows: (that is different from Want to show that $f=0$ a.e.).
W.L.O.G, assume that for any open set $G$ with $\mu(G)=b$ we have $ \int_G fd\mu=0$.
Then for every $a\in \mathbb{R}$, we have $$\int_a^{a+b}f(x)dx=0$$
Then for every $c>0$ we have $$ \frac{1}{c}\int_a^{a+c}f(x)dx=\frac{1}{c}\int_{a+b}^{a+b+c}f(x)dx $$
As $c\to 0$, we get $f(a)=f(a+b)$ a.e. for $a\in \mathbb{R}$. Define $$E_n:=\{a\in\mathbb{R}: f(a)=f(a+b)=\dots=f(a+nb)\neq f(a+(n+1)b)\}$$ with $\mu(E_n)=0$ for $n\in\mathbb{N}$.
Let $S:=\mathbb{R}\setminus \cup_{n=1}^\infty E_n$. we have $$ \lim_{n\to\infty}\frac{1}{b/n}\int_a^{a+b/n}f(x)dx=f(a) $$ for all $a\in S\setminus\mathbb{Z}$.
Let $G=(a,a+b/n)\cup(a+b/n, a+2b/n)\cup\dots\cup (a+n-1, a+n-1+b/n)$. $G$ is open and $m(G)=1$. So $$ \int_G fd\mu=0=\frac{1}{b/n}\int_a^{a+b/n}f(x)dx\to f(a) $$
So $f(a)=0$ a.e. for every $a\in\mathbb{R}$.