[Math] comparison of piecewise linear interpolation, cubic interpolation, cubic spline interpolation

interpolationnumerical methods

What are the advantages and disadvantages of piecewise linear interpolation, cubic interpolation, and cubic spline interpolation?

I know that piecewise linear interpolation is not smooth and may not be accurate for nonlinear functions. The other two are smooth.

But I think my understanding is a little superficial. Especially the difference between the cubic interpolation and cubic spline though I know how to compute them. Could someone help me understanding the advantages and disadvantages of these three? Thanks so much!

Best Answer

In general, cubic interpolation is better than linear interpolation in most aspects such as smoothness of the function and higher accuracy in approximating the original function. However, there is at least one aspect where linear interpolation is better: the linear interpolation will not produce the "overshoot" situation. For example, if you have a function that always produce positive y values, using cubic interpolation to approximate this function might give you a function that "overshoots" to negative y territory even when all the interpolated y values are positive. This will not happen with linear interpolation.

As for "cubic spline interpolation", I am not aware of any context where "cubic interpolation" and "cubic spline interpolation" are considered as different.