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.
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.