Theorem (mean value theorem for integrals)

Suppose $f,g:[a,b]\to\R$ are continuous and $g(x)\neq 0$ for all $x\in(a,b)$.

Then there exists $c\in(a,b)$ such that $$ \begin{align*} \int_{a}^{b} f(x)g(x)\, dx = f(c) \int_{a}^{b} g(x)\, dx. \end{align*} $$ Proof