Improper integral $\int_a^bf(x)dx$ is convergent and $g(x)\ge0$. If $\int_a^bg(x)dx=0$, show that $\int_a^bf(x)g(x)dx=0.$ Assume $f(x)\in\mathrm{C}[a,b),\lim_{x\to b}f(x)=+\infty$, $\int_a^bf(x)dx$ is convergent. And the non-negative function $g(x)$ on the interval $[a,b]$ is Riemann-integrable. If $\int_a^bg(x)dx=0$, show that
$$\int_a^bf(x)g(x)dx=0.$$
Since  $\int_a^bf(x)dx$ is an improper integral, the normal Integral mean value theorem can't work. How can I deal with it? 

Let $c \in (a, b)$. Since $f$ is continuous on $[a ,c]$, the supremum $M = \sup_{[a, c]} |f|$ is finite. Then
$$ \left| \int_{a}^{c} f(x)g(x) \, dx \right|
\leq \int_{a}^{c} |f(x) g(x)| \, dx 
\leq M \int_{a}^{c} g(x) \, dx
= 0 $$
and hence $\int_{a}^{c} f(x) g(x) \, dx = 0$. Therefore $\lim_{c \to b^-} \int_{a}^{c} f(x) g(x) \, dx = 0$ as well.
As you see, improper integrability of $f$ plays no role here. This proof works for arbitrary $f$ that is Riemann integrable on any $[a, c]$ for each $c \in (a, b)$.
(If measure theory is allowed here, then even more general statements are available as other users pointed out.)
