# Show that the integral of the product of a continuous and integrable function can be expressed purely in terms of the integrable function

Suppose that $$f:[a,b]\rightarrow R$$ is continuous and $$g:[a,b]\rightarrow R$$ is integrable and such that $$g(x) \ge 0$$ for all $$x \in [a, b]$$. Prove that there is a number $$c$$ in $$[a,b]$$ such that

$$\int_{a}^{b}f(x)g(x)dx = f(c)\int_{a}^{b}g(x)dx$$

My proof:

Consider $$F(x) =f(x)\int_{a}^{b}g(x)dx$$, $$F$$ is continuous since it's a scalar multiplication of $$f$$. Moreover, $$m\int_{a}^{b}g(x) \le \int_{a}^{b}f(x)g(x)dx\le M\int_{a}^{b}g(x)$$, if $$m\le f(x)\le M$$ (by extremum value theorem).

The statement follows by an application of Intermediate value theorem on $$F$$.

I suspect that my proof is flawed since I didn't use $$g(x)\ge 0$$ in my proof (at least not explicitly). Could you please check my attempt and give me hints to why it's flawed? I prefer hints to complete solutions.

• Why is $m \int_a^b g(x)\,dx \leqslant \int_a^b f(x)g(x)\,dx$? Aug 18 '20 at 21:18
• It's because $m \le f(x) \le M$ on the interval $[a,b]$ and if $f(x) \le g(x)$, then $\int f(x) \le \int g(x)$. Aug 18 '20 at 21:22
• So why is $m g(x) \leqslant f(x)g(x)$? Aug 18 '20 at 21:23
• @DanielFischer Ahhh. Thank you! Aug 18 '20 at 21:23