Solution (source code)

= Solution

Put $\delta_i=t_i-t_{i-1}$, $\Delta=\max_i\delta_i$, $v_i=\int_{t_{i-1}}^{t_i}\sigma(s)^2\,ds$ and $S=\|\sigma^4\|_\infty$. The deterministic integrand in the <Itô integral> implies that the increments $Z_i=X_{t_i}-X_{t_{i-1}}$ are <independent random variables> with <normal distributions> $N(0,v_i)$. The <Gaussian fourth moment> gives
$$
\mathbb E Z_i^2=v_i,\qquad \mathbb E Z_i^4=3v_i^2,\qquad \operatorname{Var}(Z_i^2)=2v_i^2.
$$
These identities include $v_i=0$. Since the summands of $M_n$ are centered and <independent>, all cross terms in its <second moment> vanish. Consequently,
$$
\mathbb E M_n^2=2\sum_{i=1}^n g(t_{i-1})^2v_i^2
\leq2R^2S\sum_{i=1}^n\delta_i^2
\leq2R^2S\Delta\sum_{i=1}^n\delta_i
=2R^2S\Delta.
$$
Thus \b[$D=2$ works for every observation partition]. The last step uses the total interval length, rather than assuming equally spaced observations.