Solving linear boundary value problems by approximating the coefficients