 The figures below present the solutions given by the above methods to approximate the heat equation 

with the boundary condition

The exact solution is

The (continuous) Laplace operator in formula_54-dimensions is given by formula_55.The discrete Laplace operator formula_56 depends on the dimension formula_54.In 1D the Laplace operator is approximated as 
This approximation is usually expressed via the following stencil
and which represents a symmetric, tridiagonal matrix.