Natural Cubic Spline
Join three data points with a smooth piecewise cubic and inspect interpolation, derivative continuity and natural end conditions.
Free theory articleJoin three data points with a smooth piecewise cubic and inspect interpolation, derivative continuity and natural end conditions.
Concept & interpretation
A cubic spline is a piecewise function consisting of cubic polynomials that connect a set of data points (knots). A natural cubic spline enforces the constraint that the second derivative is exactly zero at the endpoints. It provides C2 continuity everywhere, meaning its value, first derivative, and second derivative are all continuous across the interior knots.
Experiment: End Conditions
Open the Natural Cubic Spline module.
- Select Value at x=0 to -2, and select Value at x=2 to -1.
- Select Value at x=1 to 2 and Probe x to 0.
- Observe that the Second Derivative at this endpoint is 0.
- The endpoint second derivative is zero, while the first derivative here is 5.75. Zero second derivative at a boundary does not establish an inflection point or prevent overshoot. Change Probe x to 2: the second derivative is again zero, while the first derivative is -4.75. The module does not extrapolate beyond the endpoints.