Chebyshev nodes tame Runge's function
At degree 20 equally spaced nodes err by 60 and Chebyshev nodes by 0.018; at degree 40 Chebyshev is below .
equally spaced nodesChebyshev nodes
| Quantity | Viv | Checked by |
|---|---|---|
err equi | [0.438357, 1.04517, 3.66326, … ] (10 values) | from degree 8 on, the equispaced error grows with every step of 4 in degree, and the Chebyshev error falls |
err cheb | [0.459981, 0.204682, 0.084396, … ] (10 values) | from degree 8 on, the equispaced error grows with every step of 4 in degree, and the Chebyshev error falls |
err equi 20 | 59.8223 | equally spaced nodes at degree 20: error above 50 |
err cheb 20 | 0.0177372 | Chebyshev nodes at degree 20: error below 0.02 |
err cheb 40 | 0.000339877 | Chebyshev nodes at degree 40: error below 1e-3 |
runge_chebyshev.viv
Output · native build · Oct 14, 2026 · 0.85 s
err_equi: [0.438357, 1.04517, 3.66326, 14.3939, 59.8223, 257.213, 1130.97, 5058.96, 22897.5, 104639] err_cheb: [0.459981, 0.204682, 0.084396, 0.0367129, 0.0177372, 0.00816575, 0.00365221, 0.00161819, 0.000747009, 0.000339877] cheb_rate: -0.0868674 err_equi_20: 59.8223 err_cheb_20: 0.0177372 err_cheb_40: 0.000339877
- ✓ equally spaced nodes at degree 20: error above 50
- ✓ Chebyshev nodes at degree 20: error below 0.02
- ✓ from degree 8 on, the equispaced error grows with every step of 4 in degree, and the Chebyshev error falls
- ✓ Chebyshev nodes at degree 40: error below 1e-3
Open in the workbenchAtlasMore math claims
- Full statement
- Interpolating Runge's function on by a polynomial of degree 20, equally spaced nodes give a largest error above 50 near the ends, while Chebyshev nodes give a largest error below 0.02. From degree 8 to 40 (in steps of 4) the equispaced error grows at every step while the Chebyshev error falls at every step, geometrically, to below at degree 40.
- Scope
- Errors are the largest over 2,001 equally spaced test points; the interpolants are evaluated by the barycentric formula, which is forward stable at Chebyshev nodes; at equispaced nodes its rounding error grows with the Lebesgue constant (Higham 2004), and up to degree 40 it stays far below the interpolation error measured.
- Reference
- Trefethen, Approximation Theory and Approximation Practice (2013), chapters 11 and 13: equispaced interpolants of this function diverge, Chebyshev interpolants converge geometrically at the rate set by its poles at .
claims/math/runge_chebyshev.viv#d4b9c48fab