B-splines for smoothing and differentiating data sequences