implemented backward Euler discretization in 1d