I want to prove the following theorem, which Wikipedia refers as 'Second Mean Value Theorem'
Suppose that $g(x)$ is a non-negative monotonically decreasing function on the interval $[a, b]$, and its derivative is continuous. For $f(x)$ continuous on $[a, b]$, prove that there exists $c \in [a, b] $ such that $$\int_a^bf(x)g(x)dx=g(a)\int_a^cf(x)dx$$
[My Work]
Since $f(x)$ is continuous, define $F(x)=\int_a^x f(t)dt$. Since $F(x)$ is differentiable, it is therefore continuous. Thus for $[a, b]$, $F(x)$ is bounded. Suppose $m \leq F(x) \leq M$.
So proving the given problem would be equivalent to proving that $$m\leq \frac{1}{g(a)}\int_a^b f(x)g(x)dx \leq M \ \ \ \ \cdots(1)$$ so that I can use the Intermediate Value Theorem to conclude that there exist $c$ in $(a, b)$ such that $\frac{1}{g(a)}\int_a^b f(x)g(x)dx=F(c)$.
I am stuck on (1). Can anyone give me hints to prove this? If there are other ways to prove the theorem, please let me know. Thanks.