TITLE: Suppose $f:[0,1] \Rightarrow \mathbb{R}$ is continuous and $\int_0^x f(x)dx = \int_x^1 f(x)dx$. Prove that $f(x) = 0$ for all $x$
QUESTION [8 upvotes]: Suppose $f:[0,1] \Rightarrow \mathbb{R}$ is continuous and $\int_0^x f(x)dx = \int_x^1 f(x)dx$. Prove that $f(x) = 0$ for all $x$.
So, I can intuitively see that this is true. My proof mostly makes sense, I think, but I'm not sure if it covers the case where there are negative and positive values in each segment, resulting in a mean value of 0, but still having nonzero values. Can someone tell me how to cover that, or how this does?
Suppose $f(x) \neq 0$ for all x $\in$ [0,1]. By the mean value theorem, there exist some c and d for which $f(c)(x) = f(d)(1-x) = \int_0^x f(x)dx$. Since x $\neq$ (1-x) for all x $\in$ [0,1], it follows that $f(c) = f(d) = 0$. Therefore, $f(x) = 0$ for all $x \in [0,1]$.

REPLY [5 votes]: Here is another line of attack:
Since $\int_0^x f(t)dt = \int_x^1 f(t)dt$, we also have $\int_0^y f(t)dt = \int_y^1 f(t)dt$, so subtracting gives
$\int_0^y f(t)dt-\int_0^x f(t)dt = \int_y^1 f(t)dt-\int_x^1 f(t)dt$, or
$\int_x^y f(t)dt = \int_y^x f(t)dt = -\int_x^y f(t)dt$.
In other words, $\int_x^y f(t)dt = 0$ for all $x,y$.
Since $f$ is continuous, if $f(x_0) \neq 0 $ for some $x_0$, then there is some interval $[a,b]$ containing $x_0$ for which $|f(x)| \ge \frac{1}{2} |f(x_0)|$ for all $x \in [a,b]$. If follows that $\int_a^b f(t)dt \neq 0$, a contradiction.