Let $X,Y$ be two random variables on a probability measure space $(\Omega,P,\mathcal F)$ such that $\exists A \in \mathcal B(\mathbb R)$ such that $P(X^{-1}(A))=0$ and $P(Y^{-1}(A))=1$ , then is it true that $\int_\Omega X.YdP=(\int_\Omega X dP)(\int_\Omega Y dP)$ , i.e. that $E[XY]=E[X]E[Y]$ ?
UPDATE : The answer of user drhab below shows that the statement is false . Now I would like to ask , what happens if both $X;Y$ are non-negative random variables ?
Let $X$ be a positive random variable with $\mathbb EX^2<\infty$ and let $Y:=-X$.
Then the conditions are satisfied for $A=(-\infty,0)$.
But $\mathbb EXY=-\mathbb EX^2$ and $\mathbb EX\mathbb EY=-(\mathbb EX)^2$ will only coincide under the extra condition that $X$ is degenerated.