Another method to interpolate lines is by interpolating
individual sections of the curve, for instance, using a cubic polynomial.
The higher the degree of polynomial, the higher the degree of continuity
from connected points, to matching first, second, and nth derivative. However,
higher degree polynomials have the potential to overshoot the approximated
curve. The overshoot also applies to high degree polynomials from the Newton
polynomial interpolation. Higher degree polynomials become less stable
and can vastly overshoot the estimate the estimated curve.
Constraints needed to solve for splines
Solving the coefficients of splines requires having enough constraints.
Given n+1 point and degree d (polynomial with highest power d-1) needs
dn constraints as follows (some things quoted directly from the source:
-
The functions pass through the given points (2n conditions)
-
The first derivates at the interior knots must be equal (n-1 conditions)
-
The second derivative at the interior must be equal (n-1 conditions)
-
The second derivative at the end knots is arbitrarily chosen (2 conditions)
-
Continue to take the derivative to derive more conditions.
Special case cubic spine
The cubic spline can be derived in a particular point. Although the
equation is quite long, it reduces the number of unknowns. The equation,
however can be used in the Newton-Cotes integration techniques.