CS3414 Afterclass Notes --- 3 June, 2002
- Piecewise Polynomials
- Intro (last week)
- To complete our discussion of splines, we looked at
how to construct a cubic spline interpolant. The straightforward
approach is to set up and solve
a 4n x 4n linear system for the 4n coefficients defining a piecewise
cubic written in the
standard form, i.e., n different cubic polynomials defined in the
power or shifted-power form, one polynomial for each piece.
By enforcing the interpolation and
continuity conditions, we have 4n-2 equations.
Need two more. In the case of ``natural''
splines, the two additional equations are
p''(t0) = 0 and p''(tn) = 0. (Note: with shifted power basis and
a little cleverness, cost to solve for the coefficients can be
reduced to O(n)).
- By choosing basis functions cleverly, the cost can be reduced
further, e.g., using B-spline basis functions (see Section 7.3),
or Hermite cubics.
- Hermite cubics
- Definition: a piecewise cubic with
only 1 continuous derivative at the knots.
- The Hermite cubic basis functions are
defined to make it easy to define an interpolating piecewise cubic.
This approach is especially convenient if you know both function
values and derivatives at the knots.