Suppose that g: [2,8] --> R is continuous in [2,8] and g(x) greater than or equal to 0 for all x in [2,8].
Prove that if the integral from 2 to 8 of g dx =0, then g(x) =0 for all x in [2,8]
This is a special case of a more general theorem.
Theorem: Let $\displaystyle f:[a,b]\to \mathbb{R}$ be a continous function with $\displaystyle f\geq 0$ and $\displaystyle \smallint_a^b f =0$ then $\displaystyle f=0$.
Proof: Assume by contradiction that there is a point $\displaystyle x_0 \in (a,b)$ so that $\displaystyle f(x_0) = 0$. The reason why we can ignore the endpoints is because if it was the case that $\displaystyle f(x) = 0$ on $\displaystyle (a,b)$ and $\displaystyle f(a),f(b)\not = 0$ then that would make $\displaystyle f$ non-continous at either $\displaystyle a$ or $\displaystyle b$. Now if $\displaystyle f(x_0)\not = 0$ then there is a $\displaystyle \delta > 0$ so that on $\displaystyle [x_0 - \delta,x_0+\delta]\subseteq [a,b]$ we have $\displaystyle f\not = 0$ i.e. $\displaystyle f > 0$. Since $\displaystyle f$ is continous on this closed subinterval it means it attains a mimimum $\displaystyle m>0$. Now define the function $\displaystyle g:[a,b]\to \mathbb{R}$ in the following way: if $\displaystyle x\in [x_0-\delta,x_0+\delta]$ then $\displaystyle g(x) = m$ otherwise $\displaystyle g(x) = 0$. Note $\displaystyle g$ is integrable. It follows that $\displaystyle \smallint_a^b g \leq \smallint_a^b f \implies 2m\delta \leq \smallint_a^b f$.
But $\displaystyle 2m\delta > 0$ would would mean $\displaystyle \smallint_a^b f > 0$ a contradiction.