# Real Analysis-Mean Value Theorem for Integrals

Let $f$ be a continuous real-valued function on $[a,b]$,$g\in{\Re}[a,b]$ with $g(x)\geq0$ for all $x\in[a,b]$. Prove that there exists $c\in[a,b]$ such that

$\int^b_af(x)g(x)dx=f(c)\int^b_ag(x)dx$

I have tried using the mean value theorem for intergrals, but I am either am not seeing the next step or am just leading myself down a rabbit hole. I have many attempts, but for the sake of typing I will ommit them due to me not having a great latex background. Am I correct in applying this theorem to the problem? Any ideas or advice would be appreciate. Thanks in advance.

(P.S. the $\Re$ represents Reimann Intergrable Interval I only state this to avoid confusion)

## 1 Answer

We have that $\int_a^b (\inf_{t \in [a,b]}f(t))g(x) dx \leq \int_a^b f(x)g(x)dx \leq \int_a^b (\sup_{t \in [a,b]}f(t))g(x) dx$

Hence, $(\inf_{t \in [a,b]}f(t)) \leq \frac{\int_a^b f(x)g(x)dx}{\int_a^b g(x)dx} \leq (\sup_{t \in [a,b]}f(t))$. Hence, by the Intermediate Value Theorem, there exists a $c \in [a,b]$ such that $f(c) = \frac{\int_a^b f(x)g(x)dx}{\int_a^b g(x)dx}$.