Olympiad calculus problem This problem is from a qualifying round in a Colombian math Olympiad, I thought some time about it but didn't make any progress. It is as follows.
Given a continuous function $f : [0,1] \to \mathbb{R}$ such that $$\int_0^1{f(x)\, dx} = 0$$ Prove that there exists $c \in (0,1) $ such that $$\int_0^c{xf(x) \, dx} = 0$$
I will appreciate any help with it.
 A: [Major edit to make the second part of the proof a lemma]
Define:
$$F(x) = \int_0^x{f(t)\, dt}$$
Then $F(0)=F(1)=0$, and $F'(x)=f(x)$
Integrating by parts, we see that:
$$\int_0^t{xf(x) \, dx} = t F(t) - \int_0^t{F(x)\, dx}$$
To prove the theorem, we must find a $c \in (0,1)$ such that:
$$ F(c) = {\frac{1}{c}}\int_0^c{F(x)\, dx}$$
This is shown with via the following:
Lemma: If $F$ is a continuous function on $[0,1]$ such that $F(0)=F(1)$ then there is a $c\in (0,1)$ such that:
$$ F(c) = {\frac{1}{c}}\int_0^c{F(x)\, dx}$$
Proof:
Define:
$$G(t) = {\frac{1}{t}}\int_0^t{F(x)\, dx}$$
$G(t)$ is continuous and defined on $[0,1]$ (the value at $t=0$ is defined as the limit, and is just $F(0)$ by the fundamental theorem of calculus.)
$G(t)$ is the average of $F(x)$ for $x\in(0,t)$, so $G(t)$ must have as an upper bound the upper bound of $F$.  That is, for all $t\in [0,1]$, $G(t)\leq \operatorname{max}_{x\in[0,1]} F(x).$
Since $F$ is continuous, there must be an $x_M \in [0,1]$ such that $F(x_M)= \operatorname{max}_{x\in[0,1]} F(x)$.  Then, setting $t=x_M$, we see that:
$$G(x_M)\leq \operatorname{max}_{x\in[0,1]} F(x) = F(x_M)$$
Similarly, we have that $G(t)\geq \operatorname{min} F(x)$, and thus, when $F(x_m) = \operatorname{min}_{x\in[0,1]} F(x)$, we have $G(x_m)\geq F(x_m)$.
So the continuous function $H(x)=G(x)-F(x)$ has the property that $H(x_M)\leq 0$ and $H(x_m)\geq 0$.  By the intermediate value theorem, there must be a $c$ between $x_m$ and $x_M$,  inclusive, such that $H(c)=0$, and hence $F(c)=G(c)$.
If we can find $x_m$ and $x_M$ in $(0,1)$ - that is, not on the boundary - then we know that $c\in (0,1)$ and we are done.
If both $x_m$ and $x_M$ are on the boundary, then the maximum and minimum of $F$ are equal, and thus $F$ is constant, and hence we can choose any $c$.
So assume that $F(0)=F(1)$ is the minimum value for $F$, and that $F$ does not take the minimum value anywhere else on $[0,1]$.  Then  $F(x)>F(1)$ for all $x\in(0,1)$, so we know that $G(1)>F(1)$.  So $H(1)>0$ and $H(x_M)\leq0$.  Hence, there must be a $c$ in $[x_M,1]$ with $H(c)=0.$  But $c\neq 1$, so we know that $c \in [x_M,1)\subset(0,1)$.
A: This is a streamlined version of Thomas Andrews' proof:
Put $F(x):=\int_0^x f(t)dt$ and consider the auxiliary function $\phi(x)={1\over x}\int_0^x F(t)dt$. Then $\phi(0)=0$, $\ \phi(1)=\int_0^1 F(t)dt=:\alpha$, and by partial integration one obtains
$$\phi'(x)=-{1\over x^2}\int_0^xF(t)dt +{1\over x}F(x)={1\over x^2}\int_0^x t f(t)dt\ .$$
The mean value theorem provides a $\xi\in(0,1)$ with $\phi'(\xi)=\alpha$. If $\alpha$ happens to be $0$ we are done. Otherwise we invoke $F(1)=0$ and conclude that $\phi'(1)=-\alpha$. It follows that there is a $\xi'\in(\xi,1)$ with $\phi'(\xi')=0$.
A: Let $G(x) = \int_{0}^{x} t f(t) \, \mathrm{d}t$, and suppose that $G(c) \neq 0$ for all $c \in (0, 1)$. Then by IVT, either

*

*(Case 1) $G > 0$ on $(0, 1)$, or

*(Case 2) $G < 0$ on $(0, 1)$.

However,
\begin{align*}
0
= \int_{0}^{1} f(x) \, \mathrm{d}x
= \int_{0}^{1} \frac{G'(x)}{x} \, \mathrm{d}x
= G(1) + \int_{0}^{1} \frac{G(x)}{x^2} \, \mathrm{d}x.
\end{align*}
This is $ > 0 $ in Case 1 and $ < 0$ in Case 2, a contradiction.
