BarycentricInterpolation.BarycentricInterpolationModule

BarycentricInterpolation

This package implements the Barycentric formula for polynomial interpolation on equispaced points and Chebyshev points of the first and second kind. The formulae used are taken from the paper of Berrut and Trefethen, SIAM Review,

Additional Barycentric weights for Legendre points are taken from the paper of Wang, Huybrechs, and Vandewalle, Mathematics of Computation, 83 (290) 2893-2914, 2014.

Other packages that may be of interest are FastGaussQuadrature and ApproxFun.

Written by David A.W. Barton (david.barton@bristol.ac.uk) 2016-2021 and licensed under the MIT license https://opensource.org/licenses/MIT

BarycentricInterpolation.differentiation_matrixMethod
differentiation_matrix(poly::AbstractPolynomial)

Return the differentiation matrix at the nodes of the polynomial specified.

P = Chebyshev2{5}()
D = differentiation_matrix(P)

Now dy/dx ≈ D*y at the nodes of the polynomial.

BarycentricInterpolation.interpolateMethod
interpolate(poly::AbstractPolynomial, y₀, [x])

Return the value of y(x) given that y(nodes(poly)) = y₀. If the value of x is not provided, return a function y(x) that evaluates the interpolant at any x.

BarycentricInterpolation.interpolation_matrixMethod
interpolation_matrix(poly::AbstractPolynomial, x)

Return the interpolation matrix from the nodes of poly to the point(s) x. For example :

P = Chebyshev2{5}()
x = range(-1, stop=1, length=10)
M = interpolation_matrix(P, x)

Now y(x) ≈ M*y₀ given that `y(nodes(poly)) = y₀.