let $f,g$ be continuous functions on $[a,b]$ and suppose that $g$ is non-negative. then there exists apoint $c \in [a,b]$ such that $\int_{a}^{b} f(x)g(x) dx = f(c) \int_{a}^{b} g(x) dx.$
I have seen a solution similar to my problem in the link below, except that this solution assumes that $g>0,$ but my problem assumes that $g \geq 0$, does my problem contain a mistake? or the result is true also if g is non negative?
Existence of $c$ such that $\int_{a}^{b} f(x)g(x)dx = f(c)\int_{a}^{b} g(x)$