TITLE: Measurable functions with the same integral over a set
QUESTION [8 upvotes]: Suppose $f:\mathbb R \to \mathbb R,g:\mathbb R \to \mathbb R $ are Lebesgue measurable with $\int_{\mathbb R}f(x)=\int_{\mathbb R}g(x)=1$.
How to show that for every $r\in(0,1)$, there is a measurable $E \subset \mathbb R$ such that $\int_{ E}f(x)=\int_{ E}g(x)=r$?

REPLY [4 votes]: In the special case $f\ge 0$, $g\ge 0$, this follows from a theorem of Lyapunov stating that the range of a vector measure is convex.  In the present context this means that the set $R:=\{(\int_E f(x)\,dx,\int_E g(x)\,dx): E\in{\mathcal L}\}$ is a convex subset of $[0,1]^2$. (Here ${\mathcal L}$ denotes the $\sigma$-algebra of Lebesgue measurable subsets of the real line.) Since $R$ clearly contains $(0,0)$ and $(1,1)$, it contains the segment connecting them. Therefore  for each $r\in(0,1)$ the point $(r,r)$ is an element of $R$, and so there exists $E\in{\mathcal L}$ with $\int_E f=\int_E g = r$.