# Fubini's theorem for conditional expectations

I need to prove that if $E \int_a^b |X_u|\,du = \int_a^b E|X_u|\,du$ is finite then:

$$E\left[\left.\int_a^b X_u\,du \;\right|\; \mathcal{G}\right] = \int_a^b E[X_u \mid \mathcal{G}]\,du.$$

I just dont have any idea how to approach this problem.

Set $X := \int_a^b X_r \, dr$ and $Y_r:=\mathbb{E}(X_r \mid \mathcal{G})$. Then $\int_G Y_r \, d\mathbb{P}= \int_G X_r \, d\mathbb{P}$ for all $G \in \mathcal{G}$; thus $$\int_a^b \int_G Y_r \, d\mathbb{P} \, dr = \int_a^b \int_G X_r \, d\mathbb{P} \, dr. \tag{1}$$ By Fubini's theorem, $$\int_G \left(\int_a^b Y_r \, dr\right) \, d\mathbb{P} \stackrel{\text{Fub.},(1)}{=} \int_G \left(\int_a^b X_r \, dr\right) \, d\mathbb{P}=\int_G X \, d\mathbb{P} \tag{2}$$ for all $G \in \mathcal{G}$. Therefore $$\mathbb{E} \left( \int_a^b X_r \, dr \mid \mathcal{G} \right) \stackrel{\text{def}}{=} \mathbb{E}(X \mid \mathcal{G}) \stackrel{(2)}{=} \int_a^b Y_r \, dr \stackrel{\text{def}}{=} \int_a^b \mathbb{E}(X_r \mid \mathcal{G}) \, dr.$$