# Mean Value Theorem for Integrals

## Theorem

Let $f$ be a continuous real function on the closed interval $\left[{a \,.\,.\, b}\right]$.

Then there exists a real number $k \in \left[{a \,.\,.\, b}\right]$ such that:

$\displaystyle \int_a^b f \left({x}\right) \rd x = f \left({k}\right) \left({b - a}\right)$

### Generalization

Let $f$ and $g$ be continuous real functions on the closed interval $\closedint a b$ such that:

$\forall x \in \closedint a b: \map g x \ge 0$

Then there exists a real number $k \in \closedint a b$ such that:

$\displaystyle \int_a^b \map f x \, \map g x \rd x = \map f k \int_a^b \map g x \rd x$

## Proof

From Continuous Function is Riemann Integrable, $f$ is Riemann integrable on $\left[{a \,.\,.\, b}\right]$.

By the Extreme Value Theorem, there exist $m, M \in \left[{a \,.\,.\, b}\right]$ such that:

$\displaystyle f \left({m}\right) = \min_{x \mathop \in \left[{a \,.\,.\, b}\right]} f \left({x}\right)$
$\displaystyle f \left({M}\right) = \max_{x \mathop \in \left[{a \,.\,.\, b}\right]} f \left({x}\right)$
$\displaystyle \int_a^b f \left({m}\right) \rd x \le \int_a^b f \left({x}\right) \rd x \le \int_a^b f \left({M}\right) \rd x$

These bounds can be computed by Integral of Constant:

$\displaystyle f \left({m}\right) \left({b - a}\right) \le \int_a^b f \left({x}\right) \rd x \le f \left({M}\right) \left({b - a}\right)$

Dividing all terms by $\left({b - a}\right)$ gives:

$\displaystyle f \left({m}\right) \le \frac 1 {b - a}\int_a^b f \left({x}\right) \rd x \le f \left({M}\right)$

By the Intermediate Value Theorem, there exists some $k \in \left({a \,.\,.\, b}\right)$ such that:

 $\displaystyle \frac 1 {b - a} \int_a^b f \left({x}\right) \rd x$ $=$ $\displaystyle f \left({k}\right)$ $\displaystyle \leadsto \ \$ $\displaystyle \int_a^b f \left({x}\right) \rd x$ $=$ $\displaystyle f \left({k}\right) \left({b - a}\right)$

$\blacksquare$