[Math] intuition about cubic splines vs quadratic splines (degree 3 vs degree 2).

intuitionnumerical methodsspline

my intuition about quadratic(degree 2) splines is that by the help of its three variables (in each sub-interval) you can make a piecewise differentiable function on the whole interval.

in the process of finding a degree 2 spline generally we need to exactly specify the derivative of ONE point and then we find a unique spline .

But since we usually need to specify the derivative of both end points then generally we cannot do this with a degree 2 spline.

so we raise the spline power to 3 . now we have 4 variables for each sub-interval .

now my intuition suggests that with this new variable we simply plug in both end point derivative conditions and we get a unique answer .

BUT instead, by adding the new variable we are ALSO able to make the second derivative continuous .

Question is
how adding one variable can handle both the endpoints derivative condition and the second derivative continuity condition ?

Best Answer

Let's count the conditions: $N+1$ points for $N$ intervals. Resulting in $4N$ coefficients of $N$ cubic polynomials. On the side of the equations we get

  • $2N$ prescribed function values
  • $N-1$ continuity conditions for the first derivative
  • $N-1$ continuity conditions for the second derivative
  • the third derivative is piecewise constant, so there must be jumps, no equations.

Which still leaves us with a difference of $2$ degrees of freedom. One usually imposes conditions on the first and last point, for instance a zero second derivative