Solve the heat equation