This page describes how to compute a polynomial in Bernstein form that comes close to a known function
The goal of these approximations is to avoid introducing transcendental and trigonometric functions to the approximation method. (Therefore, although this page also discusses approximation by so-called Chebyshev interpolants, that method is relegated to the appendix.)
Notes:
This page was originally developed as part of a section on approximate Bernoulli factories, or algorithms that toss heads with probability equal to a polynomial that comes close to a continuous function. However, the information in this page is of much broader interest than the approximate Bernoulli factory problem.
In practice, the level at which the function
$f(\lambda)$ is known may vary:
$f(\lambda)$ may be known so completely that any property of$f$ that is needed can be computed (for example,$f(\lambda)$ is given in a symbolic form such as$\sin(\lambda)/3$ or $\exp(-\lambda/4)$). Or...$f$ may be given as a "black box", but it's possible to find the exact value of$f(\lambda)$ for any$\lambda$ (or at least any rational$\lambda$ ) in$f$ 's domain. Or...- Only the values of
$f$ at a finite number of points (such as equally spaced points) may be known.In the last two cases, additional assumptions on
$f$ may have to be made in practice, such as upper bounds on$f$ 's first or second derivative, or whether$f$ has a continuous$r$ -th derivative for every$r$ (see "Definitions"). If$f$ does not meet those assumptions, the polynomial that approximates$f$ will not necessarily achieve the desired accuracy.1
- Introduction
- Contents
- About This Document
- Definitions
- Approximations by Polynomials
- Approximations by Rational Functions
- Request for Additional Methods
- References on Polynomial Sequences with "Fast" Approximation
- Notes
- Appendix
- License
This is an open-source document; for an updated version, see the source code or its rendering on GitHub. You can send comments on this document on the GitHub issues page, especially if you find any errors on this page.
My audience for this article is computer programmers with mathematics knowledge, but little or no familiarity with calculus.
This section describes certain math terms used on this page for programmers to understand.
The closed unit interval (written as [0, 1]) means the set consisting of 0, 1, and every real number in between.
For definitions of continuous, derivative, convex, concave, Hölder continuous, and Lipschitz continuous, see the definitions section in "Supplemental Notes for Bernoulli Factory Algorithms".
Any polynomial
where n is the polynomial's degree and a[0], a[1], ..., a[n] are its n plus one Bernstein coefficients (which this document may simply call coefficients if the meaning is obvious from the context).2
This section first shows how to approximate a function on the closed unit interval, then shows how to approximate a function on any closed interval.
Suppose
Then, a polynomial of a high enough degree (called
| Name | Polynomial | Its Bernstein coefficients are found as follows: | Notes |
|---|---|---|---|
| Bernstein polynomial. |
|
|
Originated with S.N. Bernstein (1912). Evaluates |
| Order-2 iterated Boolean sum. |
|
|
Micchelli (1973)3, Guan (2009)4, Güntürk and Li (2021, sec. 3.3)5. Evaluates |
| Order-3 iterated Boolean sum. |
|
|
Same. |
| Butzer's linear combination (order 2). |
|
(First, define the following operation: Get coefficients for Get coefficients for |
Tachev (2022)6, Butzer (1955)7. |
| Butzer's linear combination (order 3). |
|
Get coefficients for |
Butzer (1955)7. |
| Lorentz operator (order 2). |
|
Get coefficients for |
Holtz et al. (2011)8; Bernstein (1932)9; Lorentz (1966)10. |
The goal is now to find a polynomial of degree
- the polynomial is within
$\epsilon$ of$f(\lambda)$ , and - each of the polynomial's Bernstein coefficients is not less than 0 or greater than 1 (assuming none of
$f$ 's values is less than 0 or greater than 1).
For some of the polynomials given earlier, a degree
-
$M_r$ is not less than the maximum of the absolute value of$f$ 's$r$ -th derivative. -
$H_r$ is not less than$f$ 's$r$ -th derivative's Hölder constant (for the specified Hölder exponent α). -
$L_r$ is not less than$f$ 's$r$ -th derivative's Lipschitz constant.
| If f(λ): | Then the following polynomial: | Is close to f with the following error bound: | And a value of n that achieves the bound is: | Notes |
|---|---|---|---|---|
| Has Hölder continuous second derivative (see "Definitions"). |
|
ε = |
n=max(3, ceil( |
|
| Has Lipschitz continuous second derivative. |
|
ε = |
n=max(3, ceil( |
|
| Has continuous third derivative. |
|
ε = (3*sqrt(3−4/n)/4)*M3/n2 < (3*sqrt(3)/4)*M3/n2 < 1.29904*M3/n2 ≤ 1.29904*M3/n3/2. |
n=max(6,ceil( |
Tachev (2022)6. |
| Has Hölder continuous third derivative. |
|
ε = |
n=max(6, ceil( |
|
| Has Lipschitz continuous third derivative. |
|
ε = |
n=max(6, ceil( |
|
| Has Lipschitz continuous third derivative. |
|
ε = L3/(8*n2). | n=max(4,ceil((sqrt(439)/25) * sqrt(L3/ε))) ≤ max(4,ceil((83810/100000) * sqrt(L3/ε))). (Round n up to nearest multiple of 4.) |
|
| Has Lipschitz-continuous derivative. |
|
ε = L1/(8*n). | n = ceil(L1/(8*ε)). | Lorentz (1963)11.12 |
| Has Hölder-continuous derivative. |
|
ε = H1/(4*n(1+α)/2). | n = ceil((H1/(4*ε))2/(1+α)). | Schurer and Steutel (1975)13. 0 < α ≤ 1 is derivative's Hölder exponent. |
| Is Hölder continuous. |
|
ε = H0*(1/(4*n))α/2. | n = ceil((H0/ε))2/α/4). | Kac (1938)14. 0 < α ≤ 1 is f's Hölder exponent. |
| Is Lipschitz continuous. |
|
ε = L0*sqrt(1/(4*n)). | n = ceil((L0)2/(4*ε2)). | Special case of previous entry. |
| Is Lipschitz continuous. |
|
ε = |
n=ceil((L0*1.08989/ε)2). | Sikkema (1961)15. |
Bernstein polynomials ($B_n(f)$) have the advantages that only one Bernstein coefficient has to be found per run and that the coefficient will be bounded by 0 and 1 if
On the other hand, polynomials other than Bernstein polynomials can approach
- Determine whether
$f$ is described in the preceding table. Let A be the minimum of$f$ on the closed unit interval and let B be the maximum of$f$ there. - If 0 < A ≤ B < 1, calculate
$n$ as given in the preceding table, but with$\epsilon=\min(\epsilon, A, 1-B)$ , and stop. - Propositions B1, B2, and B3 in the appendix give conditions on
$f$ so that$W_{n,2}$ or$W_{n,3}$ (as the case may be) will be nonnegative. If B is less than 1 and any of those conditions is met, calculate$n$ as given in the preceding table, but with$\epsilon=\min(\epsilon, 1-B)$ . (For B3, set$n$ to max($n$ ,$m$ ), where$m$ is given in that proposition.) Then stop;$W_{n,2}$ or$W_{n,3}$ will now be bounded by 0 and 1. - Calculate
$n$ as given in the preceding table. Then, if any Bernstein coefficient of the resulting polynomial is less than 0 or greater than 1, double the value of$n$ until this condition is no longer true.
The resulting polynomial of degree
Notes:
A polynomial's Bernstein coefficients can be rounded to multiples of
$\delta$ (where$0 \lt\delta\le 1$ ) by setting either—
$c$ =floor($c/\delta$ ) *$\delta$ (rounding down), or$c$ =floor($c/\delta + 1/2$ ) *$\delta$ (rounding to the nearest multiple),for each Bernstein coefficient
$c$ . The new polynomial will differ from the old one by at most$\delta$ . (Thus, to find a polynomial with multiple-of-$\delta$ Bernstein coefficients that approximates$f$ with error$\epsilon$ [which must be greater than$\delta$ ], first find a polynomial with error$\epsilon - \delta$ , then round that polynomial's Bernstein coefficients as given here.)Gevrey's hierarchy is a class of "smooth" functions with known bounds on their derivatives. A function
$f(\lambda)$ belongs in Gevrey's hierarchy if there are values$B\ge 1$ ,$l\ge 1$ ,$\gamma\ge 1$ such that$f$ 's$n$ -th derivative's absolute value is not greater than$Bl^n n^{\gamma n}$ for every$n\ge 1$ (Kawamura et al. 2015)17; see also (Gevrey 1918)18). In this case, for each$n\ge 1$ —
- the
$n$ -th derivative of$f$ is continuous and has a maximum absolute value of at most$Bl^n n^{\gamma n}$ , and- the
$(n-1)$ -th derivative of$f$ is Lipschitz continuous with Lipschitz constant at most$Bl^n n^{\gamma n}$ .Gevrey's hierarchy with
$\gamma=1$ is the class of functions equaling power series (see note in next section).
Every continuous function defined on the closed interval
as long as the function's
-
$Q_{f,r}(\lambda, x_0)$ , the$r$ -th Taylor polynomial centered at$x_0$ , plus -
$R_{f,r}(\lambda, x_0)$ , the$r$ -th Taylor remainder centered at$x_0$ .
If
In this section,
Let
-
$f$ is continuous on the closed unit interval, and -
$f$ satisfies$\epsilon\le f(0)\le 1-\epsilon$ and$\epsilon\le f(1)\le 1-\epsilon$ , and -
$f$ satisfies$\epsilon\lt f(\lambda)\lt 1-\epsilon$ whenever$0\lt\lambda\lt 1$ , and -
$f$ 's$(n+1)$ -th derivative is continuous and satisfies$\epsilon\ge M_{n+1}/((n+1)!)$ , and -
$f(0)$ is known as well as$f^{(1)}(0), ..., f^{(n)}(0)$ .
Then the
Points 2 and 3, given earlier, are not needed to find a polynomial within
Note: If
$f(\lambda)$ can be rewritten as a power series, namely$f(\lambda) = c_0 \lambda^0 + c_1 \lambda^1 + ... + c_i \lambda^i + ...$ whenever$0\le\lambda\le 1$ (so that$f$ has a continuous$k$ -th derivative for every$k$ ), and if the power series coefficients$c_i$ —
- are each greater than 0,
- form a nowhere increasing sequence (example: (1/4, 1/8, 1/8, 1/16, ...)), and
- meet the so-called "ratio test",
then the algorithms in Carvalho and Moreira (2022)19 can be used to find the first
$n$ +1 power series coefficients such that$P(\lambda)$ is within$\epsilon$ of$f$ (see also the appendix).
Now, the Taylor polynomial
Now, rewrite
- double the value of
$n$ , then - rewrite the Bernstein coefficients of degree
$n/2$ to the corresponding Bernstein coefficients of degree$n$ ,
until none of the Bernstein coefficients is less than 0 or greater than 1.
The result will be a polynomial of degree
Now, let
Any polynomial
where n is the polynomial's degree and a[0], a[1], ..., a[n] are its n plus one Bernstein coefficients for the interval $[a,b]$ (Bărbosu 2020)19.
The necessary changes are as follows:
- In the previous two sections, define
$f$ ,$M_r$ ,$a_i$ , and$L_r$ as follows:-
$f(\lambda) = g(a+(b-a)\lambda)$ . This will make$f$ continuous on the closed unit interval. -
$M_r$ is not less than$(b-a)^r$ times the maximum of the absolute value of$g$ 's$r$ -th derivative on$[a,b]$ . -
$L_r$ is not less than$(b-a)^{r+1}$ times the Lipschitz constant of$g$ 's$r$ -th derivative on$[a,b]$ . -
$a_i = (b-a)^i f^{(i)}(0)/(i!)$ .
-
(The error bounds that rely on
The result will be in the form of Bernstein coefficients for the interval
Note: The following statements can be shown. Let
$g(x)$ be continuous on the interval$[a, b]$ , and let$f(x) = g(a+(b-a) x)$ .
- If the
$r$ -th derivative of$g$ is continuous and has a maximum absolute value of$M$ on the interval, where$r\ge 1$ , then the$r$ -th derivative of$f(x)$ has a maximum absolute value of$M(b-a)^r$ on the interval$[0, 1]$ .- If the
$r$ -th derivative of$g$ is Lipschitz continuous with Lipschitz constant$L$ on the interval, where$r\ge 0$ , then the$r$ -th derivative of$f(x)$ is Lipschitz continuous with Lipschitz constant$L(b-a)^{r+1}$ on the interval$[0, 1]$ .Example: Suppose
$g(x)$ is defined on the interval$[1,3]$ and has a Lipschitz-continuous derivative with Lipschitz constant$L$ . Let$f(x)=g(1+(3-1) x)$ . Then$f(x)$ has a Lipschitz-continuous derivative with Lipschitz constant$L(3-1)^{r+1} = L(3-1)^2 = 4L$ (where$r$ is 1 in this case). Further, the Bernstein polynomial$B_n(f)$ admits the following error bound$\epsilon$ and a degree$n$ that achieves the error tolerance$\epsilon$ :$\epsilon=(4L)\cdot 1/(8n)$ and$n=\text{ceil}((4L)\cdot 1/(8\epsilon))$ . (Compare with the row starting with "Has Lipschitz-continuous derivative" in the previous section.) The error bound carries over to$g(x)$ on the interval$[1, 3]$ .
Roughly speaking, the integral of f(x) on an interval [a, b] is the "area under the graph" of that function when the function is restricted to that interval. If f is continuous there, this is the value that
If a polynomial is in Bernstein form of degree
- The polynomial's integral on the closed unit interval is equal to the average of its
$(n+1)$ Bernstein coefficients; that is, the integral is found by adding those coefficients together, then dividing by$(n+1)$ (Tsai and Farouki 2001, section 3.4)19.19
If a polynomial is in Bernstein form on the interval
- The polynomial's integral on
$[a, b]$ is found by adding the polynomial's Bernstein coefficients for$[a, b]$ together, then multiplying by$(b-a)/(n+1)$ .
Let
- If
$P$ is within$\epsilon$ of$f$ at every point on the interval, then its integral is within$\epsilon\times(b-a)$ of$f$ 's integral on that interval. - If
$P$ is within$\epsilon/(b-a)$ of$f$ at every point on the interval, then its integral is within$\epsilon$ of$f$ 's integral on that interval.
Note: A pair of articles by Konečný and Neumann discuss approximating the integral (and maximum) of a class of functions efficiently using polynomials or piecewise functions with polynomials as the pieces: Konečný and Neumann (2021)20; Konečný and Neumann (2019)21.
Muñoz and Narkawicz (2013)22 also discuss finding the minimum and maximum of a polynomial in Bernstein form — indeed, a polynomial is bounded above by its highest Bernstein coefficient and below by its lowest.
For the time being, this section works only if
If
-
Build a polynomial in Bernstein form of a degree
$n$ that is high enough such that the$r$ -th derivative is close to$f$ 's$r$ -th derivative with an error no more than$\epsilon$ (where$\epsilon$ is the user-defined error tolerance. See the following table. -
Let
$a[0], ..., a[n]$ be the polynomial's Bernstein coefficients. Now, to compute the polynomial's$r$ -th derivative, do the following$r$ times or until the process stops, whichever happens first (Tsai and Farouki 2001, section 3.4)19.- If
$n$ is 0, set$a[0]=0$ and stop. - For each integer
$k$ with$0\le k\le n-1$ , set$a[k] = n\cdot(a[k+1]-a[k])$ . - Set
$n$ to$n-1$ .
- If
-
The result is a degree-$n$ polynomial, with Bernstein coefficients
$a[0], ..., a[n]$ , that approximates the$r$ -th derivative of$f(\lambda)$ .
In the following table:
-
$M_r$ is not less than the maximum of the absolute value of$f$ 's$r$ -th derivative. -
$H_r$ is not less than$f$ 's$r$ -th derivative's Hölder constant (for the specified Hölder exponent α). -
$L_r$ is not less than$f$ 's$r$ -th derivative's Lipschitz constant.
| If f(λ): | Then the following polynomial: | Has an r-th derivative that is close to f with the following error bound: | And a value of n that achieves the bound is: | Notes |
|---|---|---|---|---|
| Has Hölder continuous |
|
|
|
Knoop and Pottinger (1976)23. |
Note: In general, it is not possible to approximate a continuous function's derivative unless upper and lower bounds on the derivative are known (Konečný and Neumann (2019)21).
Some methods in this document require rewriting a polynomial in Bernstein form of degree
- This rewriting can be done directly in the Bernstein form, as described in Tsai and Farouki (2001, section 3.2)19.
- This rewriting can also be done through an intermediate form called the scaled Bernstein form (Farouki and Rajan 1988)24, as described in Sánchez-Reyes (2003)25. (A polynomial in scaled Bernstein form is also known as a homogeneous polynomial.)
- The i-th Bernstein coefficient of degree m is turned to a scaled Bernstein coefficient by multiplying it by choose(m,i).
- The i-th scaled Bernstein coefficient of degree m is turned to a Bernstein coefficient by dividing it by choose(m,i).
Some methods in this document require rewriting a polynomial in "power" form of degree
- This rewriting can be done directly using the so-called "matrix method" from Ray and Nataraj (2012)26.
- This rewriting can also be done by rewriting the polynomial from "power" form to scaled Bernstein form (see Sánchez-Reyes (2003, section 2.6)25), then converting the scaled Bernstein form to Bernstein form.
Consider the class of rational functions
-
$f$ has only a finite number of continuous derivatives on the open interval (0, 1) (Borwein 1979, section 3)27, or -
$f(\lambda)$ is writable as$a_0 \lambda^0 + a_1 \lambda^1 + ...$ , where$a_k\ge(k+1) a_{k+1}\ge 0$ whenever$k\ge 0$ (Borwein 1980)28.
In addition, rational functions are not much better than polynomials in approximating
-
$f$ has only a finite number of continuous derivatives on the half-open interval (0, 1], and - the rational function's denominator has no root that is a complex number whose real part is between 0 and 1 (Borwein 1979, theorem 29)27.
Worth discussing are the approximating rational functions studied in Zhang and Liu (2022)29 and Themistoclakis and Van Barel (2024)30. In the latter paper, though, it might be a bit difficult to glean error estimates of the kind given in the second table in the section "Approximations on the Closed Unit Interval", earlier in the present article. I seek help on that.
Readers are requested to let me know of additional solutions to the following problems:
-
Let
$f(\lambda)$ be continuous and map the closed unit interval to itself. Given$\epsilon\gt 0$ , and given that$f(\lambda)$ belongs to a large class of functions (for example, it has a continuous, Lipschitz continuous, concave, or nowhere decreasing$k$ -th derivative for some integer$k$ , or any combination of these), compute the Bernstein coefficients of a polynomial or rational function (of some degree$n$ ) that is within$\epsilon$ of$f(\lambda)$ .The approximation error must be no more than a constant times
$1/n^{r/2}$ if the specified class has only functions with continuous$r$ -th derivative.Methods that use only integer arithmetic and addition and multiplication of rational numbers are preferred (thus, Chebyshev interpolants and other methods that involve cosines, sines,
$\pi$ ,$\exp$ , and$\ln$ are not preferred). -
Find a polynomial
$P$ in Bernstein form that approximates a strictly increasing polynomial$Q$ on the closed unit interval such that the inverse of$P$ is within$\epsilon$ of the inverse of$Q$ .- There is an algorithm in Farouki (2000)31, but the algorithm is not accessible free.
-
Find a polynomial
$P$ in Bernstein form that approximates a strictly increasing real analytic function$f$ on the closed unit interval such that the inverse of$P$ is within$\epsilon$ of the inverse of$f$ .(Note: There is no bounded convergence rate for
$P$ if$f$ is assumed only to have a continuous$k$ -th derivative for every$k$ ; a counterexample is$h(x)=\exp(-1/x)$ ($h(0)=0$ ),$h(h(x))$ ,$h(h(h(x)))$ , and so on.)
See also the open questions.
The following references discuss schemes that—
- approximate functions with a continuous
$r$ -th derivative on the closed unit interval, where$r\ge 3$ , - using polynomials of a degree
$n$ (where$n$ is an arbitrary positive integer, not necessarily$r$ or less32), - at a rate no slower than a constant times
$1/n^{r/2}$ , and - without introducing transcendental or trigonometric functions.
Holtz et al. (2011)33; Sevy (1991)34 and references there; Waldron (2009)35; Costabile et al. (2005)36; Han (2003)37. Excluded from this list are schemes that employ splines (piecewise polynomials), or sequences of nonpolynomial functions.
There may be other useful schemes for polynomials not mentioned in this document or in the references just given. There may also be schemes that do not converge to the target function but can be made to achieve an approximation error of
Lemma A1: Let—
where the
Proof: By inspection,
- for
$n=0$ ,$a_0 x^0=a_0$ is a nonnegative constant (which trivially reaches its maximum at 1), and - for each
$n$ where$a_0 = 0$ ,$a_0 x^n$ is the constant 0 (which trivially reaches its maximum at 1), and - for each other
$n$ ,$x^n$ is a strictly increasing function and multiplying that by$a_n$ (a positive constant) doesn't change whether it's strictly increasing.
Since all of these terms have a maximum at 1 on the domain, so does their sum.
The derivative of
which is still a power series with nonnegative values of
Now, since the second derivative is nonnegative wherever
Proposition A2: For a function
and have the same domain as
Proof:
For a function
Proposition B1: Let
Proof: For
For
Proposition B2: Let
Proof: The assumptions on
Note: A subadditive function
$f$ has the property that$f(a+b) \le f(a)+f(b)$ whenever$a$ ,$b$ , and$a+b$ are in$f$ 's domain.
Proposition B3: Let
Proof: Let
The following results deal with useful quantities when discussing the error in approximating a function by Bernstein polynomials. Suppose a coin shows heads with probability
where
- Traditionally, the central moment of
$X/n$ or the ratio of heads to tosses is denoted$S_{n,r}(p)=T_{n,r}(p)/n^r=\mathbb{E}[(X/n-\mathbb{E}[X/n])^r]$ . ($T$ and$S$ are notations of S.N. Bernstein, known for Bernstein polynomials.) - The
$r$ -th central absolute moment of$X/n$ or the ratio of heads to tosses is denoted$M_{n,r}(p) = \mathbb{E}[\text{abs}(X/n-\mathbb{E}[X/n])^r] = B_n(\text{abs}(\lambda-p)^r)(p)$ . If$r$ is even,$M_{n,r}(p) = S_{n,r}(p)$ .
The following result bounds the absolute value of
Lemma B7: Let
| If |
Then |
|---|---|
| Is an even integer. |
|
| Is an even integer, but not greater than 44. |
|
| Is 1. |
|
| Is odd, and |
|
| Is odd and greater than 43. |
|
Proof: The first row comes from a result of Adell and Cárdenas-Morales (2018)41. The second row is an improved result of the first, from Molteni (2022)42. The third row follows from Cheng (1983)43. The fourth and fifth rows follow from the first and second as well as that the absolute central moment for odd
Taylor polynomials and Taylor remainders were discussed in the section "Taylor Polynomials for 'Smooth' Functions". The following lemma gives bounds on the Taylor remainder's Bernstein polynomial.
Lemma B9: Let
Proof: This result relies on Lemma 2C in the article "Supplemental Notes for Bernoulli Factory Algorithms", with
Note: It would be interesting to strengthen this lemma, at least for
$r\le 10$ , with a bound of the form$MC\cdot\max(1/n, (x_0(1-x_0)/n)^{1/2})^{r+1}$ , where$C$ is an explicitly given constant depending on$r$ , which is possible because the Bernstein polynomial of$\text{abs}(\lambda-x_0)^{r+1}$ can be bounded in this way (Lorentz 1966)10.
Corollary B9A: Let
| If
- | ------ |
| 0. |
$M(1/2)/n^{1/2}$ for every integer$n\ge 1$ . | | 1. |$M(1/8)/n = 0.125M/n$ for every integer$n\ge 1$ . | | 2. |$M(\sqrt{3}/48)/n^{3/2} < 0.3609M/n^{3/2}$ for every integer$n\ge 2$ . | | 3. |$M(1/128)/n^{2} = 0.0078125M/n^{2}$ for every integer$n\ge 1$ . | | 4. |$M(\sqrt{5}/1280)/n^{5/2} < 0.001747/n^{5/2}$ for every integer$n\ge 2$ . | | 5. |$M(1/3072)/n^{3} < 0.0003256/n^{3}$ for every integer$n\ge 1$ . |
Proposition B10: Let
Proof: This proof is inspired by the proof technique in Tachev (2022)6.
Because
It is known that
Therefore—
Now denote
□
The proof of Proposition B10 shows how to prove an upper bound on the approximation error for polynomials written as—
(where
The following error bounds, which make use of Corollary B9A and the proof technique in Proposition B10, can be shown. In the following table,
| Property of |
|
|
Upper bound of error |
|---|---|---|---|
| Has a Lipschitz-continuous second derivative. |
|
|
|
| Has a Lipschitz-continuous third derivative. |
|
|
|
| Has a Lipschitz-continuous fourth derivative. |
|
|
|
| Has a Lipschitz-continuous fifth derivative. |
|
|
|
| Has a Lipschitz-continuous third derivative. |
|
|
|
| Has a Lipschitz-continuous fourth derivative. |
|
|
|
| Has a Lipschitz-continuous fifth derivative. |
|
|
|
The Lorentz operator of order 2 is denoted as
Proposition B10A: Let
Proof: Since
□
Corollary B10B: Let
Proof: Follows from Lorentz (1963)11 and the well-known fact that
In the following propositions:
-
$f^{(r)}$ means the$r$ -th derivative of the function$f$ . -
$M_r = \max(\text{abs}(f^{(r)}))$ means a value equal to or greater than the maximum of the absolute value of$f^{(r)}$ . -
$H_r$ means a value equal to or greater than the Hölder constant of$f^{(r)}$ .
Proposition B10C: Let
Proof: This proof is inspired by a result in Draganov (2014, Theorem 4.1)48.
The error to be bounded can be expressed as
It thus remains to estimate the right-hand side of the bound. A result by Knoop and Pottinger (1976)23, which works for every
so—
□
Proposition B10D: Let
Proof: Again, the goal is to estimate the right-hand side of (B10C-1). But this time, a different simultaneous approximation bound is employed, namely a result from Kacsó (2002)49, which in this case works if
where
□
The following error bounds follow from results of Sevy (1991)51, especially theorems 3.1 and 3.7 there:
| If f(λ) on the closed unit interval: | Then the following polynomial: | Is close to f with the following error bound: |
|---|---|---|
| Has continuous second derivative. |
|
|
| Has continuous third derivative. |
|
|
| Has continuous fourth derivative. |
|
|
| Has continuous sixth derivative. |
|
Lemma B11: Let
Proof:
Han's (2000)53 so-called "multi-node expansions" transform certain operations that preserve all polynomials of degree up to
Proposition B12: Let
Note:
$\mu_{n,r}/n^{r/2}$ is an upper bound on the$r$ -th central absolute moment of$X/n$ , discussed earlier in this section. In the special case$n=1$ and$r=4$ , Han proved the error bound$M_4/864$ relying on a tighter bound on this moment.
The following is a method that employs Chebyshev interpolants to compute the Bernstein coefficients of a polynomial that comes within
-
$f$ must be continuous on the interval$[a, b]$ and must have an$r$ -th derivative of bounded variation, as described later. -
Suppose
$f$ 's domain is the interval$[a, b]$ . Then the Chebyshev interpolant of degree$n$ of$f$ (Wang 2023)54, (Trefethen 2013)55 is—$$p(\lambda)=\sum_{k=0}^n c_k T_k(2\frac{\lambda-a}{b-a}-1),$$ where—
-
$c_k=\sigma(k,n)\frac{2}{n}\sum_{j=0}^n \sigma(j,n) f(\gamma(j,n))T_k(\cos(j\pi/n))$ , -
$\gamma(j,n) = a+(b-a)(\cos(j\pi/n)+1)/2$ , -
$\sigma(k,n)$ is 1/2 if$k$ is 0 or$n$ , and 1 otherwise, and -
$T_k(x)$ is the$k$ -th Chebyshev polynomial of the first kind (chebyshevt(k,x)in the SymPy computer algebra library).
-
-
Let
$r\ge 1$ and$n\gt r$ be integers. If$f$ is defined on the interval$[a, b]$ , has a Lipschitz-continuous$(r-1)$ -th derivative, and has an$r$ -th derivative of bounded variation, then the degree-$n$ Chebyshev interpolant of$f$ is within$\left(\frac{(b-a)}{2}\right)^r\frac{4V}{\pi r(n-r)^r}$ of$f$ , where$V$ is the$r$ -th derivative's total variation or greater. This relies on a theorem in chapter 7 of Trefethen (2013)55 as well as a statement in note 1 at the end of this section.- If the
$r$ -th derivative is nowhere decreasing or nowhere increasing on the interval$[a, b]$ , then$V$ can equal abs($f(b)-f(a)$). - If the
$r$ -th derivative is Lipschitz continuous with Lipschitz constant$M$ or less, then$V$ can equal$M\cdot(b-a)$ (Kannan and Kreuger 1996)56. - The required degree is thus
$n=\text{ceil}(r+\frac{(b-a)}{2}(4V/(\pi r\epsilon))^{1/r})$ ≤$\text{ceil}(r+\frac{(b-a)}{2}(1.2733 V/(r\epsilon))^{1/r})$ , where$\epsilon>0$ is the desired error tolerance.
- If the
-
If
$f$ is so "smooth" to be analytic (see note 4 below) at every point in the interval$[a, b]$ , a better error bound is possible, but describing it requires ideas from complex analysis that are too advanced for this article. See chapter 8 of Trefethen (2013)55.
- Compute the required degree
$n$ as given earlier, with error tolerance$\epsilon/2$ . - Compute the values
$c_k$ as given earlier, which relate to$f$ 's Chebyshev interpolant of degree$n$ . There will be$n$ plus one of these values, labeled$c_0, ..., c_n$ . - Compute the (n+1)×(n+1) matrix
$M$ described in Theorem 1 of Rababah (2003)57. - Multiply the matrix by the transposed vector of values
$(c_0, ..., c_n)$ to get the polynomial's Bernstein coefficients$b_0, ..., b_n$ . (Transposing means turning columns to rows and vice versa.) - (Rounding.) For each
$i$ , replace the Bernstein coefficient$b_i$ with$\text{floor}(b_i / (\epsilon/2) + 1/2) \cdot (\epsilon/2)$ . - Return the Bernstein coefficients
$b_0, ..., b_n$ .
Notes:
The following statement can be shown. Let
$f(x)$ have a Lipschitz-continuous$(r-1)$ -th derivative on the interval$[a, b]$ , where$r\ge 1$ . If the$r$ -th derivative of$f$ has total variation$V$ , then the$r$ -th derivative of$g(x)$ , where$g(x) = f(a+(b-a) (x+1)/2)$ , has total variation$V\left(\frac{b-a}{2}\right)^r$ on the interval$[-1, 1]$ .The method in this section doesn't require
$f(\lambda)$ to have a particular minimum or maximum. If$f$ must map the closed unit interval to itself and the Bernstein coefficients must lie on that interval, the following changes to the method are needed:
$f(\lambda)$ must be continuous on the closed unit interval ($a=0$ ,$b=1$ ) and take on only values in that interval.- If any Bernstein coefficient returned by the method is less than 0 or greater than 1, double the value of
$n$ and repeat the method starting at step 2 until that condition is no longer true.It would be of interest to build Chebyshev-like interpolants that sample
$f(\lambda)$ at rational values of$\lambda$ that get closer to the Chebyshev points (for example, $\cos(j\pi/n)$) with increasing$n$ , and to find results that provide explicit bounds (with no hidden constants) on the approximation error that are close to those for Chebyshev interpolants.A function
$f(\lambda)$ is analytic at a point$z$ if there is a positive number$r$ such that$f$ is writable as—
$$f(\lambda)=f(z)+f^{(1)}(z)(\lambda-z)^1/1! + f^{(2)}(z)(\lambda-z)^2/2! + ...,$$ for every point
$\lambda$ satisfying$\text{abs}(\lambda-z)<r$ , where$f^{(i)}$ is the$i$ -th derivative of$f$ . The largest value of$r$ that makes$f$ analytic at$z$ is the radius of convergence of$f$ at$z$ .
Any copyright to this page is released to the Public Domain. In case this is not possible, this page is also licensed under Creative Commons Zero.
Footnotes
-
In case 3 in general, if $f$ is analytic at every point on an interval, the "most stable" approximation occurs when the sample points are clustered at a quadratic rate toward the endpoints. Adcock, B., Platte, R.B., Shadrin, A., "Optimal sampling rates for approximating analytic functions from pointwise samples, IMA Journal of Numerical Analysis 39(3), July 2019. ↩
-
choose(n, k) = (1*2*3*...*n)/((1*...*k)*(1*...*(n−k))) = n!/(k! * (n − k)!) $={n \choose k}$ is a binomial coefficient, or the number of ways to choose k out of n labeled items. It can be calculated, for example, by calculating i/(n−i+1) for each integer i satisfying n−k+1 ≤ i ≤ n, then multiplying the results (Yannis Manolopoulos. 2002. "Binomial coefficient computation: recursion or iteration?", SIGCSE Bull. 34, 4 (December 2002), 65–67. DOI: https://doi.org/10.1145/820127.820168). For every m>0, choose(m, 0) = choose(m, m) = 1 and choose(m, 1) = choose(m, $m-1$) = m; also, in this document, choose(n, k) is 0 when k is less than 0 or greater than n.
n! = 1*2*3*...*n is also known as $n$ factorial; in this document, (0!) = 1. ↩ -
Micchelli, Charles. "The saturation class and iterates of the Bernstein polynomials", Journal of Approximation Theory 8, no. 1 (1973): 1-18. ↩
-
Guan, Zhong. "Iterated Bernstein polynomial approximations", arXiv:0909.0684 (2009). ↩
-
Güntürk, C.S., Li, W., "Approximation of functions with one-bit neural networks", arXiv:2112.09181 [cs.LG], 2021. ↩
-
Tachev, Gancho. "Linear combinations of two Bernstein polynomials", Mathematical Foundations of Computing, 2022. ↩ ↩2 ↩3
-
Butzer, P.L., "Linear combinations of Bernstein polynomials", Canadian Journal of Mathematics 15 (1953). ↩ ↩2 ↩3
-
Holtz, O., Nazarov, F., Peres, Y., "New Coins from Old, Smoothly", Constructive Approximation 33 (2011). ↩ ↩2 ↩3
-
Bernstein, S. N. (1932). "Complément a l’article de E. Voronovskaya." CR Acad. URSS, 86-92. ↩
-
G.G. Lorentz, "The degree of approximation by polynomials with positive coefficients", 1966. ↩ ↩2 ↩3
-
G.G. Lorentz, "Inequalities and saturation classes for Bernstein polynomials", 1963. ↩ ↩2 ↩3
-
Qian et al. suggested an n which has the upper bound n=ceil(1+max($2n$,$n^2 (2^{n}C)/\epsilon$)), where $C$ is the maximum of $f$ on its domain, but this is often much worse and works only if $f$ is a polynomial (Qian, W., Riedel, M. D., & Rosenberg, I. (2011). Uniform approximation and Bernstein polynomials with coefficients in the unit interval. European Journal of Combinatorics, 32(3), 448-463). ↩
-
Schurer and Steutel, "On an inequality of Lorentz in the theory of Bernstein polynomials", 1975. ↩
-
Kac, M., "Une remarque sur les polynômes de M. S. Bernstein", Studia Math. 7, 1938. ↩
-
Sikkema, P.C., "Der Wert einiger Konstanten in der Theorie der Approximation mit Bernstein-Polynomen", 1961. ↩
-
E. Voronovskaya, "Détermination de la forme asymptotique d'approximation des fonctions par les polynômes de M. Bernstein", 1932. ↩
-
Kawamura, Akitoshi, Norbert Müller, Carsten Rösnick, and Martin Ziegler. "Computational benefit of smoothness: Parameterized bit-complexity of numerical operators on analytic functions and Gevrey’s hierarchy." Journal of Complexity 31, no. 5 (2015): 689-714. ↩
-
M. Gevrey, "Sur la nature analytique des solutions des équations aux dérivées partielles", 1918. ↩
-
Tsai, Yi-Feng, and Rida T. Farouki. "Algorithm 812: BPOLY: An object-oriented library of numerical algorithms for polynomials in Bernstein form." ACM Transactions on Mathematical Software (TOMS) 27.2 (2001): 267-296. ↩ ↩2 ↩3 ↩4 ↩5 ↩6 ↩7
-
Konečný, Michal, and Eike Neumann. "Representations and evaluation strategies for feasibly approximable functions." Computability 10, no. 1 (2021): 63-89. Also in arXiv: 1710.03702. ↩
-
Konečný, Michal, and Eike Neumann. "Implementing evaluation strategies for continuous real functions", arXiv:1910.04891 (2019). ↩ ↩2
-
Muñoz, César, and Anthony Narkawicz. "Formalization of Bernstein polynomials and applications to global optimization." Journal of Automated Reasoning 51, no. 2 (2013): 151-196. ↩
-
Knoop, H-B., Pottinger, P., "Ein Satz vom Korovkin-Typ für $C^k$-Räume", Math. Zeitschrift 148 (1976). ↩ ↩2
-
Farouki, Rida T., and V. T. Rajan. "Algorithms for polynomials in Bernstein form". Computer Aided Geometric Design 5, no. 1 (1988): 1-26. ↩
-
Sánchez-Reyes, J. (2003). Algebraic manipulation in the Bernstein form made simple via convolutions. Computer-Aided Design, 35(10), 959-967. ↩ ↩2
-
S. Ray, P.S.V. Nataraj, "A Matrix Method for Efficient Computation of Bernstein Coefficients", Reliable Computing 17(1), 2012. ↩
-
Borwein, P. B. (1979). Restricted uniform rational approximations (Doctoral dissertation, University of British Columbia). ↩ ↩2
-
Borwein, Peter B. "Approximations by rational functions with positive coefficients." Journal of Mathematical Analysis and Applications 74, no. 1 (1980): 144-151. ↩
-
Zhang, Ren-Jiang, and Xing Liu. "Rational interpolation operator with finite Lebesgue constant." Calcolo 59.1 (2022): 10. ↩
-
Themistoclakis, W., Van Barel, M. A note on generalized Floater–Hormann interpolation at arbitrary distributions of nodes. Numer Algor (2024). https://doi.org/10.1007/s11075-024-01933-6 . ↩
-
Farouki, Rida T. "Convergent inversion approximations for polynomials in Bernstein form." Computer Aided Geometric Design 17.2 (2000): 179-196. ↩
-
Thus, Taylor polynomials won't work, for example. ↩
-
Holtz, O., Nazarov, F., Peres, Y., "New Coins from Old, Smoothly", Constructive Approximation 33 (2011). ↩
-
Sevy, J., “Acceleration of convergence of sequences of simultaneous approximants”, dissertation, Drexel University, 1991. ↩
-
Waldron, S., "Increasing the polynomial reproduction of a quasi-interpolation operator", Journal of Approximation Theory 161 (2009). ↩
-
Costabile, F., Gualtieri, M.I., Serra, S., "Asymptotic expansion and extrapolation for Bernstein polynomials with applications", BIT 36 (1996). ↩ ↩2
-
Han, Xuli. "Multi-node higher order expansions of a function." Journal of Approximation Theory 124.2 (2003): 242-253. https://doi.org/10.1016/j.jat.2003.08.001 ↩
-
Qian, Weikang, Marc D. Riedel, and Ivo Rosenberg. "Uniform approximation and Bernstein polynomials with coefficients in the unit interval." European Journal of Combinatorics 32, no. 3 (2011): 448-463. ↩
-
Li, Zhongkai. "Bernstein polynomials and modulus of continuity." Journal of Approximation Theory 102, no. 1 (2000): 171-174. ↩
-
Summation notation, involving the Greek capital sigma (Σ), is a way to write the sum of one or more terms of similar form. For example, $\sum_{k=0}^n g(k)$ means $g(0)+g(1)+...+g(n)$, and $\sum_{k\ge 0} g(k)$ means $g(0)+g(1)+...$. ↩
-
Adell, J.A., Cárdenas-Morales, D., "Quantitative generalized Voronovskaja’s formulae for Bernstein polynomials", Journal of Approximation Theory 231, July 2018. ↩
-
Molteni, Giuseppe. "Explicit bounds for even moments of Bernstein’s polynomials." Journal of Approximation Theory 273 (2022): 105658. ↩
-
Cheng, F., "On the rate of convergence of Bernstein polynomials of functions of bounded variation", Journal of Approximation Theory 39 (1983). ↩
-
G.G. Lorentz, Bernstein polynomials, 1953. ↩
-
Ditzian, Z., Totik, V., Moduli of Smoothness, 1987. ↩
-
May, C.P., "Saturation and inverse theorems for a class of exponential-type operators", Canadian Journal of Mathematics 28 (1976). ↩
-
Stoer, J., Bulirsch, R., Introduction to Numerical Analysis, 1970. ↩
-
Draganov, Borislav R. "On simultaneous approximation by iterated Boolean sums of Bernstein operators." Results in Mathematics 66, no. 1 (2014): 21-41. ↩
-
Kacsó, D.P., "Simultaneous approximation by almost convex operators", 2002. ↩
-
Stancu, D.D., Agratini, O., et al. Analiză Numerică şi Teoria Aproximării, 2001. ↩
-
Sevy, J., "Acceleration of convergence of sequences of simultaneous approximants", dissertation, Drexel University, 1991. ↩ ↩2
-
Berens, H., Lorentz, G.G., "Inverse theorems for Bernstein polynomials", Indiana University Mathematics Journal 21 (1972). ↩
-
Han, Xuli. “Multi-node higher order expansions of a function.” Journal of Approximation Theory 124.2 (2003): 242-253. https://doi.org/10.1016/j.jat.2003.08.001 ↩
-
H. Wang, "Analysis of error localization of Chebyshev spectral approximations", arXiv:2106.03456v3 [math.NA], 2023. ↩
-
Trefethen, L.N., Approximation Theory and Approximation Practice, 2013. ↩ ↩2 ↩3
-
R. Kannan and C.K. Kreuger, Advanced Analysis on the Real Line, 1996. ↩
-
Rababah, Abedallah. "Transformation of Chebyshev–Bernstein polynomial basis." Computational Methods in Applied Mathematics 3.4 (2003): 608-622. ↩