Spline questions (Degrees of freedom of cubic spline)

spline

  1. How many degrees of freedom has a cubic Spline? And how to calculate it?

I know it has to do something with the degree of the polynomial, so in cubic the $n=3$, and also let's say we have $k-1$ number of intervals, where $k$ is the number of points.

  1. Let's say I want to calculate/make the matrix for solving the spline and two of the points are the same. Would it make the matrix not invertible (singular) ?

  2. How does Cubic Spline Interpolation compare to Vandermonde-Interpolation with high number of points? Does it oscillate similarly?

Best Answer

1) For a cubic spline with $(k-1)$ intervals, there will be $(k-1)$ cubic polynomials and therefore $4(k-1)$ unknowns to be solved.

For the spline to be $C^0$ continuous everywhere, we need to enforce positional continuity at each of the $(k-2)$ interior points. Therefore, the DOF count will become $4(k-1)-(k-2)=3k-2$.

For a $C^1$ continuous spline, we need to enforce first derivative continuity at those $(k-2)$ interior points, making the DOFs count $(3k-2)-(k-2)=2k$.

For a $C^2$ continuous spline, we need to enforce 2nd derivative continuity at those $(k-2)$ interior points, making the DOFs count $2k-(k-2)=k+2$.

2) Having two consecutive points coincident will make the matrix unsolvable only when you derive the parameters from the Euclidean distance between points. For example, if you use chord length paramatrization, having two coincident consecutive points will give you two identical parameters, which will make your matrix unsolvable. But if you use uniform parametrization, the matrix will still be solvable.

3) Vandermonde interpolation will oscillate much more severely than cubic spline interpolation as the former involve high degree polynomials. When using cubic spline interpolation, choosing the "parameters" properly is the most important step to reduce the possible oscillation.

Related Question