Here we're talking about Riemann integrable real functions defined on $[a,b]$. Even though this is a simple question I didn't find it here, if it's duplicated I'm sorry...
I could prove this if $f$ was continuous, or $$ f\geq0 \rightarrow \int f\geq0. $$
Trying to prove this one I stucked in a point that if I could prove the following
if for every partition of $[a,b]$, $$ \inf \{f(x)|x\in[x_{t_i},x_{t_{i+1}}]\}=0 $$ for all intervals of the partition then $f=0$,
then I could prove the initial thing... But I couldn't do this neither. Anyone can help me with that?
This is also true in Lebesgue sense. We can prove it as follows: Let $A=\{x\mid f(x)>0\}$. For each $n\in\mathbb{N}$, let $A_n=\{x\mid f(x)\geq \frac{1}{n}\}.$ Note that $A=\cup_n A_n$. Since $A$ has non-zero measure, there exists $n$ such that $A_n$ has non-zero measure. Now $\int f \geq \int_{A_n} f \geq \frac{1}{n}m(A_n)>0$, where $m(A_n)$ denotes the Lebesgue measure of $A_n$.