Finite difference solution of differential equations with stochastic inputs