Let $X_t$ be a stochastic process. I am wondering whether or not the following holds, as a consequence of Tonelli's theorem:
$$ E[\int_0^T X_t^2 ds] = \int_0^T E[X_t^2] ds$$
My attempt:
$$ E[\int_0^T X_t^2 dt] = \int_X \int_0^T X_t^2 dt f(x) dx$$
Since $X_t^2$ and $f(x)$ are non-negative, we rearrange to obtain
$$ E[\int_0^T X_t^2 dt] = \int_0^T \int_X X_t^s f(x) dx dt$$
And hence
$$ E[\int_0^T X_t^2 dt] = \int_0^T E[X_t^2] dt$$
Is this correct?
Yes, if the function $(\omega,t)\mapsto X_t(\omega)$ is jointly meaurable on $\Omega\times[0,T]$. (I have no idea whether that's clear from the definitions).