Mean Value Theorem for Integrals/Generalization

Theorem
Let $f$ and $g$ be continuous real functions on the closed interval $\left[{a \,.\,.\, b}\right]$ such that:
 * $\forall x \in \left[{a \,.\,.\, b}\right]: g \left({x}\right) \ge 0$

Then there exists a real number $k \in \left[{a \,.\,.\, b}\right]$ such that:


 * $\displaystyle \int_a^b f \left({x}\right) g \left({x}\right) \rd x = f \left({k}\right) \int_a^b g \left({x}\right) \rd x$