Use a forward difference in time and a centered difference in space (Forward Euler scheme): [D+tu=αDxDxu]ni
Written out, un+1i−uniΔt=αuni+1−2uni+uni−1Δx2
Initial condition: u0i=I(xi), i=0,1,…,Nx.