Differentiation inside a conditional expectation Let $(\Omega, \mathcal{F},P)$ be a probability space. If $X:\Omega\to\mathbb{R}^n$ is a random variable such that $E[|X|]<\infty$, and if $\mathcal{H}\subset\mathcal{F}$ is a $\sigma$-algebra, then the conditional expectation of $X$ given $\mathcal{H}$, denoted by $E[X|\mathcal{H}]$, is defined as the (a.s. unique) function from $\Omega$ to $\mathbb{R}^n$ satisfying:
(1) $E[X|\mathcal{H}]$ is $\mathcal{H}$-measurable
(2) $\int_HE[X|\mathcal{H}]dP=\int_HXdP$, for all $H\in\mathcal{H}$
Suppose that $Y:U\times \Omega\mapsto \mathbb{R}^n$
for  some open subset $U\subset \mathbb{R}$.
Further suppose that $Y$ is $C^1$ for a.a. $\omega\in\Omega$, and a random variable, i.e. $P$-measurable, for each $x\in U$. Assume also that $E[|Y(x,\cdot)|]<\infty$ for all $x\in U$.
Let $\mathcal G\subset \mathcal{F}$ be a sub-$\sigma$-algbebra.
How do we know
1) if $\frac{\partial}{\partial x} E[Y(x,\cdot)|\mathcal G]$ exists for each $x$ a.s.?
2) when $$\frac{\partial}{\partial x}E\left[Y(x,\cdot)|\mathcal G\right]= E\left [\frac{\partial}{\partial x}Y(x, \cdot)|\mathcal G\right]$$ a.s.?
 A: I would answer your questions under following additional conditions:
$$\biggl|\dfrac{\partial Y(x,\omega)}{\partial x}\biggr|\le Z(\omega),\quad \forall x\in U,\qquad
\mathsf{E}[Z(\omega)]<\infty. \tag{1}$$
In the following we always consider the continuous versions of $Y(x)$,  $\mathsf{E}[Y(x)|\mathcal{G}]$, $\frac{\partial Y(x)}{\partial x}$ and $\mathsf{E}[\frac{\partial Y(x)}{\partial x}|\mathcal{G}]$. (c.f. here) Using (1), we have
$$ \int_{a}^x\mathsf{E}\bigg[\dfrac{\partial Y(u)}{\partial u} \biggm| \mathcal{G} \biggr]\,du \stackrel{(*)}=\mathsf{E}\biggl[\int_{a}^x\dfrac{\partial Y(u)}{\partial u} \,du\biggm| \mathcal{G}\biggr]=\mathsf{E}[Y(x)|\mathcal{G}]-\mathsf{E}[Y(a)|\mathcal{G}],\quad a,x\in U. $$ 
This means that $\mathsf{E}[Y(x)|\mathcal{G}]$ is differentiable in $x$ and 
$$\dfrac{\partial \mathsf{E}[Y(x)|\mathcal{G}]}{\partial x}=\mathsf{E}\biggl[\frac{\partial Y(x)}{\partial x}\biggm|\mathcal{G}\biggr].
$$
To prove (*) it suffices using Fubini's theorem and the definition of conditional expectation. 
