Loading
Interpolating with more equally spaced points can make things worse: for the polynomial swings wildly near the ends (Runge's phenomenon). Chebyshev nodes, packed towards the ends, keep the error small.
Interpolate f = 1/(1 + 25x²) on [−1, 1] with 11 points, equally spaced and Chebyshev.
Here , , , so :
The nodes crowd towards the ends of the interval; the equally spaced ones are .
The polynomial swings wildly near the ends (Runge's phenomenon).
Almost 18 times smaller with the same number of points.
The calculator below opens on this function.
Using degrees in the cosine.
Forgetting to map to [a, b].
Using k = 1 … n.
Adding more equally spaced points to fix a wiggle.
Expecting the nodes to include the end points.
Writing only the final answer.
n from 2 to 30.
Add this calculator to a new note, next to your own working. It stays live: change the numbers there any time.