If $\int_{0}^{1}f=\int_{0}^{1}g=1$, then there exists an interval $I \subset [0,1]$ such that $\int_{I}f=\int_{I} g =\frac{1}{2}$ $f,g$ are integrable functions whose domain is $[0,1]$ and $\int_{0}^{1}f=\int_{0}^{1}g=1$. How do I show that there exists an interval $I$ such that $I \subset [0,1]$ and $\int_{I}f=\int_{I} g =\frac{1}{2}$?
It seems as if I should apply Brouwer's fixpoint theorem but I don't see how I could do that. 
I tried using the $\int_{I}(f-g)$ function but that didn't lead anywhere.
Could you help me?
 A: I know you said that $f$ and $g$ aren't necessarily non-negative, but here's a proof in the case that $f\geq 0$ (and $g$ is arbitrary).  Perhaps you can use the ideas for the general case?
Let $I = [0,1]$ for ease of notation.  Consider the map $\phi:I^2\rightarrow \mathbb{R}^2$ with $\phi(x,y) = \left( \int_x^y f(t)-g(t)\; dt, \int_x^y f(t)\; dt - \frac{1}{2}\right)$.  Note that $\phi(x,y) = 0$ iff $I =[x,y]$ or $[y,x]$ solves your problem.
Assume for a contradiction that $\phi(x,y)\neq (0,0)$ for all $x,y\in I$.  Then define $\psi:I^2\rightarrow S^1$ by $\psi(x,y) = \frac{\phi(x,y)}{|\phi(x,y)|}$.  This is well defined because $\phi(x,y)\neq (0,0)$ by assumption.
Now, consider $\psi|_{\partial I^2}:\partial I^2\rightarrow S^1$ (where I'm imagining I've chosen a homeomorphism $\partial I^2\cong S^1$).  This map has degree $0$ since extends to $I^2$.
On the other hand, we will now show the degree is non-zero.  This contradiction will establish that $\phi(x,y) = (0,0)$ for some $(x,y)$, giving you your desired interval.
First, a direct computation establishes that $\psi(1,0)=\psi(0,0) =\psi(1,1)= (0,-1)$ and $\psi(0,1) = (0,1)$.
Let $\ell_i$ for $i=1$ to $4$ denote the four sides of $I^2$, with $\ell_1$ connecting $(0,0)$ to $(1,0)$, and rest proceeding counterclockwise.
Along $\ell_1$, we have $\phi(x,0) = \left( \int_x^0 f(t)-g(t)\; dt, \int_x^0 f(t)\; dt - \frac{1}{2}\right).$  Because $f\geq 0$, the second component of $\phi(x,0)$ is always negative.
In particular $\psi|_{\ell_1}$ has image in the third and 4th quadrant.  So, the closed curve $\psi|_{\ell_1}$ can be homotoped to a constant without the homotopy every hitting $(0,0)$.
Along $\ell_2$, we have $\phi(1,y) = \left(\int_1^y f(t)-g(t)\; dt, \int_1^y f(t)\; dt - \frac{1}{2}\right)$.  Again, the second coordinate is always negative since $f\geq 0$.  So, as before, the closed curve $\psi|_{\ell_2}$ can be homotoped to a constant without the homotopy ever hitting $(0,0)$.
Along $\ell_3$, we have $\phi(x,1) = \left(\int_x^1 f(t)-g(t)\; dt, \int_x^1 f(t)\; dt - \frac{1}{2}\right)$.  This time, $\psi|_{\ell_3}$ is not a closed curve.  But the second coordinate is decreasing in $x$.  This means that $\psi|_{\ell_3}$ is homotopy rel end points to an arc connecting $(0,1)$ and $(0,-1)$.
Along $\ell_4$, we have $\phi(0,y) = \left( \int_0^y f(t)-g(t)\; dt, \int_0^y f(t)\; dt - \frac{1}{2}\right)$.  As before, since $f\geq 0$, the second coordinate is monotonically increasing, so $\psi|_{\ell_4}$ is homotopy rel end points to an arc connecting $(0,1)$ to $(0,-1)$.
To finish the proof, we show that the two arcs coming from $\ell_3$ and $\ell_4$ pass by different sides of $(0,0)$, proving that $\psi_{\partial I^2}$ has degree $\pm 1$.
So, fix an $x_0$ for which $\psi|_{\ell_3}(x_0,1)$ has second coordinate $0$, that is, for which $\int_{x_0}^1 f(t)\; dt = \frac{1}{2}$.  Since $\psi(x_0,1)\neq (0,0)$ (since $\psi(x,1)\in S^1$), the first coordinate of $\psi(x_0,1)$, $\int_{x_0}^1 f(t) - g(t)\; dt$, must be non-zero, so is positive or negative.  Let's assume it's positive, the other case being analogous.
Note that if $x_1$ is any other value for which $\psi(x_1,1)$ has vanishing second coordinate, then the sign of the first coordinate must be positive as well.  Indeed, along the interval $[x_1,x_0]$ or $[x_0,x_1]$, $\psi(x, 1)$ has vanishing second coordinate (since the second coordinate is monotonic in $x$), and since the first coordinate of $\psi(x, 1)$ is nonvanishing on $[x_1,x_0]$, it must have the same sign on both end points.
Now, consider the point $(0,x_0)\in \ell_4$.  The second coordinate of $\psi(0,x_0)$ is $\int_0^{x_0} f(t)\; dt - \frac{1}{2}$.  But since $\int_{x_0}^1 f(t)\; dt  = \frac{1}{2}$ and $\int_0^1 f(t)\; dt = 1$, it follows that $\int_0^{x_0} f(t)\;dt = \frac{1}{2}$ as well.
Then the first coordinate of $\psi(0,x_0)$ is $\int_0^{x_0} f(t)-g(t)\; dt$.  We already know that $\int_{x_0}^1 f(t) - g(t)\; dt$ is positive, and that $\int_0^1 f(t) - g(t)\; dt = 0$.  It follows that $\int_0^{x_0} f(t) - g(t)\; dt$ is negative.  Thus, the arc coming from $\ell_4$ goes on the opposite side of $(0,0)$ as the arc coming from $\ell_3$.  Thus, $\psi|_{\partial I^2}$ has degree $\pm 1$, giving our contradiction.
A: Strictly increasing continuous functions $[0, 1] \to [0, 1]$ that
fix $\{0, 1\}$ form a group under composition.
If $f$ is strictly positive on $(0, 1),$ let $\varphi$ be the
inverse of $t \mapsto \int_0^tf,$ so that $\int_0^{\varphi(x)}f = x$
($0 \leqslant x \leqslant 1$). Define:
$$
h(x) = \left(\int_0^{\varphi(x)}g\right) - x
\quad (0 \leqslant x \leqslant 1).
$$
Then $h$ is continuous, and $h(0) = 0 = h(1).$
By the Universal Chord Theorem (see e.g.
here,
here,
here),
there exists $c \in [0, \frac12]$ such that $h(c) = h(c + \frac12).$
Therefore:
$$
\int_{\varphi(c)}^{\varphi\left(c + \tfrac12\right)}g =
\int_0^{\varphi\left(c + \tfrac12\right)}g - \int_0^{\varphi(c)}g =
\frac12 = \int_{\varphi(c)}^{\varphi\left(c + \tfrac12\right)}f,
$$
so we can take $I = \left(\varphi(c),
\varphi\left(c + \frac12\right)\right).$
Essentially the same proof works when $\frac12$ is replaced by
$\frac1n,$ where $n$ is any positive integer. Also, essentially the
same idea gives an easy proof of the conjecture Must a curve
$\eta \colon [a, b] \to \mathbb{R}^2$ intersect the curves
$\eta + \frac{\eta(b) - \eta(a)}{n}$ ($n \geqslant 1$)?
in the special case where the curve $\eta$ is parameterised by its
$x$ coordinate.  If there were a general proof of that conjecture,
then there would almost be a general answer to the present question,
i.e. one that doesn't require $f$ to be strictly positive on $(0, 1).$
Define:
$$
\eta \colon [0, 1] \to \mathbb{R}^2, \
t \mapsto \left(\int_0^tf, \int_0^tg\right),
$$
and take $n = 2$ in the conjecture. The conclusion is that
there exist $p, q \in [0, 1]$ such that
\begin{gather*}
\left(\int_0^pf, \int_0^pg\right) + \left(\frac12, \frac12\right) =
\left(\int_0^qf, \int_0^qg\right), \\
\text{i.e. } \left(\int_p^qf, \int_p^qg\right) =
\left(\frac12, \frac12\right).
\end{gather*}
All we need now is a reason to assert that $p < q;$ and then we
can take $I = [p, q].$
Thus, there are strong grounds to conjecture that the proposition in
this question holds when the target value of $\frac12$ for the
integrals of $f$ and $g$ is replaced by $\frac1n,$ where $n$ is any
positive integer (the case $n = 1$ being trivial, of course), and
that it does not hold when $\frac12$ is replaced by any other
value in $(0, 1).$
