Require the PDE (1) to be fulfilled at an arbitrary interior mesh point (x_i,t_n) leads to \begin{equation} \frac{\partial}{\partial t} u(x_i, t_n) = \dfc\frac{\partial^2}{\partial x^2} u(x_i, t_n) \tag{5} \end{equation}
Applies to all interior mesh points: i=1,\ldots,N_x-1 and n=1,\ldots,N_t-1
For n=0 we have the initial conditions u=I(x) and u_t=0
At the boundaries i=0,N_x we have the boundary condition u=0 .