TITLE: The existence of $a,b$ such that $\int_a^b f(x)dx=\int_a^b g(x)dx=1/2$.
QUESTION [7 upvotes]: Let $f,g$ be Riemann integrable on $[0,1]$ such that $\int_0^1 f=\int_0^1 g=1$. Show that there exists $0\leq a<b\leq 1$ such that $\int_a^b f=\int_a^b g=\frac{1}{2}$.
If there is only one function $f$, it is easy. What about two functions?

REPLY [2 votes]: Denote by $u(a)$ the (smallest) number in $(0,1)$ such that $\int_a^{u(a)} f=1/2$. Use $v(a) $ for the analogous function with $g$. We can clearly define these for  $a=0$. We then extend these to functions $u:[0,b] \to \mathbb{R}$ and $v:[0,c] \to \mathbb{R}$ where $b=u(0)$ and $c=v(0)$. 
Note that $u, v$ are increasing. 
If $u(0)=v(0)$ we are done. Suppose not. 
Suppose WLOG that $u(0)<v(0)$. We have $\int_{u(0)}^{1} f=1/2=\int_{v(0)}^1g$. Therefore $u(b)=v(c)=1$. Since $b<c$ and $u, v$ are increasing, $u(b) \geq v(b) $.
By the intermidate value theorem, there is a point $a\in (0,b)$ at which $u(a) = v(a) $. By definition of $u, v$ we are done.