Is the equality $E(E(X|Y))^2=E(E(X|Y)X)$ true or does there need to be some relationship between the random variables $X$ and $Y$ such that equality holds.
Working with the left hand side, we have \begin{align} E(E(X|Y)X)&=E(E(X|Y)E(E(X|Y)))\\ &=E(E(X|Y)E(X|Y))\\ &=E(E(X|Y))^2 \end{align} where we take out the first expectation in $E(E(X|Y))$ in the first line because $E(\text{constant})=\text{constant}$. I am merely not convinced of this result.
I validated this equality with a simple example, let $Y=1$ if a fair coin turns up heads and 0 if tails. If $Y=1$, toss a die and let $X$ be the value shown on the face of the die. If $Y=0$, toss the coin again and let $Y$ be 1 if the fair coin is heads and 0 if tails. It seems that in this example, both sides are $\frac{50}{8}$ if I recall correctly.
Clearly, $X$ and $Y$ are not independent since $Y$ determines whether a coin or a die is thrown $(X)$. So, it does not seem like we need to use independence, which may indicate that there is no problem with the steps we followed above. Is this true?
In general for suitable Borel-measurable $f:\mathbb R\to\mathbb R$: $$\mathbb E[f(Y)X]=\mathbb E[\mathbb E(f(Y)X\mid Y)]=\mathbb E[f(Y)\mathbb E(X\mid Y)]$$
In the special case where $f(Y)=\mathbb E(X\mid Y)$ this leads to:$$\mathbb E[\mathbb E(X\mid Y)X]=\mathbb E[\mathbb E(X\mid Y)\mathbb E(X\mid Y)]=\mathbb E[\mathbb E(X\mid Y)^2]$$
However be aware of the fact that in general $\mathbb E[\mathbb E(X\mid Y)^2]\neq\mathbb E[\mathbb E(X\mid Y)]^2$ so the last equality in your question is not okay.