Suppose that X and Y are random variables on a common probability space such that $E(X^2+Y^2) \lt \infty$, $E(X|Y)=Y$, $E(Y|X)=X$. Prove that $$P(X=Y)=1$$
My work: $E(X)=E(E(X|Y))=E(Y)$ and $E(Y)=E(E(Y|X))=E(X)$
But I don't know what to do next and I'm sure how to use the condition $E(X^2+Y^2) \lt \infty$.
Thanks in advance.
We have the following,
\begin{align*} E( (X-Y)^2 )&= E(X^{2}+Y^{2}-2XY ) \\ &= E(X^{2}+Y^{2})-E(XY )-E(XY ) \\ &= E(X^{2} )+E(Y^{2} )-E(E(XY |X ))-E(E(XY |Y )) \\ &= E(X^{2} )+E(Y^{2} )-E(XE(Y |X ))-E(YE(X |Y )) \\ &= E(X^{2} )+E(Y^{2} )-E(X^2 )-E(Y^2 ) \\ &=0 \end{align*} Therefore, $X=Y$ almost surely.