u just show the upper riemann sum=lower riemann sum=0 ( by integrale)
therefore, sup f=inf f=0
This doesn't work for $\displaystyle
f:x \mapsto \begin{cases} 0 &\mathrm{if}\,\,0\leq x<1 \\ 1& \mathrm{if}\,\, x=1\\ \end{cases}$ since one has $\displaystyle f\neq 0$ but $\displaystyle \int_0^1|f(x)|\,\mathrm{d}x=0$.