Diffusion Equation, final expression for the variance
Integration by parts
results in
∂⟨x2⟩∂t=−Dxw(x,t)|x=±∞+2D∫∞−∞w(x,t)dx=2D,
leading to
⟨x2⟩=2Dt,
and the variance as
⟨x2⟩−⟨x⟩2=2Dt.
The root mean square displacement after a time t is then
√⟨x2⟩−⟨x⟩2=√2Dt.