TITLE: Riemann Integration Problem
QUESTION [6 upvotes]: Let $f$ be a continuous function on $[0,1]$ satisfying $$\int_0^1f(x)\,dx = 0$$
and $$\int_0^1xf(x)\,dx = 0.$$ Show that there exists $a$,$b$ in $[0,1]$ with $a < b$, 
such that $f(a) = 0 =f(b)$.
Existence of one point is clear to me but I cannot prove the existence of the other one.
Thanks for any help.

REPLY [7 votes]: If there was only one root $a$, unless $f$ is identically zero $f$ would have to change signs at $a$ in order for $\displaystyle\int^1_0 f(x) dx=0$ to hold. Hence $(x-a)f(x)$ doesn't change sign and is not identically zero, so $\displaystyle\int^1_0 (x-a) f(x) \neq 0,$ contradicting the hypothesis.