articleAINumerics
The Runge phenomenon, where more points give a worse fit
Interpolate by a polynomial through equally spaced points and the error grows as you add points. Move the same number of points to and it falls geometrically, at a rate you can work out from where the function's poles are.
Open in the workbenchDownload .vivOutputs below are from the site build’s run; Run all runs it again in your browser.
Look inside this program
- Atlas
The program’s map: every function and which calls which.
There’s no recorded run of this program yet.
The function has poles at . Polynomial interpolation in Chebyshev points converges like , where is the size of the largest ellipse with foci that the function is analytic inside. The ellipse through has . Both interpolants use the barycentric formula, which is stable in Chebyshev points. With equally spaced points the problem is ill-conditioned (its Lebesgue constant grows exponentially with ), and this formula adds rounding error of its own.
Printed
Tests 3 of 3 pass
- with equally spaced points, doubling them makes the error more than thirty times larger (passes)
- with Chebyshev points the same 21 are good to two percent (passes)
- and the error falls like rho^-n, with rho set by the poles at +-i/5 (passes)