![]()
![]()
for
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].
Proof Cubic Spline Quadrature Cubic Spline Quadrature
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.
Animations (Natural Cubic Spline Quadrature Natural Cubic Spline Quadrature).
Computer Programs Cubic Spline Quadrature Cubic Spline Quadrature
Mathematica Subroutine (Natural Cubic Spline).
Execute the following large group of cells:
Example
1 Investigate cubic spline quadrature for
approximating the integral
.
Use 11, 21, 41 and 81 nodes. Compare with the
analytic or "true value" of the integral.
Solution
1.
Example 2. Use
cubic spline quadrature to compute a numerical approximation to the
integral
.
Use the tolerances
. Compare
with the analytic or "true value" of the integral.
Solution
2.
Example 3. Use
cubic spline quadrature to compute a numerical approximation to the
integral
.
Use the tolerances
. Compare
with Mathematica's "numerical value" of the integral.
Solution
3.
Example 4. Use
cubic spline quadrature to compute a numerical approximation to the
integral
.
Use the tolerances
. Compare
with the analytic or "true value" of the integral.
Solution
4.
Example 5. Use
cubic spline quadrature to compute a numerical approximation to the
integral
.
Use the tolerances
. Compare
with the analytic or "true value" of the integral.
Solution
5.
Various Scenarios and Animations for Cubic Spline Quadrature.
Example
6. Let
over
. Use
cubic spline quadrature to approximate the value of the
integral.
Solution
6.
Animations (Natural Cubic Spline Quadrature Natural Cubic Spline Quadrature).
Download this Mathematica Notebook Cubic Spline Quadrature
Return to Numerical Methods - Numerical Analysis
(c) John H. Mathews 2004