# Continuous function, integral

Suppose that $f: [a,b] \rightarrow \mathbb{R}$ is continuous and $f(x) \geq 0$ for all $x \in [a,b]$. Prove that if $\int^b_a f(x)dx=0$, then $f(x)=0$ for all $x \in [a,b]$.
Attempt
I had attempted to do this problem by contradiction, except I did not understand how to finish the problem. I would appreciate a few helpful hints on this one.

## The Attempt at a Solution

Related Calculus and Beyond Homework Help News on Phys.org
You were right in the fact that a direct proof would be much to hard for this problem, but a contradiction is hard to come up with. See if you can prove it by contrapositive Suppose f(x) doesn't equal zero, however according to your givens it has to be greater than or equal to zero , then it follows f(x)>0. You should be able to apply some calculus knowledge here to help finish off this proof and save the day proving that the integral of f(x)dx from a to b is greater than zero as well thus making your contrapositive just and completing your informal proof.

Proof by contradiction is a good way to do this.

Suppose you have a continuous function f such that f(x) is nonnegative and the integral from a to b is 0 AND f(x) is NOT 0 everywhere on [a,b].

You should be able to run into a contradiction.

Hint: Since f is not 0, pick some c in [a,b] where f(c)>0. Let f(c) = w > 0. Then by continuity argue that for some interval around c, f(x) > w/2. Then make a rectangle under the graph.