Interpolation discretizes a function f to finitely many values: given (ti,yi), find p with p(ti)=yi. Through n points (ti,yi) there is a unique polynomial of degree n−1,
Nodes a=t0<t1<⋯<tn=b, data y, and a polynomial on each [tk−1,tk], k=1,…,n. The result is a function on [a,b]. The interpolation map P(y)=p with p(tk)=yk is linear,
P(αy+βz)=αP(y)+βP(z)
so if the data changes to y+Δy,
δP=P(y+Δy)−P(y)=P(Δy)=k=0∑n(Δy)kP(ek)
With ∥f∥∞=maxx∈[a,b]∣f(x)∣, the absolute condition number κ relates ∥δP∥∞ to ∥Δy∥∞,
(lower bound from Δy=ej, upper bound from the triangle inequality). So the conditioning comes down to the effect of each node switched on one by one. The P(ek) are the cardinal functions, 1 at tk and 0 at every other node.
They are linear on each interval and globally continuous, so their linear combinations are too, and they satisfy the cardinality condition Hk(ti)=1 if i=k, 0 otherwise. So P(ek)=Hk and
p(x)=k=0∑nykHk(x)
a basis that depends only on the node locations. The absolute condition number is 1 in the ∞-norm, ∥P(y+z)−P(y)∥∞=∥z∥∞, since a piecewise linear function attains its max at a node.
For ti=a+ih, h=nb−a and f∈C2[a,b],
∥f−pn∥∞=x∈[a,b]max∣f(x)−pn(x)∣≤Mh2,M=∥f′′∥∞
so the error is O(h2), and doubling the number of nodes is 4 times more accurate. p is continuous but its derivative is not.
4n unknown coefficients, with hk=tk−tk−1. The constraints:
Interpolation at both ends, Sk(tk−1)=yk−1 and Sk(tk)=yk, i.e. ak=yk−1 and ak+bkhk+ckhk2+dkhk3=yk (2n equations).
S′ continuous at the interior nodes, bk+2ckhk+3dkhk2=bk+1, k=1,…,n−1.
S′′ continuous at the interior nodes, 2ck+6dkhk=2ck+1, k=1,…,n−1.
Two end conditions: known S′ or S′′ at the endpoints, or the natural spline S1′′(t0)=Sn′′(tn)=0, or not-a-knot, S′′′ continuous at t1 and tn−1, i.e. d1=d2 and dn−1=dn (S1=S2 and Sn−1=Sn).
In block form, with H=diag(h1,…,hn), J the n×n matrix with 1 on the diagonal and −1 on the superdiagonal, and E the first n−1 rows of I (deletes the last row),