Dynamic programming with shape-preserving rational spline Hermite interpolation