yAtlas

Studio · From Approximation

Where the points go

With the same number of points, where must they go for the polynomial through them to stop thrashing?

Composing the first frame…

The ivory curve is the bell curve 1/(1 + 25x²), and the gold one is the polynomial through the gold points on it. With the points evenly spaced, adding points helps at first; add more, and the fit gets closer in the middle while the swings at the ends grow ever wilder: at twenty-one points the largest error is about 60. This is Runge's phenomenon. Drag the first slider to the right and the points crowd towards the ends; at the far end they are Chebyshev points: divide a semicircle evenly and drop the midpoint of each piece straight down onto the diameter (the ice-blue arch and its lines). Same number of points, same curve, but the swings settle, and the largest error is three thousand times smaller; now adding points makes it smaller still. The corner measures the largest error on the sampled points of [−1, 1], and the short coral mark below the axis shows where it is; the next row works it out again on the same points without the polynomial, from the points and the two bad points ±i/5 alone; the two agree. Switch to the complex plane: the colour at each point is the error, one contour for each power of ten, and the gold line is where the error is 1. At every spot on the blue line, the distances to all the points, multiplied together, equal the same product taken from i/5; on the real line, wherever the axis lies inside the blue line the error is under 1/2. With twenty-one evenly spaced points the blue line pinches in the middle and leaves wide stretches near the ends outside, just where the polynomial thrashed; slide the points to the ends and the line opens out, almost an ellipse, around the whole stretch.