Runge Phenomenon and Chebyshev Cure
What you are seeing: polynomial interpolation of the Runge function on . With equispaced nodes (orange), the interpolant matches at the nodes but oscillates wildly between them. With Chebyshev nodes (cyan), it converges uniformly. The black curve is the true function.
Cause: equispaced interpolation has a Lebesgue constant that grows like . Chebyshev nodes cluster at the endpoints to keep the constant bounded (). The bottom panel plots max error vs for both schemes.
n nodes12
speed2
WHAT TO TRY
- Raise the node count n: the equispaced interpolant grows wild oscillations near the endpoints (the Runge phenomenon) while the Chebyshev interpolant hugs the function. The error panel shows equispaced diverging and Chebyshev converging.
- Look at where the nodes sit: Chebyshev clusters them near the endpoints, exactly where equispaced sampling fails, which tames the boundary blow-up.
- Push n past 15 equispaced: the maximum error explodes exponentially, a warning that more uniform data can make a polynomial fit worse, not better.