The Gradient of a Cubic Spline