$f: [0, 1] \rightarrow \mathbb{R}$ is a differentiable function such that $\int_{0}^{1} f(x)dx = \int_{0}^{1}xf(x)dx.$ Prove that there exists $c \in (0, 1)$ such that $f(c) = 2018\int_{0}^{c}f(x)dx$
My attempt:
$\int_{0}^{1} f(x)dx = \int_{0}^{1}xf(x)dx$
$\iff \int_{0}^{1}f(x)(x-1)dx = 0 \quad (*)$
Let $F(x)$ be an antiderivative of $f(x)(x-1)$.
$(*) \iff F(1) - F(0) = 0$
$\iff F(1) - F(0) = F(0) - F(0) = 0$
Let $G(x) = F(x) - F(0) = \int_{0}^{x}f(t)(t-1)dt$ and $H(x) = e^{-2018x}G(x)$
$F(x)$ is differentiable on $[0, 1]$, so $G(x)$ and $H(x)$ are also differentiable on $[0, 1].$
Since $G(1) = G(0) = 0$, we have that $H(0) = H(1) = 0$. By Rolle's theorem, there exists $c \in (0, 1)$ such that:
$H'(c) = 0$
$\iff -2018e^{-2018c}G(c) + G'(c)e^{-2018c} = 0$
$\iff -2018\int_{0}^{c}f(x)(x - 1)dx + f(c)(c-1) = 0$
$\iff 2018\int_{0}^{c}f(x)dx - f(c) = 2018\int_{0}^{c}xf(x)dx - cf(c)$
At this point, I'm stuck. I need to show that the $LHS = 0$ in order to get the desired outcome, but I have no idea how to proceed, and for some reason it seems I was approaching it the wrong way.
Please advise!
Let $$G(x) = e^{-2018x}\int_0^x f(t)dt\quad x\in(0,1)$$ $G$ is differentiable with $$G'(x)=e^{-2018x}\left(f(x)-2018\int_0^x f(t)dt\right)$$
so the goal is to find a $c\in(0,1)$ such that $G'(c)=0$. Rolle's theorem is a good candidate for that. We already have $G(0)=0$ so we need some $x_1 > 0$ such that $G(x_1)=0$ which is equivalent to $\int_0^{x_1} f(t)dt = 0$. Let's define $$H(x) = x\int_0^x f(t)dt - \int_0^x tf(t)dt$$ $H$ is differentiable with $$H'(x)=\int_0^x f(t)dt$$ so it's enough to find $x_1 \in (0,1)$ such that $H'(x_1)=0$. From the assumption we have $H(0)=H(1)=0$ and so the existence of such $x_1$ is immediate by Rolle's theorem.
Finally, we apply Rolle's theorem again, this time for $G$ in $[0, x_1]$, to get the required $c \in (0, x_1) \subseteq (0, 1)$.