$ \int_0^x f(t)dt=\int_0^{ax}f(t)dt+ \int_0^{bx}f(t)dt$ implies $f$ constant Let $a,b \in (0,1)$ be such that $a+b=1$ and $f:[0,1] \to \mathbb R$ be a continuous function such that $ \int_0^x f(t)dt=\int_0^{ax}f(t)dt+ \int_0^{bx}f(t)dt$. We have to prove that $f$ is constant.
Using the derivative, we get:
$f(x)=af(ax)+bf(bx)$ 
I did the case $a=b=1/2$, but I don't know how to make it with $a,b$ arbitrary and $a,b \in (0,1)$ $a+b=1$
 A: Since $f$ is continuous, for each $\epsilon>0$, there exists $\delta>0$ such that  $$0\le t\le \delta \implies |f(t)-f(0)|\le \epsilon.$$ Recursively, we have that
$$\begin{align*}
f(x)&=af(ax)+bf(bx)
\\&=a^2f(a^2x)+2abf(abx)+b^2f(b^2x)
\\&=\cdots
\\&=\sum_{i=0}^n \binom{n}{i}a^ib^{n-i} f(a^ib^{n-i}x).
\end{align*}$$ Note that since $\max\{a,b\}<1$, it holds $a^i b^{n-i}x\le \max\{a,b\}^n x\le \delta$ for all $0\le i\le n$ for sufficiently large $n$, which implies
$$\begin{align*}
|f(x)-f(0)|&\le \sum_{i=0}^n \binom{n}{i}a^ib^{n-i} |f(a^ib^{n-i}x)-f(0)|\\&\le \sum_{i=0}^n\binom{n}{i}a^ib^{n-i}\epsilon
\\&=(a+b)^n\epsilon=\epsilon,
\end{align*}$$ by the binomial theorem. Since $\epsilon>0$ was arbitrary, we have $f(x)=f(0)$ for all $x$ as desired.
A: Let $f$ attain its minimum at $c$. Then $f(c) =af(ac)+bf(bc) \geq af(c)+bf(c)=f(c)$. Equality must hold throughout and we get $f(ac)=f(c)$. Iterating and taking limit we get $f(c)=f(0)$. Similarly the maximum value of $f$ is also $f(0)$ . Hence $f$ is a constant.
A: You've already determined that
$$f(x)=af(ax)+bf(bx) \tag{1}\label{eq1}$$
Assume the function $f$ is not constant. Since it's a continuous function on a closed set, the Extreme value theorem states that

$f$ must attain a maximum and a minimum, each at least once.

Choose the largest value of $x \le 1$ that is an extrema point, i.e., maximum or minimum, and call it $x_1$. Note since $f(0)$ can't be both the minimum & maximum, that $x_1 \gt 0$. Assume initially it's a maximum. By continuity and that there is a minimum point $\lt x_1$, we can choose a point $0 \lt x_2 \lt x_1$ where $f(x_2) \lt f(x_1)$. Next, note that
$$f(x_1) = af(x_1) + (1 - a)f(x_1) \tag{2}\label{eq2}$$
Let $a = \frac{x_2}{x_1}$, so $ax_1 = x_2$. Also, let $bx_1 = x_3$. Using this along with $x = x_1$ and $b = 1 - a$ in \eqref{eq1} gives
$$f(x_1) = af(x_2) + (1 - a)f(x_3) \tag{3}\label{eq3}$$
Next, \eqref{eq2} - \eqref{eq3} gives
$$0 = a(f(x_1) - f(x_2)) + (1 - a)(f(x_1) - f(x_3)) \tag{4}\label{eq4}$$
Since $a \gt 0$, $f(x_1) - f(x_2) \gt 0$ and $1 - a \gt 0$, this means that $f(x_1) - f(x_3) \lt 0$, i.e., $f(x_3) \gt f(x_1)$. However, $f(x_1)$ was the maximum, so this is not possible. Thus, in this case, the original assumption of $f$ not being constant must be false. You can repeat basically the same arguments for the case where $f(x_1)$ is a minimum instead to show that, overall, $f$ must be a constant function.
