\centerline{\bf Spline (a.k.a. piecewise polynomial) representations.} Consider the case of a piecewise cubic polynomial $g(x)$ with breakpoints $\xi_1<\xi_2< \cdots<\xi_{n+1}$. \medskip\noindent{\bf (1) Polynomial coefficients} $c_{ji}$, $1\le i\le n$, $1\le j\le4$. On each interval $[\xi_i,\xi_{i+1})$, $$g(x) =P_i(x) =\sum_{j=1}^4 c_{ji}(x-\xi_i)^j,$$ and by convention $$g(x)= \cases{ P_1(x),& $x\le\xi_1$\cr P_n(x),& $x\ge\xi_{n+1}$\cr}.$$ \medskip\noindent{\bf (2) Truncated power basis}$$ \phi_{ij}=\cases{(x-\xi_1)^j/j!,& $i=1$,\cr (x-\xi_i)^j_+/j!,& $i=2,\ldots,n$,\cr} \qquad j=0,\ldots, 3,$$ where $$(x-\xi_i)^j_+=\cases{0,&$x<\xi_i$,\cr (x-\xi_i)^j,&$x\ge\xi_i$.\cr} \qquad g(x)= \sum_{1\le i\le n\atop0\le j\le 3} \alpha_{ij}\phi_{ij}(x), \quad\xi_1\le x\le\xi_{n+1}.$$ Proof. For $1\le i\le n$ and $0\le j\le3$, $\phi_{ij}(x) \in \cP_{4,\xi}=\bigl\{$piecewise cubic (order 4) polynomials with breakpoints $\xi_1$, $\ldots$, $\xi_{n+1}\bigr\}$. From (1), dim $\cP_{4,\xi}=4n$. The $4n$ vectors $\phi_{ij}(x)$, $1\le i\le n$, $0\le j\le3$, are linearly independent. Therefore the $\phi_{ij}$ are a basis for $\cP_{4,\xi}$, and any $g\in\cP_{4,\xi}$ is a unique linear combination of the $\phi_{ij}$.\QED $$\eqalign{\cP_{k,\xi,\nu}=\bigl\{& \hbox{piecewise polynomials of degree $\le k-1$ with breakpoints $\xi_1<\xi_2< \cdots<\xi_{n+1}$}\cr &\hbox{such that $g^{(\nu_i-1)}(x)$ exists at $xi_i$, and $0\le\nu_i \le k$, for $2\le i\le n$} \bigr\}.\cr}$$ The special case $k=4$, $\nu=(2,\ldots,2)$ is called {\it piecewise Hermite cubics}. Let $h_i=\xi_{i+1}-\xi_i$, $$\eqalign{c_0^i(x)={2\over h_i^3} (x-\xi_{i+1})^2\Bigl(x-\xi_i+{h_i\over 2}\Bigr),\quad &\hat c_0^i(x)={1\over h_i^2} (x-\xi_i)(x-\xi_{i+1})^2,\cr c_1^i(x)=-{2\over h_i^3} (x-\xi_i)^2\Bigl(x-\xi_{i+1}-{h_i\over 2}\Bigr),\quad &\hat c_1^i(x)={1\over h_i^2} (x-\xi_i)^2(x-\xi_{i+1}).\cr}$$ The $C'$ piecewise Hermite cubics $c_i(x), \hat c_i(x)$ are defined by $$\displaylines{c_1(x)\cases{c_0^1(x)&, on $[\xi_1,\xi_2]$\cr 0&, on $[\xi_2,\xi_{n+1}]$}, \quad\hat c_1(x)=\cases{\hat c_0^1(x)&, on $[\xi_1,\xi_2]$\cr 0&, on $[\xi_2,\xi_{n+1}]$},\cr \hbox{\leftline{for $i=2,\ldots,n,$}}\cr c_i(x)=\cases{0&, on $[\xi_1,\xi_{i-1}]$\cr c_1^{i-1}(x)&, on $[\xi_{i-1},\xi_i]$\cr c_0^i(x)&, on $[\xi_i,\xi_{i+1}]$\cr 0&, on $[\xi_{i+1},\xi_{n+1}]$}, \quad\hat c_i(x)=\cases{0&, on $[\xi_1,\xi_{i-1}]$\cr \hat c_1^{i-1}(x) &, on $[\xi_{i-1},\xi_i]$\cr \hat c_0^i(x)&, on $[\xi_i,\xi_{i+1}]$\cr 0&, on $[\xi_{i+1},\xi_{n+1}]$},\cr c_{n+1}(x)\cases{0&, on $[\xi_1,\xi_n]$\cr c_1^n(x)&, on $[\xi_n,\xi_{n+1}]$}, \quad\hat c_{n+1}(x)=\cases{0&, on $[\xi_1,\xi_n]$\cr \hat c_1^n(x)&, on $[\xi_n,\xi_{n+1}]$}.\cr}$$ \midinsert \vglue -.7in \centerline{\epsfxsize=2.5in\epsffile{Hcub1.eps}\hglue .5in \epsfxsize=2.5in\epsffile{Hcub2.eps}}\vglue -.3in \centerline{$c_i(\xi_j)=\delta_{ij}, \quad c_i'(\xi_j)=0, \quad1\le i,j\le n+1.$\hfil $\hat c_i'(\xi_j)=\delta_{ij}, \quad\hat c_i(\xi_j)=0, \quad1\le i,j\le n+1.$} \endinsert \medskip\noindent{\bf (3) Piecewise Hermite cubic basis} $c_i(x)$, $\hat c_i(x)$. $$g(x)=\sum_{i=1}^{n+1}y_ic_i(x)+d_i\hat c_i(x).$$ Note that $g(\xi_i)=y_i$ and $g'(\xi_i)=d_i$. \medskip Standard cubic splines correspond to the special case $k=4$, $\nu=(3,3,\ldots,3)$ of ${\cal P}_{k,\xi,\nu}$. Basis functions $B_i(x)$, called $B$-splines, for this space look like \midinsert\vglue -1in \centerline{\hfil\hskip -1in\vbox{\epsfxsize=3in\epsffile{Bixplot.eps}}} \vglue -1in \endinsert The points $t_i$ are called knots, which are not identical with the breakpoints $\xi_i$. Precisely, given the breakpoint sequence $\xi$, a standard choice for the knot sequence $t$ is $t_1=t_2=t_3=t_4=\xi_1$, $t_{i+3}=\xi_i$ for $i=2$, $\ldots$, $n$, $t_{n+4}=t_{n+5}=t_{n+6}=t_{n+7}=\xi_{n+1}$. Then for any $C^2$ cubic spline $g\in{\cal P}_{4,\xi,3}$, $g(x)=\sum\limits_{i=1}^{n+3}\alpha_iB_i(x)$, giving the \medskip\noindent{\bf (4) $B$-spline basis} $B_i(x)$. \medskip The real power of $B$-splines lies in \noindent{\bf Theorem}. For any $k\ge1$, breakpoint sequence $\xi_1<\xi_2<\cdots<\xi_{l+1}$, and smoothness sequence $\nu=(\nu_i)_2^l$ with all $\nu_i\le k$, there exists a knot sequence $t=(t_i)_1^{n+k}$, where $$n=kl-\sum_{i=2}^l\nu_i,$$ such that the $B$-splines $B_1,\ldots,B_n$ of order $k$ for the knot sequence $t$ are a basis for ${\cal P}_{k,\xi,\nu}$ on $[t_k,t_{n+1}]$. \medbreak \centerline{\bf Cubic spline interpolants.}\nobreak The $B$-spline representation $g(x)=\sum\limits_{i=1}^{n+3}\alpha_iB_i(x)$ shows clearly there are $n+3$ degrees of freedom. Thus fixing $g(\xi_i)=f(\xi_i)$ for $i=1$, $\ldots$, $n+1$, leaves 2 degrees of freedom. Some standard choices are: $$\eqalign{&(1)\;g'(\xi_1)=f'(\xi_1),\;g'(\xi_{n+1})=f'(\xi_{n+1}) \hbox{ : {\bf complete} cubic spline;}\cr &(2)\;g''(\xi_1)=g''(\xi_{n+1})=0 \hbox{ : {\bf natural} cubic spline;}\cr &(3)\;g'''(x) \hbox{ is continuous at }\xi_2 \hbox{ and }\xi_n \hbox{ : {\bf not-a-knot} condition.}}$$ \hrule ``The only good thing about a natural cubic spline is its name.'' (Carl deBoor). \smallskip\hrule \vfil\eject