A direct numerical procedure for the Cauchy problem for the heat equation