if $f$ is continuous, $f(x)\ge 0$ and $\int_a^bf(x)\ dx = 0$, then $f(x) = 0$ I need toprove that:
If $f$ is continuous, $f(x)\ge 0$ for all $x\in [a,b]$, and
$$\int_a^bf(x)\ dx = 0$$
then $f(x) = 0, x\in [a,b]$
using this definition of integrals, that is:
$$\underline{\int_{a}^b}f(x) dx =  \sup s(f, P)  = \sup \sum_{i=1, t_i \in P} m_i(t_{i}-t_{i-1})$$
where $m_i = \inf\{f(x), x\in [t_i, t_{i-1}]\}$
and
$$\overline{\int_{a}^b}f(x) dx =  \inf S(f, P)  = \inf \sum_{i=1, t_i \in P} M_i(t_{i}-t_{i-1})$$
where $M_i = \inf\{f(x), x\in [t_i, t_{i-1}]\}$.
And, $\int_a^b f(x) \ dx $ exists when the sup and inf integrals are equal, and its value is the value they take.
My reasoning is the following:
$$\int_a^b f(x) \ dx = 0 \implies \underline{\int_a^b} f(x) \ dx = 0 \implies$$
$$\sup \sum m_i(t_i-t_{i-1}) = 0$$
that is, the greatest value of the sum above is $0$, but since $f(x) \ge 0$, we must have that the sum above is $0$. This means that $m_i = 0$ in every interval $[t_i, t_{i-1}]$. For the $\overline{\int_a^b}$, we could think the same and arrive that $\inf \sum M_i (t_i-t_{i-1}) = 0 \implies M_i\ge 0$. But I don't know how to conclude that $f(x) = 0$, neither I know how to use the hypottesis that $f$ is continuous. 
Also, I'm asked to show an example where the discontinuity of $f$ will lead to a negation of what I need to prove.
 A: Suppose $f\ne 0$.Then, there is an $x_0\in [a,b]$ such that $f(x_0)=c>0$. As $f$ is continuous there is an interval $(a',b')\subseteq [a,b]$ that contains $x_0$ and is such that $f((a',b'))\subseteq (c/2,3c/2)$.
Let $P=\left \{ a,a',b',b \right \}$.Then $L(P,f)\ge \frac{c}{2}(b'-a')$ so that 
$\underline{\int_{a}^b}f(x) dx\ge \frac{c}{2}(b'-a')$. But $f$ is continuous so the integral exists and so we have now 
$\int_{a}^{b}f(x) dx\ge \underline{\int_{a}^b}f(x) dx\ge \frac{c}{2}(b'-a')>0$
which is a contradiction. 
A: Suppose, there is a $x_0 \in [a,b], f(x_0)>0$. Using the $\epsilon,\delta$-criteria we get that for $\epsilon = \frac{f(x_0)}{2}$ there is a $\delta >0$ so that
$f(x) > \frac{f(x_0)}{2} > 0$ for all $x \in ]x_0-\delta, x_0+\delta[$
Use this and your definition of the integral to get $\int_{a}^b f(x)dx > 0$.
Without continuity, you have this counterexample:
$f: [a,b] \to \mathbb{R}^{+}, x \mapsto \begin{cases}1 & x = (b-a)/2 \\ 0 & otherwise\end{cases}$
So $f \neq 0$ but $\int_a^b f(x) dx = 0$
A: Over any partition.
$\sum \inf (f(t_i)) (x_{i+1} - x_i) \le \int_a^bf(x) dx \le \sum \sup (f(t_i)) (x_{i+1} - x_i)$
since $f(x) \ge 0$ for all $x$ in $[a,b]$
$\sum \inf (f(t_i)) (x_{i+1} - x_i) \ge  0$
and $\int_a^bf(x) dx = 0$
$\sum \inf (f(t_i)) (x_{i+1} - x_i) =  0$ by the squeeze theorem.
If $f(x) > 0$ for some $x$ and $f(x)$ is continuous then there will exist a sub inteval such that 
$\inf (f(t_i)) > 0$ over that sub-interval 
and $\sum \inf (f(t_i)) (x_{i+1} - x_i) >  0$
If $f(x)$ is not continuous... $i.e.$
$f(x) = \begin{cases} 1 &x=0\\0 &x \ne 0\end{cases}$
then $\int_{-1}^{1}f(x) dx = 0$ yet $f(x)$ is not a constant function.
