Background for Cubic Spline.
Suppose that are n+1 points,
where . The
function is
called a
cubic spline if
there exists n cubic polynomials with
coefficients that
satisfy the properties:
I.
for .
II. for .
The spline passes through each data point.
III. for .
The spline forms a continuous function
over [a,b].
IV. for .
The spline forms a smooth function.
IV. for .
The second derivative is continuous.
Natural Spline. There
exists a unique cubic spline with the free boundary conditions and .
Cubic Spline Quadrature. Integrate
the natural cubic spline over the interval [a,b].
Algorithm
Natural Cubic Spline. To
construct and evaluate the cubic spline interpolant
for the
data points , using
the free boundary conditions and .
Then integrate the natural cubic spline for a
quadrature method.
Mathematica Subroutine (Natural
Cubic Spline).
Execute the following large group of cells:
|