In the context of a measure space $(X,M, μ)$, suppose $f$ is a bounded measurable function with $a \leq f(x) \leq b$ for $\mu$-a.e. $x \in X$. Prove that for each integrable function $g$, there exists a number $c \in [a, b]$ such that $\int_X f|g| d\mu = c\int_X |g| d\mu$
I tried to use the Intermediate value theorem for integral of Riemann but i had no idea. Somebody have any tip?