Mean Value Theorem for Integrals/Generalization

Theorem
Let $f$ and $g$ be continuous real functions on the closed interval $\closedint a b$ such that:
 * $\forall x \in \closedint a b: \map g x \ge 0$

Then there exists a real number $k \in \closedint a b$ such that:


 * $\displaystyle \int_a^b \map f x \, \map g x \rd x = \map f k \int_a^b \map g x \rd x$