Fitting solutions of differential equations