# Mean Value Theorem for Integrals

Since $f$ is continous it attains its maximum and minimum.
This means there are $k_1,k_2$ so that $f(k_1)\leq f(x)\leq f(k_2)$.
Since $g(x)\geq 0$ multiplication does not reverse inequality, $f(k_1)g(x)\leq f(x)g(x)\leq f(k_2)g(x)$.
Now integrate both sides, this is possible since $g$ is continous.