So the title is quite self-explanatory,


suppose we have a stochastic process $(X\_t: t\in[0,T])$ where for a fixed $t$, $X\_t$ is a $\mathbb R$-valued square integrable random variable, we could even assume it's in the Gaussian Sobolev space $\mathbb D^{1,2}$.
Then in which cases does the following hold?


$$D\_u \int\_0^t b(s,X\_s)ds= \int\_0^t D\_u[b(s,X\_s)]ds$$


where $D\_u$ stands for the Malliavin derivative at time $u$.


I tried searching for this in Nualarts book, but I haven't found a proof, or the necessary conditions. Furthermore this seems to be done quite often when dealings with SDEs.


Thanks in advance.



Under which conditions does Malliavin derivative and Lebesgue integral commute?
The hypotheses are sometimes stated differently, depending on the kind of processes you have in mind. The following is taken from Pratelli's [lecture notes](https://people.dm.unipi.it/pratelli/Didattica/Appunti-Malliavin.pdf), Theorem 3.2.1, but he gives no further reference.


**Theorem.** Let $(X\_t)\_{t \in [0,T]}$ be a stochastic process such that for all $0\leq t \leq T$ we have $X\_t \in \mathbb D^{1,2}$; also suppose that there is a measurable version of $D\_sX\_t$ on $\Omega \times [0,T] \times [0,T]$ such that $\int\_0^T \| X\_t \|\_{\mathbb D^{1,2}}^2\, \mathrm{d}t<+\infty$. Then $\int\_0^T X\_t\, \mathrm{d}t$ is in $\mathbb D^{1,2}$ and $$D\_s \int\_0^T X\_t\,\mathrm{d}t = \int\_0^T D\_sX\_t\,\mathrm{d}t$$ for a.e. $0 \leq s \leq T$.


The proof only needs the following fact.


**Lemma.** We have $F \in \mathbb D^{1,2}$ and $DF=Z$, iff $F \in L^2(\Omega)$ and there is $Z \in L^2(\Omega \times [0,T])$ such that, for any smooth functional $G$ and any square-integrable $h$, the following equation holds:
$$\mathbb E \left [\left (\int \_0^T Z\_s h(s)\, \mathrm{d}s \right )G \right] = \mathbb E \left [ -FD\_h G + FGW(h) \right]. $$
This makes the usual integration by parts into a characterization of the Malliavin derivative (compare with Lemma 1.2.2 of Nualart). You can find a proof in Chapter 5 of Bogachev's *[Gaussian Measures](https://bookstore.ams.org/surv-62)*.


With this, the proof of the Theorem is easy. Take the equation
$$\mathbb E \left [\left (\int \_0^T D\_sX\_t h(s)\, \mathrm{d}s \right )G \right] = \mathbb E \left [ -X\_tD\_h G + X\_tGW(h) \right],$$
then integrate with respect to $t$ and interchange integrals (Fubini+Cauchy-Schwarz) to get
$$\mathbb E \left [\left (\int \_0^T \left ( \int\_0^T D\_sX\_t \, \mathrm{d}t \right) h(s)\, \mathrm{d}s \right )G \right] = \mathbb E \left [ \left ( -\int\_0^T X\_t \, \mathrm{d}t \right)D\_h G + \left ( \int\_0^T X\_t \, \mathrm{d}t \right)GW(h) \right].$$
You can then apply the Lemma again, since $\int\_0^T X\_t \, \mathrm{d}t$ is in $L^2$, which tells you exactly that
$$D\_s \int\_0^T X\_t\,\mathrm{d}t = \int\_0^T D\_sX\_t\,\mathrm{d}t.$$


I imagine that you cannot find a precise reference since most works that study applications are not particularly concerned with precise statements, and the proof is not hard anyway.


