# Negative integral on intervals implies negative function?

Let $f \in L^1([0,1])$ be such that for all $t \geq s$, $\displaystyle \int_s^t f(u)du \leq 0$. Is it true that $f\leq 0$ almost everywhere?

-

We will show that if $f$ is integrable and $\int_{(s,t)}f(u)du\geq 0$ for all $s<t$ then $f\geq 0$ almost everywhere. Let $A\subset [0,1]$ Borel measurable and $\varepsilon>0$. As $f$ is integrable, we can find $\delta>0$ such that is $B\subset [0,1]$ is measurable and $\lambda(B)\leq \delta$ then $\left|\int_Bf(u)du\right|\leq \varepsilon$. By regularity of $\lambda$, let $O$ open such that $A\subset O$ and $\lambda(O\setminus A)\leq\delta$. We can write $O=\bigsqcup_{j\geq 1}I_{j}$, where $I_j$ are pairwise disjoint intervals. This gives $$\int_A fd\lambda=\int_Ofd\lambda+\int_{O\setminus A}fd\lambda\geq \sum_{j\geq 1} \int_{I_j}fd\lambda-\varepsilon\geq -\varepsilon.$$ As $\varepsilon$ is arbitrary, we have for all $A$ Borel measurable that $\int_A fd\lambda\geq 0$. Now we apply this to $A=\{x, g(x)<-1/n\}$ for $g$ representing $f$.