I have to prove that $\mathbb{E}[X^2]-\mathbb{E}[X]^2=\sigma^2dt$ for $\mathbb{E}[X]:=p(u-d)+d$ as from title, and with:
$p:=\frac{e^{rdt}-d}{u-d}$;
$u:=e^{\sigma\sqrt{dt}}$;
$d:=e^{-\sigma\sqrt{dt}}$.
I arrive to say that $e^{r\sigma dt\sqrt{dt}}+e^{-r \sigma dt \sqrt{dt}}-1-e^{2rdt}$ but now I'm stuck. How can I continue?
Thanks in advance for any help.