I have a question in my assignment (about interpolation) which has the condition that the third-order derivative is continuous at $x_2$ and $x_{N-1}$. That is, $S'''(x_2)=S'''(x_{N-2})$.

The question is about interpolation of N points using cubic spline interpolant.

I'm wondering how I can use the third-derivative condition. What kind of properties does it have?


The condition you wrote down is not quite correct. If the spline is third order continuous at $x=x_2$, then this means that the first and second segments have the same third derivative at this point. So, if $s_i$ denotes the $i$-th segment, we are told that $s_1'''(x_2) = s_2'''(x_2)$ and $s_{N-3}'''(x_{N-2}) = s_{N-2}'''(x_{N-2})$. We don't know that $s'''(x_2) = s'''(x_{N-2})$.

The condition is called the "not a knot" condition. It's a somewhat arbitrary condition that is used to add two more constraints to the spline. This ensures that the number of degrees of freedom of the spline is the same as the number of given data points (so that you can solve a linear system of equations and construct the spline).

Basically, it means that there is not a knot between the first segment of the spline and the second -- in other words, the first and second segments are the same cubic polynomial. The same reasoning applies to the last and last-but-one segments. Use these conditions to write down two additional linear equations that you add to the set that you will solve to construct the spline.

The exact nature of the two extra equations depends on how you are representing the cubic segments. If each of them is written in the form $s_i(x) = a_ix^3 +b_ix^2 + c_ix = d_i$, for example, then the condition $s_1'''(x_2) = s_2'''(x_2)$ tells you that $a_1 = a_2$.

  • $\begingroup$ Thanks for the explanation! I got this question already by listing the equations for all different-order derivatives! $\endgroup$ – Yilun Zhang May 17 '14 at 20:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.