How to prove this mean value property$\int_a^b f(t)g(t)dt=f(x)\int_a^b g(t)dt$? Suppose $f$ and $g$ are continuous functions on $[a,b]$ and that $g(x)\ge 0$ for all $x\in[a,b]$. Prove that there exists $x$ in $[a,b]$ such that 
$$\int_a^b f(t)g(t)dt=f(x)\int_a^b g(t)dt$$
I think I need to do something with this theorem:
Intermediate Value Theorem for Integrals
If $f$ is a continuous function on $[a,b]$ then for at least one $x$ in $[a,b]$ we have 
$$f(x)=\frac{1}{b-a} \int_a^bf$$

Let $m = \min \{f(x): x \in [a,b]\}$ and $M = \max \{f(x): x \in [a,b]\}$.
First let us assume that $\displaystyle \int_a^b g(x)dx > 0$. Then we have that $$m \leq \dfrac{\displaystyle \int_a^b f(x) g(x) dx}{\displaystyle \int_a^b g(x)dx} \leq M$$
Now use intermediate value theorem to get what you want.
If $\displaystyle \int_a^b g(x) dx = 0$ and since $g(x) \geq 0$ and is continuous, we have that $g(x) = 0$ on $[a,b]$. Hence, $$\displaystyle \int_a^b f(x) g(x) dx = \displaystyle \int_a^b g(x)dx =0$$ Hence, $$\displaystyle \int_a^b f(x) g(x) dx = f(t) \displaystyle \int_a^b g(x)dx $$
for any $t \in [a,b]$.
