LEBESGUE
Estimate the Lebesgue Constant
LEBESGUE
is a MATLAB library 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 userdefined interval.
Licensing:
The computer code and data files described and made available on this web page
are distributed under
the GNU LGPL license.
Languages:
LEBESGUE is available in
a C version and
a C++ version and
a FORTRAN77 version and
a FORTRAN90 version and
a MATLAB version and
a Python version.
Related Data and Programs:
CCL,
a MATLAB program 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.
QUADRULE,
a MATLAB library which
defines quadrature rules for approximating an integral over a 1D domain.
Reference:

JeanPaul Berrut, Lloyd Trefethen,
Barycentric Lagrange Interpolation,
SIAM Review,
Volume 46, Number 3, September 2004, pages 501517.
Source Code:

chebyshev1.m,
evaluates the Chebyshev Type 1 points.

chebyshev2.m,
evaluates the Chebyshev Type 2 points.

chebyshev3.m,
evaluates the Chebyshev Type 3 points.

chebyshev4.m,
evaluates the Chebyshev Type 4 points.

equidistant1.m,
evaluates the Equidistant Type 1 points.

equidistant2.m,
evaluates the Equidistant Type 2 points.

equidistant3.m,
evaluates the Equidistant Type 3 points.

fejer1.m,
evaluates the Fejer Type 1 points.

fejer2.m,
evaluates the Fejer Type 2 points.

lebesgue_constant.m,
estimates the Lebesgue constant.

lebesgue_function.m,
evaluates the Lebesgue function.

lebesgue_plot.m,
plots the Lebesgue function.

timestamp.m,
prints the current YMDHMS date as a timestamp;
Examples and Tests:

lebesgue_test.m,
runs all the tests;

lebesgue_test_output.txt,
the output file.

lebesgue_chebyshev1_test.m,
examines point sets computed by chebyshev1().

lebesgue_chebyshev2_test.m,
examines point sets computed by chebyshev2().

lebesgue_chebyshev3_test.m,
examines point sets computed by chebyshev3().

lebesgue_chebyshev4_test.m,
examines point sets computed by chebyshev4().

lebesgue_equidistant1_test.m,
examines point sets computed by equidistant1().

lebesgue_equidistant2_test.m,
examines point sets computed by equidistant2().

lebesgue_equidistant3_test.m,
examines point sets computed by equidistant3().

lebesgue_test08.m,
examines point sets computed by fejer1().

lebesgue_test09.m,
examines point sets computed by fejer2().
The test programs create plots of the Lebesgue function for
specific sizes of the point sets.
You can go up one level to
the MATLAB source codes.
Last revised on 17 January 2014.