Prove that $\int_{I}f=0 \iff$ the function $f\colon I\to \Bbb R$ is identically $0$. Let $I$ be a generalized rectangle in $\Bbb R^n$ 
Suppose that the function $f\colon I\to \Bbb R$ is continuous. Assume that $f(x)\ge 0$, $\forall x \in I$
Prove that $\int_{I}f=0 \iff$ the function $f\colon I\to \Bbb R$ is identically $0$. 

My idea is that
For $(\impliedby)$
Since $f\colon I\to \Bbb R$ is identically zero, $$f(I)=0$$
Then $$\int_{I}f=\int 0=0$$
For $(\implies)$,
Since $f$ is continuous, the function is integrable. 
i.e $\int _{I} f $ exists. 

I need the show that $\int f=0$ but how? 
Hopefully, other solution is true. Please check this. And how to continue this? Thank you:) 
 A: This may be only a minor variation on an earlier answer, but maybe it adds something.
Suppose there's some point $x_0$ where $f(x_0)>0$.  Let $\varepsilon=f(x_0)/2$.  Then by continuity, there is some $\delta>0$ such that for $x$ in the open interval with endpoints $x_0\pm\delta$, the distance between $f(x)$ and $f(x_0)$ is less than $\varepsilon$.  That means $f(x)>f(x_0)/2$ on that interval.  Hence
$$
\int_{x_0-\delta}^{x_0+\delta} f(x)\,dx > 2\delta\cdot\frac{f(x_0)}{2} = \delta f(x_0)>0.
$$
Maybe one reason I feel I ought to post this is that there is a question: intuitively, the statement that if a function is positive on an interval, then its integral over that interval is postive, seems obvious.  But how does one prove it without doing something like what I did above?  What I did gives a partition of the interval, $\{a,x_0-\delta,x_0+\delta,b\}$, where $a,b$ are the endpoints, for which the lower Riemann sum is positive.  Or if you like Lebesgue's definition, it gives a simple function dominated by $f$, whose integral is positive.
A: One direction is obvious. If $f$ is identically $0$, the integral is zero. Now suppose $f$ is continuous but not identically zero. Then there exists a point in $I$ such that $f(\xi)>0$. By continuity there exists a neighborhood of $\xi$ where $f(x)>0$ whenever $x\in(\xi-\delta,\xi+\delta)$. Can you take it from here?
Since $f\geqslant 0$, it follows that $$\int_I f \geq \int_{(\xi-\delta,\xi+\delta)} f>0$$
Thus, we have proven the contrapositive.
A: Suppose $f(x)>0$ for some $x\in I$, as $f$ is continuous $\exists\ \delta>0$ such that $\forall y\in B_\delta(x)\cap I$, we will have $f(y)>0$. Then, as $f(x)\ge 0$
$$\displaystyle\int_If\ge\displaystyle\int_{B_\delta(x)\cap I}f>0 \implies\text{contradiction}$$.
