# $\int_{-\infty}^{+\infty} t\phi(f(t)) \mathrm{d}t = \int_{-\infty}^{+\infty} \phi(t) f(t) \mathrm{d}t$

Is the following true :

Let $$f$$ be a positive continuous function such that : $$\int_{-\infty}^{+\infty} f(t) \mathrm{d}t = 1$$, and such that : $$\int_{- \infty}^{+\infty} tf(t) \mathrm{d}t < \infty$$. If $$\phi$$ is a continuous function and : $$\int_{-\infty}^{+\infty} t\phi(f(t)) \mathrm{d}t < \infty$$ then do we have : $$\int_{-\infty}^{+\infty} t \phi(f(t)) \mathrm{d}t = \int_{-\infty}^{+\infty} \phi(t) f(t) \mathrm{d}t$$ ?

I think there is a link with probability, yet I don't know if this is true. It kind of reminds me expectation. For example in the discrete case with a random variable $$X$$ we have : $$\mathbb{E}[\phi(X)] = \sum \phi(x) \mathbb{P}(X =x)$$ yet I don't know if it extends to the continous case.

Take $$\phi (t)=t^{2}$$. The equation becomes $$\int tf^{2}(t)dt=\int t^{2}f(t)dt$$ and the left side is $$0$$ whenever $$f$$ is an even function. The right side is positive whenever $$f$$ is positive, so $$f(t)=ce^{-t^{2}}$$ with a suitable $$c>0$$ gives a counterexample.

The answer seems to be no in general.

Take $$f(t) = \frac{C}{t}$$, $$\phi(t)=t^2$$ on some finite domain $$D$$ (like $$[1;2]$$), with $$C = 1/\int \frac{1}{t}$$.

Left handside gives $$\int_D C^2/t = C$$ and right handside of the equation gives $$\int_D C\times t$$ which seems hard to be true for any domain $$D$$.

Continuity can be achieved with an arbitrary small error.