lebesgue


lebesgue, a MATLAB code which is given a set of nodes in 1D, and plots the Lebesgue function, and estimates the Lebesgue constant, which measures the maximum magnitude of the potential error of Lagrange polynomial interpolation.

Any set of nodes in the real line X(I), for 1 <= I <= N, defines a corresponding set of Lagrange basis functions:

        L(I)(X) = product ( 1 <= J <= N, J /= I ) ( X    - X(J) ) 
                / product ( 1 <= J <= N, J /= I ) ( X(I) - X(J) )
      
with the property that
        L(I)(X(J)) = 0 if I /= J
                     1 if I  = J
      

The Lebesgue function is formed by the sum of the absolute values of these Lagrange basis functions:

        LF(X) = sum ( 1 <= I <= N ) | L(I)(X) |
      
and the Lebesgue constant LC is the maximum value of LF(X) over the interpolation interval, which is typically X(1) to X(N), or min ( X(*) ), max ( X(*) ), or [-1,+1], or some user-defined interval.

Licensing:

The information on this web page is distributed under the MIT license.

Languages:

lebesgue is available in a C version and a C++ version and a Fortran90 version and a MATLAB version and an Octave version and a Python version.

Related Data and Programs:

lebesgue_test

ccl_test, a MATLAB code which estimates the Lebesgue constants for sets of points in [-1,+1] computed in several ways. The program is probably of limited interest except as an example of an application of the lebesgue_constant() function.

quad_rule, a MATLAB code which defines quadrature rules for approximating an integral over a 1D domain.

Reference:

  1. Jean-Paul Berrut, Lloyd Trefethen,
    Barycentric Lagrange Interpolation,
    SIAM Review,
    Volume 46, Number 3, September 2004, pages 501-517.

Source Code:


Last revised on 13 February 2019.