Distinct roots for a continuous function with $\int^{1}_{0}{f(x)}\text{d}x=\int^{1}_{0}{xf(x)}\text{d}x=0.$ Let $f:\left[0,1\right] \to \mathbb{R}$ be a continuous function and $$\int^{1}_{0}{f(x)}\text{d}x=\int^{1}_{0}{xf(x)}\text{d}x=0.$$ Prove that $f$ has at least two distinct roots.
What can I say it is that if $f$ is continuous and $\displaystyle \int^{1}_{0}{f(x)}\text{d}x=0$ will result that $f$ has a root which belongs to $\left(0,1\right)$.
From this point my idea is going down.
 A: HINT:
Let $c\in (0,1)$ so that $f(c)=0$. Use $\int_0^1 (x-c) f(x) dx = 0$.
Added: In general, if $\int_{0}^{1}f(x) x^k dx = 0$ for $0\le k \le n$ then $f$ has at least $n+1$ (distinct) zeroes in $(0,1)$. Use induction. Assume true for $n-1$. So $f$ has at least $n$ zeroes $0< a_1< a_2 < \ldots a_n < 1$. Assume that $f$ has constant sign on each of the interval $(0, a_1)$, $(a_1, a_2)$, $\ldots$, $(a_n, 1)$. Now, there is a product of the form $\pm (x-a_{i_1})(x-a_{i_2})\cdots(x-a_{i_l})$ that has the same sign as $f$ on these intervals. Therefore,
$$\pm \int_0^1 f(x)(x-a_{i_1})(x-a_{i_2})\cdots(x-a_{i_l})>0$$ contradiction.
$\bf{Added:}$ Say we have $f$ a continuous function on $[a,b]$ with exactly $n$ distinct zeroes in $[a,b]$, call them $a_1 < a_2 < \ldots$. Then on each interval $[a, a_1)$, $(a_1, a_2)$, $\ldots$, $(a_n, b]$ the function $f$ has a constant sign. These signs may or may not change from interval to interval. Let's just mark the position where there are changes of sign between them. Then we get a product $f \cdot (x-a_{i_1}) \cdots (x-a_{i_l})$ that has constant sign on the union of these open intervals, so  the integral of the above is not $0$.
