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.



Here is a proof for the case $f > 0$.
Let $A$ satisfy $$ \int_0^A f(x) \, dx = \frac{1}{2}. $$ For every $a \leq A$, there exists a minimal point $\beta(a) > a$ such that $$ \int_a^{\beta(a)} f(x) \, dx = \frac{1}{2}. $$ Note that $\beta(0) = A$ and $\beta(A) = 1$.
Define $$ G(a) = \int_a^{\beta(a)} g(x) \, dx, $$ and notice that $$ G(0) + G(A) = \int_0^A g(x) \, dx + \int_A^1 g(x) \, dx = \int_0^1 g(x) \, dx = 1. $$ Therefore either $G(0) \geq 1/2 \geq G(A)$ or $G(0) \leq 1/2 \leq G(A)$. Either way, since $G$ is continuous, there must exist a point $a \leq A$ such that $G(a) = 1/2$. Taking $b = \beta(a)$, we obtain $$ \int_a^b f(x) \, dx = \int_a^b g(x) \, dx = \frac{1}{2}. $$