TITLE: $\int_0^1f(x) dx =0$, $\int_0^1xf(x) dx =0$. How to show that f has at least two zeros?
QUESTION [5 upvotes]: $f:[0,1]\to \mathbb{R}$ is a countinous function.
$$\int_0^1f(x) dx =0 \qquad \mbox{ and } \qquad \int_0^1xf(x) dx =0. $$
If $f \ge 0$ ($f\le0$) were true then $\int_0^1f(x) dx \ge0$ ($\int_0^1f(x) dx \le0$). This is a contradiction, we can conclude that $f$ changes sign. By intermediate value property there exist a point $c$ such that $f(c)=0$. This is the first zero.
By using mean value theorems for integrals I can also show that a zero does exist. I can't show that these zeroes are different from each other.
How to show a second zero exists?

REPLY [2 votes]: The given constraints ensure $\int_{0}^{1}(x-k)f(x)\,dx = 0$ for any k.
So, let us assume that $f(x)$ has a unique zero at $x_0\in(0,1)$. Up to replacing $f$ with $-f$, we may as well assume that $f(x)<0$ over $[0,x_0)$ and $f(x)>0$ over $(x_0,1]$. In such a case both
$$ \int_{0}^{x_0}(x-x_0)f(x)\,dx\qquad \text{and}\qquad \int_{x_0}^{1}(x-x_0)f(x)\,dx $$
are positive, hence their sum $\int_{0}^{1}(x-x_0)f(x)\,dx$ cannot be zero, contradiction.

It is worth mentioning that this gives a rather powerful criterion for
root detection, which is the core of the celebrated result of Conrey,
giving the $40\%$ of RH: if for some non-negative weight function
$\omega(x)$ all the moments $$ M_k = \int_{0}^{1}x^k f(x)\omega(x)\,dx
 $$ are (approximately) zero up to $k=n$, then $f(x)$ has at least $n$ zeroes in
$[0,1]$.