Cubic spline interpolation
eli.thegreenplace.net
eli.thegreenplace.net
This is a misconception that's often repeated. High degree polynomial interpolations are problematic if you use equispaced points. If you use Chebyshev points, they are highly accurate and in general perform much better than cubic splines. See myth 1 from Lloyd Trefethen's paper: https://people.maths.ox.ac.uk/trefethen/mythspaper.pdf
Source? (I couldn't find that in the paper you linked.)
> If f has v derivatives, with the vth derivative being of bounded variation V, then ||f - p_n|| = O(V n^{-v}) as n -> ∞
and
> If f is analytic, the convergence is geometric, with ||f - p_n|| = O(p^{-n}) for some p > 1
You will not get that good of a rate of convergence with cubic splines. See https://www.researchgate.net/publication/243095286_On_the_Or...
This is further explained in Trefethen's book https://www.amazon.com/Approximation-Theory-Practice-Applied...
Quoting from Ch 14
> In fact, polynomial interpolants in Chebyshev points are problem-free when evaluated by the barycentric interpolation formula. They have the same behavior as discrete Fourier series for period functions, whose reliability nobody worries about. The introduction of splines is a red herring: the true advantage of splines is not that they converge where polynomials fail to do so, but that they are more easility adapted to irregular point distributions and more localized.
You can see also the software package https://www.chebfun.org/ for Chebyshev interpolations with Matlab and https://github.com/rnburn/bbai for Chebyshev interpolation of arbitrary dimension functions with sparse grids for Python. And here is a quick notebook for an experiment you can run that will compare Chebyshev interpolants to cubic splines: https://github.com/rnburn/bbai/blob/master/example/13-sparse...
In some cases cubic splines are a convenient and good enough tool, computationally cheap because the tridiagonal system involved can be solved in linear time.
I don’t see how “If you use Chebyshev points, polynomial interpolation isn’t problematic” is a refutation of the claim “Polynomial interpolation between a given set of points can be problematic”. That given set isn’t necessarily, and typically isn’t, a set of Chebyshev points.
That’s like saying “Integer factorization isn’t hard. If you pick powers of ten, it’s easy”.
https://splines.readthedocs.io/en/latest/euclidean/natural-u...
[1] https://www.semanticscholar.org/paper/Finite-element-methods...
1. You're integrating the polynomial that best approximates the function over the interval. This is why quadrature is exact for polynomials up to some order: the best approximating polynomial is the polynomial itself.
2. Polynomials are good approximations when the function is smooth. Most useful functions are.
3. Because of the smoothness, the behavior in the middle of the interval is largely affected by the behavior at the edges, so you need more densely sample the edges. Think of it like wiggling a string. You're only allowed to wiggle the end, but that very specifically defines the behavior in the middle.
4. There are lots of polynomial sets - Legendre, Chebyshev, Hermite, etc. They're each useful because they're orthogonal to a special weight function, and Legendre polynomials are kind of the default set because they have the simplest weight function: 1.
Here's an example, with fairly round numbers, because we need to use text instead of paper.
Let's say you have a function f, and its values at 1,2 and 3. f(1) = 1, f(2) = 3, f(3) = 2. We plot these 3 points, we call them A,B,C. What is the spline interpolation value at 1.5 ?
You start with the linear interpolation between A (the point (1,1)) and B (the point (2,3)). You get the value 2. Let's call the point (1.5, 2) as M.
Then you do the linear extrapolation of the segment BC. The new point is N with coordinates (1.5, 3.5).
Now move M horizontally until it hits the vertical line y=1, call that point M' (it has coordinates (1,2)). Move N to the vertical line y=3, it has coordinates (3,3.5). Draw the line M'N'. Where it intersects the vertical line y=1.5, that's where the spline interpolation is. It is the point (1.5, 2.375).
Of course, this is not only useful for paper and pencil stuff. That's how splines are actually implemented in lots of packages. You can easily implement it in Excel, if you need to, all with only cell formulas.
For my uses, cubic interpolation is simply not of value when I have noisy points and/or unpredictable behaviour between points --- Kalman smoothers or Gaussian process/Kriging gives me both a good mean estimate between points and a sense of the error associated with the interpolation.
[0] https://archive.org/details/creativecomputing-1980-07/page/n...
[1] https://en.wikipedia.org/wiki/Monotone_cubic_interpolation
The most notable difference is that a Bézier curve is defined in terms of control points that do not (generally) pass through the curve, while a polynomial spline is defined by the points it passes through; there are no additional control points.
(It's weirdly difficult to find an example to link)
Here's chaikins