Consider the integrable functions $f, g: [a,b] \rightarrow > \mathbb{R}$. Prove that if $$\hspace{5cm} g(x) \ge 0 \hspace{3cm} \forall x \in [a, b]$$
and $$m = \inf(f)$$ $$M = \sup(f)$$
there exists a $c \in [m, M]$ such that:
$$\int_a^b f(t)g(t) dt = c \cdot \int_a^b g(t)dt$$
When I think about it, it doesn't seem so far fetched. If we have two functions on the interval $[a, b]$, then it obviously seems reasonable that there exists a $c_1 \in [m, M]$ such that $$f(x) = c_1$$ , with $x \in [a,b]$. So we would have:
$$f(x)g(x) = c_1 g(x)$$
We could find a $c_k$ for every point $x \in [a, b]$, so that means that we can integrate the above relation and get:
$$\int_a^b f(t) g(t)dt = c \cdot \int_a^b g(t)dt$$
where $c$ is a some sort of linear combination (I think, I'm not sure) of all of the $c_k$'s that I used for every point in the interval $[a, b]$.
What's a better, more concise proof to this identity than the weird and incomplete one that I came up with?
The easiest path to my mind is to say that since $mg(x)\le f(x)g(x)\le Mg(x)$ for $x\in(a,b)$ then $$m\int_a^bg(x)dx\le\int_a^bf(x)g(x)dx\le M\int_a^bg(x)dx$$ On division we get $$m\le\frac{\int_a^bf(x)g(x)dx}{\int_a^bg(x)dx}=c\le M$$ Multiplying back we get $$\int_a^bf(x)g(x)dx=c\int_a^bg(x)dx$$ Notice that if $\int_a^bg(x)dx=0$ this method of proof was invalid but we can see from the first inequality that $\int_a^bf(x)g(x)dx=0$ anyhow so any $c\in[m,M]$ would satisfy the hypothesis of the theorem.