On a numerical method for discrete analogues for boundary value problems