Overcoming Runge's Phenomenon Using Smooth Cubic Splines

This article explores how cubic splines effectively resolve Runge's phenomenon in numerical mathematics. While single high-degree polynomials often suffer from severe oscillations when interpolating equidistant data points, cubic splines bypass this issue entirely. By connecting a series of low-degree, third-order polynomials and enforcing strict continuity conditions at their joints, cubic splines achieve a stable, accurate, and smooth curve across the entire dataset.

The Problem: Runge's Phenomenon

In numerical analysis, interpolation is the method of constructing new data points within the range of a discrete set of known data points. A common approach is polynomial interpolation, where a single polynomial of degree \(n-1\) is fitted through \(n\) data points.

As the number of data points increases, the degree of the required polynomial also increases. Runge's phenomenon occurs when using high-degree polynomials over equally spaced interpolation points. Instead of producing a smoother and more accurate curve, the high-degree polynomial oscillates wildly toward the edges of the interval. This happens because the derivatives of high-degree polynomials grow rapidly, making the curve hyper-sensitive to small changes and causing massive estimation errors between the data points.

The Solution: Piecewise Low-Degree Polynomials

Cubic splines avoid Runge's phenomenon by abandoning the idea of using a single global polynomial. Instead, spline interpolation divides the dataset into smaller sub-intervals, treating the known data points as "knots" that connect separate polynomial segments.

Between each pair of adjacent knots, a cubic spline uses a polynomial of degree three (a cubic polynomial) in the form:

\[S_i(x) = a_i + b_i(x - x_i) + c_i(x - x_i)^2 + d_i(x - x_i)^3\]

Because the degree of the polynomial is permanently fixed at three—regardless of whether there are 5 or 5,000 data points—the high-degree derivatives responsible for Runge's phenomenon never develop. A third-degree polynomial simply lacks the mathematical flexibility to oscillate wildly between two points, keeping the curve tightly bound to the path of the data.

Piecing Polynomials Together Smoothly

Using separate polynomials for each interval solves the oscillation problem, but it introduces a new challenge: preventing sharp corners or breaks where the segments meet. Cubic splines achieve a seamless curve by enforcing strict mathematical conditions at every interior knot.

For the human eye and mathematical applications to perceive the piecewise curve as a single, smooth entity, the spline must satisfy three levels of continuity at each knot where segment \(S_{i-1}(x)\) meets segment \(S_i(x)\):

  1. Positional Continuity (\(C^0\)): The segments must meet at the exact same data point. There can be no gaps in the line.
  2. Derivative Continuity (\(C^1\)): The first derivatives of adjacent segments must be equal at the knot. This ensures the slope is identical on both sides of the point, eliminating sharp corners.
  3. Curvature Continuity (\(C^2\)): The second derivatives of adjacent segments must also be equal at the knot. This ensures the rate of change of the slope (concavity) transitions smoothly, preventing sudden shifts in how the line bends.

Why Degree Three is the Sweet Spot

The choice of a cubic (degree three) polynomial is intentional.

  • Linear splines (degree one) connect points with straight lines, resulting in sharp, jagged corners (violating \(C^1\) continuity).
  • Quadratic splines (degree two) can match slopes, but they cannot guarantee smooth curvature changes (violating \(C^2\) continuity) and lack inflection points, meaning a single segment cannot curve both up and down.
  • Cubic splines (degree three) provide the exact minimum number of coefficients (four per segment) required to pass through two points while matching both the first and second derivatives of the neighboring segments.

By solving a system of linear equations derived from these continuity conditions, numerical mathematicians can determine the exact coefficients for every cubic segment simultaneously. The result is a curve that is locally controlled, computationally efficient, and completely immune to the boundary oscillations of Runge's phenomenon.