Zero integral of measurable $f$ on every interval implies $f=0$? Let $f:\mathbb{R} \rightarrow \mathbb{R}$ be a Borel measurable function, such that $\displaystyle \int_{a}^{b}f(x)dx=0$ for every $a<b$ in $\mathbb{R}.$ Is it true that $f(x)=0$ for every $x\in \mathbb{R}$?
Comments: the starting point of this is to prove that the (Borel measurable) density function $f$ (if exists) of a symmetric random variable $X$ (meaning that $X,~-X$ have common cdf's) is even. If my question has a positive answer, it follows easily. 
Thanks a lot for any comments!
 A: The mosquito-nuking solution: the integral defines a signed measure on $\Bbb R$:
$$\mu(A) = \int_A f = 0.$$
(the $ = 0$ can be proved easily)
By the a.e. uniqueness of the Radon–Nikodym derivative, $f = 0$ a.e.
A: Consider the Borel measure $\mu(A)=\int_Af$. We have
$$
\mu(A)=\inf\sum_{n=1}^\infty\int_{I_n}f,
$$
where the infimum is taken over all countable covers of $A$ by intervals $I_n$. So $\mu(A)=0$ for every $A$. Now it suffices to consider the Borel sets where $f>0$ and where $f<0$.
A: You need to assume that $f$ is locally integrable (or that $f\ge0$) for this to make sense.
Supposing that: It follows by DCT (or MCT) that $\int_V f=0$ for every bounded open set $V$, since any such $V$ is a countable disjoint union of open intervals. Hence $\int_K f=0$ for every compact $K$, since $K=V_1\setminus V_2$ where $V_1$ and $V_2$ are bounded open sets with $V_2\subset V_1$.
Now assume $f$ is real-valued. Let $E_n=\{x:f(x)>1/n\}$. If $m(E_n)>0$ then there exists a compact $K\subset E_n$ with $m(K)>0$, and hence $\int_K f>0$, contradicting the above. So $m(E_n)=0$. So the union of the $E_n$ has measure zero, hence $f\le 0$ almost everywhere. Similarly $f\ge0$ almost everywhere.
