The Order Beneath · No.17 · Live plates
Approximation
Approximation of functions
Plates on approximation, the art of copying a function with something simpler, each one computed in the browser as you watch: the radius of convergence, Taylor polynomials that follow sin x further and further out but stop dead at |x| = 1 for arctan x, a function smooth along the whole real line, because of the singularities it has at ±i in the complex plane, where the error of every polynomial is drawn at every pixel and closes up into the disc of convergence, and the Padé approximants, rational functions found by Gaussian quadrature, which put their poles on the branch cuts and converge beyond the disc; Runge's phenomenon, polynomials through more and more equally spaced points of 1/(1 + 25x²) that swing ever more wildly near the ends, the same polynomials through Chebyshev points that converge, the reason in the complex plane, where the error is decided by the poles at ±i/5 and a curve drawn from the nodes, and the Lebesgue constant, which says how much worse than the best polynomial interpolation can be; equal ripples, the Chebyshev polynomials seen as cosines wrapped round a cylinder, the monic polynomial that stays smallest, the Remez exchange finding the best approximation to eˣ by making its error ripple with equal height, and Chebyshev coefficients that fall at a rate set by an ellipse through the nearest pole; and any continuous function, Bernstein's polynomials averaging a function with binomial weights, converging even to Weierstrass's function with no derivative anywhere, and drawing Bézier curves by de Casteljau's construction; and splines, the draftsman's strip that bends least through its points, B-splines grown from a box by sliding it along again and again until they look like the normal curve, splines converging on the equally spaced points where polynomials failed, the error falling sixteen-fold each time the spacing is halved, and Chaikin's corner cutting, which turns a polygon into a spline. The corner keeps the error, measured on the curves in the picture, beside what the theory predicts.