= Solution
Put $E=T-S$. Matching <interpolation> data and endpoint <derivatives> gives
$$
E(x_i)=0\quad(0\leq i\leq n),\qquad E'(x_0)=E'(x_n)=0.
$$
The endpoint slope constraints make $S$ a <clamped cubic spline>. The decisive step in its <minimum roughness property of a clamped cubic spline> is the <orthogonality> identity
$$
\int_{x_0}^{x_n}S''(x)E''(x)\,dx=0.
$$
Prove it separately on each <interval>. Two applications of <integration by parts>, using the vanishing <fourth derivative> of the cubic piece, give
$$
\int_{x_{i-1}}^{x_i}S''E''\,dx
=[S''E']_{x_{i-1}}^{x_i}-[S'''E]_{x_{i-1}}^{x_i}
=[S''E']_{x_{i-1}}^{x_i}.
$$
The second boundary term is zero because $E$ vanishes at both endpoints of this <interval>. Sum over $i$. At each interior <spline knot>, the two values of $S''E'$ agree because both factors are continuous, so the contributions cancel. The remaining outer boundary terms vanish because $E'$ is zero at both outer endpoints. This proves the identity.
Expanding the square now gives the stronger exact equality
$$
\boxed{\int_{x_0}^{x_n}(T'')^2\,dx
=\int_{x_0}^{x_n}(S'')^2\,dx
+\int_{x_0}^{x_n}(T''-S'')^2\,dx.}
$$
The last <integral> is nonnegative, proving the required inequality. It measures the excess <second derivative roughness penalty> of $T$ over $S$.
The argument applies directly to twice continuously differentiable competitors. More generally it holds when $T'$ is an <absolutely continuous function> and $T''$ is <square-integrable>, the usual finite-energy class for this <second derivative roughness penalty>. Mere existence of pointwise <second derivatives> does not by itself guarantee that all displayed <integrals> exist; the variational statement is understood for admissible competitors with this regularity.
Back to article page