Skip to article frontmatterSkip to article content

7.4Minimax approximation

#%config InlineBackend.figure_format = 'svg'
from pylab import *
from scipy.interpolate import barycentric_interpolate

Given integer n0n \ge 0 and a function ff, we can approximate it by a degree nn interpolating polynomial pp. The approximation depends on the choice of nodes; different choice lead to different error fpf-p. Is there a polynomial which gives the smallest error ?

7.4.1Best approximation in max norm

Let f:[1,1]Rf : [-1,1] \to \re be a continuous function. Given the degree n0n \ge 0, find a pPnp^* \in \poly_n for which the error is minimized, i.e.,

fpfp,pPn\norm{f-p^*} \le \norm{f-p}, \qquad \forall p \in \poly_n

If such a pp^* exists, then define

En=En(f):=minpPnfp=fpE_n = E_n(f) := \min_{p \in \poly_n} \norm{f-p} = \norm{f-p^*}

We will use the maximum norm

ϕ=maxx[1,+1]ϕ(x)\norm{\phi} = \max_{x \in [-1,+1]} |\phi(x)|

This type of approximation is also called a minimax approximation since

En=minpPnmaxx[1,1]f(x)p(x)=fpE_n = \min_{p \in \poly_n} \max_{x \in [-1,1]} |f(x) - p(x)| = \norm{f-p^*}

and EnE_n is the minimum achievable approximation error by any polynomial of degree nn.

As we show in theorem below, equioscillation of the error fpf-p 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 f:[1,1]Rf : [-1,1] \to \re and let us write p(x)p(x) in terms of Chebyshev polynomials

p(x)=j=0najTj(x)p(x) = \sum_{j=0}^n a_j T_j(x)
  1. Choose n+2n+2 points {x0,x1,,xn+1}[1,1]\{x_0, x_1, \ldots, x_{n+1}\} \subset [-1,1] and such that

    f(xi)p(xi)=(1)iEp(xi)+(1)iE=f(xi)j=0najTj(xi)+(1)iE=f(xi),0in+1\begin{align} f(x_i) - p(x_i) &= (-1)^i E \\ p(x_i) + (-1)^i E &= f(x_i) \\ \sum_{j=0}^n a_j T_j(x_i) + (-1)^i E &= f(x_i), \qquad 0 \le i \le n+1 \end{align}

    This is a linear system of n+2n+2 equations for the n+2n+2 unknowns {a0,a1,,an+1,E}\{a_0, a_1, \ldots, a_{n+1}, E\} which can be solved. The EE may be positive or negative.

  2. If the condition E=±maxxf(x)E = \pm \max_x |f(x)| is satisfied, then stop the iteration. Otherwise continue with the next step.

  3. The error oscillates in sign at the n+2n+2 points so it is zero at some n+1n+1 intermediate points {z0,z1,,zn}\{z_0, z_1, \ldots, z_n\}.

    Findzj[xj,xj+1],f(zj)p(zj)=0,0jn\textrm{Find} \qquad z_j \in [x_j, x_{j+1}], \qquad f(z_j) - p(z_j) = 0, \qquad 0 \le j \le n

    by using some root finding method.

  4. In the n+2n+2 intervals [1,z0],[z0,z1],,[zn,1][-1,z_0], [z_0, z_1], \ldots, [z_n, 1], find the points {x0,x1,,xn+1}\{x_0^*, x_1^*, \ldots, x_{n+1}^*\} where the error fpf-p takes maximum or minimum value. Do this by solving (fp)(x)=0(f'-p')(x)=0 and also check at the end points of the intervals.

  5. Set xj=xjx_j = x_j^* 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 n0n \ge 0 let pnp_n^* be the minimax approximation and pnp_n be some other interpolation which can be written as

pn(x)=j=0nf(xj)j(x)p_n(x) = \sum_{j=0}^n f(x_j) \ell_j(x)

where j\ell_j are the Lagrange polynomials. Then we can write

pn(x)=j=0npn(xj)j(x)p_n^*(x) = \sum_{j=0}^n p_n^*(x_j) \ell_j(x)

and

pn(x)pn(x)=j=0n(pn(xj)f(xj))j(x)pn(x)pn(x)j=0npn(xj)f(xj)j(x)(j=0nj(x))fpnpnpn(maxxj=0nj(x))fpn\begin{align} p_n^*(x) - p_n(x) &= \sum_{j=0}^n (p_n^*(x_j) - f(x_j)) \ell_j(x) \\ |p_n^*(x) - p_n(x)| &\le \sum_{j=0}^n |p_n^*(x_j) - f(x_j)| \cdot |\ell_j(x)| \\ &\le \left(\sum_{j=0}^n |\ell_j(x)| \right) \norm{f - p_n^*} \\ \norm{p_n^* - p_n} &\le \left( \max_x \sum_{j=0}^n |\ell_j(x)| \right) \norm{f - p_n^*} \end{align}

Define the Lebesgue constant

Λn=maxxj=0nj(x)\Lambda_n = \max_x \sum_{j=0}^n |\ell_j(x)|

whose value depends on the distribution of points. Therefore

fpn=fpn+pnpnfpn+pnpn(1+Λn)fpn\begin{align} \norm{f - p_n} &= \norm{f - p_n^* + p_n^* - p_n} \\ & \le \norm{f - p_n^*} + \norm{p_n^* - p_n} \\ &\le (1 + \Lambda_n) \norm{f - p_n^*} \end{align}

The interpolation error is atmost a factor 1+Λn1 + \Lambda_n larger than the error of the best approximation. If Λn1\Lambda_n \gg 1, then pnp_n 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 n=100n=100

  • uniform points: Λ100>3×1025\Lambda_{100} > 3 \times 10^{25}
  • Chebyshev points: Λ100<1.8\Lambda_{100} < 1.8
Footnotes
  1. This is true for any normed vector space and is a consequence of xyxy|\norm{x} - \norm{y}| \le \norm{x-y}.

  2. Show that it is closed by showing all limit points belong to VnV_n.

  3. It is bounded because

    p=pf+fpf+ff+f=2f<\norm{p} = \norm{p-f+f} \le \norm{p-f} + \norm{f} \le \norm{f} + \norm{f} = 2\norm{f} < \infty
References
  1. Kreyszig, E. (1978). Introductory Functional Analysis With Applications. John Wiley & Sons, Inc.
  2. Veidinger, L. (1960). On the numerical determination of the best approximations in the Chebyshev sense. Numerische Mathematik, 2(1), 99–105. 10.1007/BF01386215
  3. Trefethen, L. N. (2019). Approximation Theory and Approximation Practice, Extended Edition. Society for Industrial. 10.1137/1.9781611975949