# comparison of piecewise linear interpolation, cubic interpolation, cubic spline interpolation?

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!

• Different degrees of smoothness and freedom. You need to be little bit specific. – user251257 Mar 20 '16 at 18:14
• What do you mean by "cubic interpolation" ?? You can do "cubic interpolation" only if your data set has four points. – bubba Mar 21 '16 at 13:13

## 1 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.