Real Analysis – How to Prove Mean Value Theorem for Integral

real-analysis

I only knew the standard mean value theorem for integrals. (i.e. $\int_a^b f(x)dx= f(c)(b-a)$ for some $c$ between $[a,b]$ where $f$ is continuous. This is directly derived by applying mean value theorem and Fundamental theorem of calculus)

I'm taking numerical analysis this year and there is one theorem stated without a proof in my text. That is:

Let $f,g$ be continuous real-valued functions on $[a,b]$ such that $g$ is nonnegative.

Then there exists some $c$ between $a,b$ such that $\int_a^b fg(x) dx = f(c) \int_a^b g(x) dx$

How do I prove this?

Best Answer

Observe that if $g \equiv 0$, then the result holds. Thus, we'll take $g \not \equiv 0$. Since $f$ is continuous on the closed interval $[a,b]$, it must attain a minimum and maximum, so we'll say there exists $m \leq f(x) \leq M$ for all $x \in [a,b]$. Then, since $g$ is nonnegative on $[a,b]$, we have $$ mg(x) \leq f(x)g(x) \leq Mg(x) $$ Integrating all three sides yields $$ m \int_a^b g(x)\, dx \leq \int_a^b f(x)g(x) \, dx \leq M \int_a^b g(x) \, dx $$ Under the assumption that $g \not \equiv 0$, we may divide all three sides by $\int_a^b g(x) \, dx$, yielding $$ m \leq \frac{\int_a^b f(x) g(x) \, dx}{\int_a^b g(x) \, dx} \leq M $$ Recalling that $f$ is continuous, we invoke the Intermediate Value Theorem to deduce that there exists $c \in [a,b]$ such that $$ f(c) = \frac{\int_a^b f(x) g(x) \, dx}{\int_a^b g(x) \, dx} \quad \implies \quad \int_a^b f(x) g(x) \, dx = f(c) \int_a^b g(x) \, dx$$ Therefore, the result holds.