#%config InlineBackend.figure_format = 'svg'
from pylab import *
from scipy.interpolate import barycentric_interpolate
Given integer and a function , we can approximate it by a degree interpolating polynomial . The approximation depends on the choice of nodes; different choice lead to different error . Is there a polynomial which gives the smallest error ?
7.4.1Best approximation in max norm¶
Let be a continuous function. Given the degree , find a for which the error is minimized, i.e.,
If such a exists, then define
We will use the maximum norm
This type of approximation is also called a minimax approximation since
and is the minimum achievable approximation error by any polynomial of degree .
As we show in theorem below, equioscillation of the error is a necessary and sufficient condition for the best approximation.
7.4.2Characterization of minimax¶
7.4.3Remez algorithm¶
The algorithm to find the best approximation was proposed by E. Remez (1934) and is explained in Veidinger, 1960. Let and let us write in terms of Chebyshev polynomials
Choose points and such that
This is a linear system of equations for the unknowns which can be solved. The may be positive or negative.
If the condition is satisfied, then stop the iteration. Otherwise continue with the next step.
The error oscillates in sign at the points so it is zero at some intermediate points .
by using some root finding method.
In the intervals , find the points where the error takes maximum or minimum value. Do this by solving and also check at the end points of the intervals.
Set and go to Step 1.
We can observe that the algorithm is complicated and expensive. The need to find several roots and maxima/minima adds to the cost.
7.4.4Minimax versus interpolation¶
Given degree let be the minimax approximation and be some other interpolation which can be written as
where are the Lagrange polynomials. Then we can write
and
Define the Lebesgue constant
whose value depends on the distribution of points. Therefore
The interpolation error is atmost a factor larger than the error of the best approximation. If , then may be too far from the best approximation error.
See discussion after Theorem 15.2 in Trefethen, 2019 for a history of these results.
For
- uniform points:
- Chebyshev points:
- Kreyszig, E. (1978). Introductory Functional Analysis With Applications. John Wiley & Sons, Inc.
- Veidinger, L. (1960). On the numerical determination of the best approximations in the Chebyshev sense. Numerische Mathematik, 2(1), 99–105. 10.1007/BF01386215
- Trefethen, L. N. (2019). Approximation Theory and Approximation Practice, Extended Edition. Society for Industrial. 10.1137/1.9781611975949