Showing the equality of integrals with conditions (Analysis).

Let $f: [a,b] \to \mathbb{R}$ be continuous and suppose $g$ is integrable on $[a,b]$. Assume $g(x) \geq 0$ for all $x \in [a,b]$. Prove there exists some $c \in [a,b]$ such that $$\int_a ^b f(x)g(x) dx = f(c) \int_a ^b g(x) dx.$$

Since $g$ is integrable, there exists a partition $P$ of $[a,b]$ such that $U(P,f) - L(P,f) = \sum_{i=1}^n (M_i-m_i) \Delta x_i < \epsilon$, where $M_i = \sup \{f(t): x_{i-1} \leq t \leq x_i \}$ and $m_i = \inf \{f(t): x_{i-1} \leq t \leq x_i \}$. Since $f$ is continuous, $f$ is also integrable. How can I proceed/conclude the statement that I need to prove? I am using baby Rudin Analysis.

• Hint: $\min f \int g \le \int f g \le \max f \int g$. Now, $f$ is continuous... you might want to make two case, $\int g = 0$ and otherwise – user251257 Feb 22 '18 at 19:11
• Looks like the MVT for Riemann-Stieltjes integrals. What tools from Riemann-Stieltjes integrals has Rudin done before this problem? – Adrian Keister Feb 22 '18 at 19:11
• @AdrianKeister Due to your insight, I found that this is actually called the Second Mean Value Theorem for Integrals. I somehow was not able to find this earlier. – Dominated Convergence Theorem Feb 22 '18 at 20:42

$f:[a,b]\to \mathbb R$ continuous. So, $f$ attain its bounds. $\exists x_*$ and $x^* \in [a,b]:f(x_*)= \inf\{f(x):x\in[a,b]\}$ and $f(x^*)= \sup\{f(x):x\in[a,b]\}$. $f(x_*)g(x)\le f(x)g(x) \le f(x^*)g(x).$ Assume that $\int_a^b g(x)dx>0$(Else, it is trivially true) then $f(x_*)\le \frac{\int_a^b f(x)g(x)dx}{\int_a^b g(x)dx} \le f(x^*)$. Applying Intermediate Value theorem. We get desired result.