If $ g(x) \geq 0 $ and, I want to calculate $ \int f(x)g(x) dx $ for some $ f(x)$. Can I find a constant $c$ satisfying $$ \int f(x)g(x) dx = \int cf(x) dx \text{ ? }$$
or even can I claim that $ c= g(x) \text{ a.e} $ ?
The reason why I stuck at this problem is that for my research, $ \int f(x)g(x) dx $ is almost impossible to calculate. But $ \int f(x) dx $ is easy to calculate. So, I want to know whether I can find a constant $c$ or not. If possible, I can add some more assumptions to $f(x) \text{ and } g(x)$. Any suggestions will be helpful to me.
Let $\;D_{\!f}^{\,*}\!=\left\{x\;\big|\;x\in\mathrm{dom}\,f\;\land\;f(x)\neq0\right\}\,.$
If there exists a constant $\,c\,$ such that
$\displaystyle\int\!f(x)g(x)\,\mathrm dx=\!\int\!cf(x)\,\mathrm dx\;\;,$
then it results that
$f(x)g(x)=cf(x)\quad$ for any $\,x\in\mathrm{dom}\, f\cap\mathrm{dom}\,g\;\;,$
$g(x)=c\quad$ for any $\,x\in D_{\!f}^{\,*}\!\cap\mathrm{dom}\,g\;.\\[10pt]$
Addendum :
It is not possible to prove that $\,g(x)=c\,$ a.e. indeed there exists the following counterexample.
Let $\,f:[-1,1]\to\Bbb R\,$ the function defined as
$f(x)=\begin{cases}0&\text{if }\,x\in[-1,0)\\[5pt]x^2&\text{if }\,x\in[0,1]\;\;\;.\end{cases}$
Let $\,g:[-1,1]\to\Bbb R\,$ the function defined as
$g(x)=\begin{cases}x^2+c&\text{if }\,x\in[-1,0)\\[5pt]c&\text{if }\,x\in[0,1]\;\;\;.\end{cases}$
It results that
$f(x)g(x)=cf(x)\quad$ for any $\,x\in[-1,1]\,.$
Moreover ,
$\displaystyle\int\!f(x)g(x)\,\mathrm dx=\!\int\!cf(x)\,\mathrm dx=H(x)+\mathrm{constant}$
where
$H(x)=\begin{cases}0&\text{if }\,x\in[-1,0)\\[5pt]\dfrac c3x^3&\text{if }\,x\in[0,1]\end{cases}$
but the function $\,g\,$ is not equal to $\,c\,$ a.e.