When $\mathbb E\int_0^T H_s^2ds=\int_0^T \mathbb E[H_s^2]ds$ is not true?

Let $$(\Omega ,\mathcal F,\mathbb P)$$ a probability space and $$(\mathcal F_t)_t$$ a filtration. In all example I can see, we always have that $$\mathbb E\int_0^T H_s^2ds=\int_0^T \mathbb E[H_s^2]ds,$$ when $$s\mapsto H_s$$ is a.s. continuous and $$\omega \mapsto H_s(\omega )$$ adapted. So is it true in general that if $$s\mapsto H_s$$ a.s. continuous and $$\omega \mapsto H_s(\omega )$$ adapted, then $$\mathbb E\int_0^T H_s^2ds=\int_0^T \mathbb E[H_s^2]ds \ \ ?$$

I know that since $$H_s\geq 0$$ for all $$\omega$$ and all $$s$$, it's enough to prove that $$(\omega ,s)\mapsto H_s(\omega )$$ is measurable. I would say that it's true, but I have difficulties to prove it. But maybe it's not true ? but I can't provide a counter-example.

• If $H$ is jointy measurable (in $s,\omega$), this is always true thanks to Tonelli's theorem. – zhoraster May 3 at 12:16

$$H_s(\omega) =\lim_{n \to \infty} H_{\frac {[ns]} {n}}(\omega)$$ a.s. so $$H$$ is jointly measurable (w.r.t. the completion of $$P$$). Hence the equation is true.
$$H_{\frac {[ns]} {n}}(\omega)=\sum_k H_{\frac k n} (\omega) I_{k \leq ns . Each term here is a product of a measurable function of $$s$$ and a measurable function of $$\omega$$. This makes each term, hence the sum jointly measurable. Since limit of measurable functions is measurable it follows that $$H_s(\omega)$$ is jointly measurable.
• thank you, but I'm not sure to completely understand your argument... I agree that $H_{\frac{[ns]}{n}}$ is measurable for all $n$, but I don't get why $(s,\omega )$ is jointly measurable (in $\Omega \times [0,t], \mathcal F\otimes \mathcal B([0,T], \mathbb P\otimes \lambda )$ where $\lambda$ is the lebesgue measure. – user659895 May 3 at 9:03