Cubic (sub-)spline for data with derivatives

Introduction
In practice a function is often tabulated together with its derivative (for example, after numerical integration of a second order ordinary differential equation). The table is then given as {xi, yi, y'i}i=1,..,n , where yi is the value of the tabulated function, and y'i is the value of the derivative of the tabulated function at the point xi.
Project
Given a data-set, {xi, yi, y'i}i=1,..,n , build a cubic sub-spline,

S(x) x∈[xi,xi+1] =Si(x)

where

Si(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.

Extra
  1. Derivative and integral of the spline.
  2. Make the second derivative of the spline continuous by increasing the order of the spline to four, for example, in the form

    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.