Let $X$ a random variable on $(\Omega,\mathcal{F},P),\mathcal{G}$ a sub $\sigma$-algebra. Prove that, almost surely,
$$E[X^2|\mathcal{G}]=2\int_0^{\infty}xP(X>x|\mathcal{G})dx$$ The above formula was true for simple function $X,$ if we pick an increasing function $X_n$ to $X,$ there is a problem in applying the conditional monotone theorem in $\int_0^{\infty}xP(X_n>x)dx$ because $P(X_n>x|\mathcal{G}) \to P(X>x | \mathcal{G})$ on an event $E_x$ (which depends of $x>0$)such that $P(E_x)=1,$ so we can't change interchange limit-integral.
What do you suggest to solve this problem?