Let $f[a,b]: \mathbb R \rightarrow\mathbb R$ be a (Riemann) integrable function such that $f \geq0$ and $\int_{a}^{b}f = 0$. Verify with counterexamples that the sentence aforementioned conditions do not imply $f\equiv 0$.
I couldn't think of any functions except for the case when $a = b$, which is trivial. More than some counterexamples, I'd like to know how to be able to think on a number of them by myself, I mean, which I ideas should I hold on to in this particular exercise.