Read this lesson as text
Natural and Clamped Splines
Numerical Analysis · Axiom Academy
LESSON Natural & Clamped Splines Different boundary conditions, different behaviors A natural spline has zero second derivative at the endpoints: Physical interpretation: The spline has zero curvature at the endpoints, as if it continues as a straight line beyond the data. Among all C² functions passing through the data points, the natural spline minimizes the total bending energy: A clamped spline matches specified slopes at the endpoints: Use when you know the derivative values at the boundaries (e.g., from physics or the original function). If the true derivatives are known, clamped splines typically give better approximation than natural splines, especially near the endpoints. See how the same data produces different splines with different boundary conditions. Better accuracy if derivatives known Choosing the Right Boundary Condition No derivative information available Data represents a "complete" picture You want minimal assumed curvature Physical interpretation: flexible ruler Endpoint derivatives are known Interpolating a known function Need accurate behavior at boundaries Not-a-knot: S''' continuous at x₁ and xₙ₋₁ (MATLAB default) Periodic: S(x₀) = S(xₙ), S'(x₀) = S'(xₙ), S''(x₀) = S''(xₙ) for closed curves Parabolically terminated: First and last pieces are quadratic
This is the written version of the interactive lesson above. See the full Numerical Analysis course.