cubic spline interpolation
Suppose we are given $N+1$ data points $\{({x}_{k},{y}_{k})\}$ such that
$$  (1) 
Then the function $S(x)$ is called a cubic spline interpolation if there exists $N$ cubic polynomials ${S}_{k}(x)$ with coefficients ${s}_{k,i}\mathrm{\hspace{0.17em}\hspace{0.17em}0}\le i\le 3$ such that the following hold.

1.
$S(x)={S}_{k}(x)={\sum}_{i=0}^{3}{s}_{k,i}{(x{x}_{k})}^{i}\forall x\in [{x}_{k},{x}_{k+1}]\mathrm{\hspace{0.33em}\hspace{0.33em}\hspace{0.33em}0}\le k\le N1$

2.
$S({x}_{k})={y}_{k}\mathrm{\hspace{0.33em}\hspace{0.33em}\hspace{0.33em}0}\le k\le N$

3.
${S}_{k}({x}_{k+1})={S}_{k+1}({x}_{k+1})\mathrm{\hspace{0.33em}\hspace{0.33em}\hspace{0.33em}0}\le k\le N2$

4.
${S}_{k}^{\prime}({x}_{k+1})={S}_{k+1}^{\prime}({x}_{k+1})\mathrm{\hspace{0.33em}\hspace{0.33em}\hspace{0.33em}0}\le k\le N2$

5.
${S}_{k}^{\prime \prime}({x}_{k+1})={S}_{k+1}^{\prime \prime}({x}_{k+1})\mathrm{\hspace{0.33em}\hspace{0.33em}\hspace{0.33em}0}\le k\le N2$
The set of points $(\mathit{\text{1}})$ are called the knots. The set of cubic splines on a fixed set of knots, forms a vector space^{} for cubic spline addition and scalar multiplication.
So we see that the cubic spline not only interpolates the data $\{({x}_{k},{y}_{k})\}$ but matches the first and second derivatives at the knots. Notice, from the above definition, one is free to specify constraints on the endpoints. One common end point constraint is ${S}^{\prime \prime}(a)=0{S}^{\prime \prime}(b)=0$, which is called the natural spline. Other popular choices are the clamped cubic spline, parabolically terminated spline and curvatureadjusted spline. Cubic splines are frequently used in numerical analysis to fit data. Matlab uses the command spline to find cubic spline interpolations with notaknot end point conditions. For example, the following commands would find the cubic spline interpolation of the curve $4\mathrm{cos}(x)+1$ and plot the curve and the interpolation marked with o’s.
x = 0:2*pi; y = 4*cos(x)+1; xx = 0:.001:2*pi; yy = spline(x,y,xx); plot(x,y,'o',xx,yy)
Title  cubic spline interpolation 

Canonical name  CubicSplineInterpolation 
Date of creation  20130322 13:40:25 
Last modified on  20130322 13:40:25 
Owner  yota (10184) 
Last modified by  yota (10184) 
Numerical id  7 
Author  yota (10184) 
Entry type  Definition 
Classification  msc 6501 