Cubic (sub-)spline for data with derivatives
S(x) x∈[xi,xi+1] =Si(x)
whereSi(x)= yi +bi(x-xi) +ci(x-xi)2 +di(x-xi)3.
For each interval the three coefficients bi, ci, di are determined by the three conditions,
Si(xi+1)=yi+1,
S'i(xi)=y'i,
S'i(xi+1)=y'i+1.
See the subsection "Akima sub-spline interpolation" for the inspiration.
Si(x)= yi +bi(x-xi) +ci(x-xi)2 +di(x-xi)3 +ei(x-xi)2(x-xi+1)2 ,
and choosing the coefficients ei such that the spline has continuous second derivative.