# Expectation of random variables under independence conditions

Given three random variables $$X_1,X_2,Y$$ such that $$X_2,Y$$ are independent, how does one prove that

$$E[g_1(X_1)g_2(X_2)|Y] = E[g_1(X_1)|Y]E[g_2(X_2)]$$

Attempt:

\begin{aligned} E[g_1(X_1)g_2(X_2)|Y=y] =& \int \int_{\mathbb{R}^2} g_1(x_1)g_2(x_2)f_{X_1,X_2|Y}(x_1,x_2|y) dx_1dx_2\\ =& \int \int_{\mathbb{R}^2} g_1(x_1)g_2(x_2)\frac{f_{X_1,X_2,Y}(x_1,x_2,y)}{f_Y(y)} dx_1dx_2\\ =& \int \int_{\mathbb{R}^2} g_1(x_1)g_2(x_2)\frac{f_{X_1|X_2,Y}(x_1|x_2,y)f_{X_2,Y}(x_2,y)}{f_Y(y)} dx_1dx_2\\ =& \int \int_{\mathbb{R}^2} g_1(x_1)g_2(x_2)\frac{f_{X_1|X_2,Y}(x_1|x_2,y)f_{X_2}(x_2)f_Y(y)}{f_Y(y)} dx_1dx_2\\ \end{aligned}

I'm stuck here.

Is this claim true? Let $$X_2,Y$$ be independent bernoulli and $$X_1$$ the sum. $$E[X_1X_2\mid Y=1]=2\cdot1/2 + 0\cdot1/2=1$$ whereas $$E[X_1\mid Y=1]E[X_2]=(2\cdot 1/2 + 1\cdot 1/2)\cdot 1/2=3/4.$$
The claim is incorrect. The result requires conditional independence of $$X_1$$ and $$X_2$$ given $$Y$$.