yAtlas

Studio · From Approximation

Equal ripples

Of all polynomials of degree at most n, what does the error look like for the one whose largest error is smallest?

Composing the first frame…

What you see is the error itself: f(x) minus a polynomial, magnified until it shows, with the true size of the error marked on the scale at the left. The coral dots are n + 2 reference points. Each move first finds the polynomial of degree at most n whose error at those points alternates in sign with equal size (the two gold dashed lines are that height, |h|), then moves the points to the peaks of the error. Set the move count back to 0 and step it up, or press play (after 12 it starts again from 0): at first (for eˣ at degree 4, say) the error is low on one side and runs off the picture on the other; for eˣ, after three to five moves the n + 2 peaks and troughs are pressed to one height, just touching the dashed lines, while the curve still crosses 0 between them. Now the largest error over the whole stretch equals |h| (the two numbers in the corner agree to the digits shown), and all n + 2 peaks and troughs reach it: of every polynomial of degree at most n, this one has the smallest maximum error. Change the degree and the number of peaks and troughs follows; switch to |x − 0.3|, with its corner, and the ripples still level out, only much higher, and it takes a few more moves.