Clamped cubic spline (source code)

= Clamped cubic spline
{title2=$S(x_i)=y_i,\quad S'(x_0)=d_0,\quad S'(x_n)=d_n$}

A <clamped cubic spline> is a <cubic spline> whose endpoint first <derivatives> are prescribed. A <clamped cubic spline> <interpolant> additionally matches prescribed values at its <spline knots>. Distinct <spline knots>, arbitrary nodal values and arbitrary endpoint slopes determine one such <interpolant>. The <minimum roughness property of a clamped cubic spline> proves uniqueness. Unlike the <natural cubic spline>, this construction prescribes endpoint slopes rather than zero endpoint <second derivatives>.