TITLE: Show that there exist $[a,b]\subset [0,1]$, such that $\int_{a}^{b}f(x)dx$ = $\int_{a}^{b}g(x)dx$ = $\frac{1}{2}$
QUESTION [48 upvotes]: Let $f(x)$ and $g(x)$ be two continuous functions on $[0,1]$ and
 $$\int_{0}^{1}f(x) dx= \int_{0}^{1}g(x)dx = 1$$ 
Show that there exist  $[a,b]\subset [0,1]$, such that
 $$\int_{a}^{b}f(x) dx= \int_{a}^{b}g(x)dx = \frac{1}{2} $$
The question can be solved by considering the fundamental group of $S^1$, now I am wondering if we can solve it by real-analysis.
Here is the topological solution:
Assume that for any $[a,b]\subset[0,1]$, we always have
 $$(\int_{a}^{b}f(x) dx\neq \frac{1}{2}) \quad \vee \quad(\int_{a}^{b}g(x)dx \neq \frac{1}{2}) $$
Consider mapping
$$\phi:D\rightarrow\mathbb{E}^2\backslash\{(\frac{1}{2},\frac{1}{2})\},\,\,(x,y)\mapsto(\int_{y}^{x}f(t) dt,\int_{y}^{x}g(t) dt)$$
where $D=\{(x,y)|0\leq x\leq y\leq 1\}$.
Let $a$ be path from $(0,0)$ to $(0,1) $in $D$ and $b$ be path from $(0,1)$ to $(1,1) $in $D$, then $ab$ is a path from $(0,0)$ to $(1,1) $in $D$ and
$$\phi\circ (ab):[0,1]\rightarrow\mathbb{E}^2\backslash\{(\frac{1}{2},\frac{1}{2})\} $$
Notice that
$$(\phi\circ (ab))(0)=(\phi\circ (ab))(1)=(0,0)$$
so $\phi\circ (ab)$ is a loop based on $(0,0)$ in $\mathbb{E}^2\backslash\{(\frac{1}{2},\frac{1}{2})\}$.
For any $t\in [0,\frac{1}{2}]$, it's not hard to get that
$$(\phi\circ (ab))(t+\frac{1}{2})=(1,1)-(\phi\circ (ab))(t)$$
is equivalent to
$$(\phi\circ (ab))(t+\frac{1}{2})-(\frac{1}{2},\frac{1}{2})=-((\phi\circ (ab))(t)-(\frac{1}{2},\frac{1}{2}))$$
Define retraction 
$$r:\mathbb{E}^2\backslash\{(\frac{1}{2},\frac{1}{2})\}\rightarrow S^1,\quad (x,y)\rightarrow\ \frac{(x,y)-(\frac{1}{2},\frac{1}{2})}{||(x,y)-(\frac{1}{2},\frac{1}{2})||}$$
Then $r\circ \phi\circ (ab)$ is a loop on $S^1$, such that
$$(r\circ \phi\circ (ab))(t+\frac{1}{2})=-(r\circ \phi\circ (ab))(t),\quad\forall t\in [0,\frac{1}{2}]$$
So $<r\circ \phi\circ (ab)>$ is not trivial in $\pi_1(S^1)$. 
However, $ab$ is path homotopic to $c$ in $D$, where $c$ is the path between $(0,0)$ and $(1,1)$ in $D$. In this case, $r\circ \phi\circ (ab)$ is a point-path in $S^1$ by
$$(\phi\circ c)(t)=\phi(t,t)\equiv (0,0)$$
which leads to contradiction.

REPLY [3 votes]: OP's problem can be slightly generalized as follows: 

Let there be given two continuous functions $F_1,F_2:[0,1]\to \mathbb{R}$   with $$F_1(0)~=~0~=~F_2(0)\quad\text{and}\quad F_1(1)~=~1~=~F_2(1).\tag{1}$$ Define the 2-simplex/triangle 
  $$\Delta~:=~\{(x,y)\in\mathbb{R}^2| 0\leq x \leq y\leq 1\}.\tag{2}$$
  Define a function ${\cal F}=({\cal F}_1,{\cal F}_2): \Delta\to  \mathbb{R}^2$ by its components
  $${\cal F}_1(x,y)~:=~ F_1(y)-F_1(x)\quad\text{and}\quad{\cal F}_2(x,y)~:=~ F_2(y)-F_2(x).\tag{3}$$
  Then the statement is
  $$\exists (a,b)\in \Delta: ~~{\cal F}(a,b)~=~(\frac{1}{2},\frac{1}{2}).\tag{4} $$

It is natural to ponder if the point $(\frac{1}{2},\frac{1}{2})$ in the statement (4) can be replaced with another point [apart from the trivial points $(0,0)$ and $(1,1)$]? Simple counterexamples say no. We shall see in eq. (8) below that the point $(\frac{1}{2},\frac{1}{2})$ indeed is a special point.
Let $\alpha, \beta, \gamma:[0,1]\to \Delta$ be three curves along the boundaries of $\Delta$: 
$$\alpha(t)~:=~(0,t) ,\qquad \beta(t)~:=~(t,1) ,\qquad \gamma(t)~:=~(t,t), \qquad t~\in~[0,1]. \tag{5}$$
We calculate that
$${\cal F}\circ \alpha(t)~=~(F_1(t),F_2(t)), \qquad 
{\cal F}\circ \beta(t)~=~(1-F_1(t),1-F_2(t)), \qquad 
{\cal F}\circ \gamma(t)~=~(0,0), \tag{6}$$
and
$${\cal F}\circ \alpha(0)~=~(0,0)~=~{\cal F}\circ \beta(1), \qquad  {\cal F}\circ \alpha(1)~=~(1,1)~=~{\cal F}\circ \beta(0). \tag{7}$$
In particular, the average curve
$$ \frac{1}{2}\left\{ {\cal F}\circ \alpha(t) + {\cal F}\circ \beta(t)\right\}~=~(\frac{1}{2},\frac{1}{2}) \tag{8} $$
is a constant curve! To perform an indirect proof we next assume that the statement (4) is wrong. Eqs. (7) & (8) then imply that the ${\cal F}$-image of the concatenation $\alpha\#\beta$ is a loop around $(\frac{1}{2},\frac{1}{2})$ with odd winding number. This clashes with the fact that the two curves $\alpha\#\beta$ and $\gamma$ are homotopic, cf. OP's topologic proof. See user SmileyCraft's answer for proofs via Borsuk-Ulam theorem and Tucker's lemma.