= Solution
A <linear spline> is a <continuous function> whose restriction to every <interval> $[x_{i-1},x_i]$ is a <polynomial> of <polynomial degree> at most one. With $h_i=x_i-x_{i-1}$ and $\ell_i=\ell(x_i)$, <linear interpolation> gives
$$
\ell(x)=\frac{x_i-x}{h_i}\ell_{i-1}+\frac{x-x_{i-1}}{h_i}\ell_i,
\qquad x_{i-1}\leq x\leq x_i.
$$
Integrating the two <linear polynomials> and adding the contributions gives
$$
\boxed{\int_{x_0}^{x_n}\ell(x)\,dx=\sum_{i=1}^n\frac{h_i}{2}\bigl(\ell_{i-1}+\ell_i\bigr).}
$$
This is the <composite trapezoidal rule> applied to the nodal values, and it is exact for the <linear spline> itself, including nonuniform <spline knots>.
A <cubic spline> on this <partition of an interval> is a <function> $S\in C^2[x_0,x_n]$ that restricts to a <polynomial> of <polynomial degree> at most three on every <interval> $[x_{i-1},x_i]$. Thus its <second derivative> is continuous and piecewise of <polynomial degree> at most one: \b[$S''$ is a <linear spline> on the same <spline knots>]. Its <third derivative> is constant on each open <interval> and can jump across the <spline knots>; its <fourth derivative> vanishes inside each open <interval>.
Back to article page