Bernstein polynomials #
The definition of the Bernstein polynomials
bernsteinPolynomial (R : Type*) [CommRing R] (n ν : ℕ) : R[X] :=
(choose n ν) * X^ν * (1 - X)^(n - ν)
and the fact that for ν : Fin (n+1)
these are linearly independent over ℚ
.
We prove the basic identities
(Finset.range (n + 1)).sum (fun ν ↦ bernsteinPolynomial R n ν) = 1
(Finset.range (n + 1)).sum (fun ν ↦ ν • bernsteinPolynomial R n ν) = n • X
(Finset.range (n + 1)).sum (fun ν ↦ (ν * (ν-1)) • bernsteinPolynomial R n ν) = (n * (n-1)) • X^2
Notes #
See also Mathlib.Analysis.SpecialFunctions.Bernstein
, which defines the Bernstein approximations
of a continuous function f : C([0,1], ℝ)
, and shows that these converge uniformly to f
.
bernsteinPolynomial R n ν
is (choose n ν) * X^ν * (1 - X)^(n - ν)
.
Although the coefficients are integers, it is convenient to work over an arbitrary commutative ring.
Equations
Instances For
Rather than redoing the work of evaluating the derivatives at 1, we use the symmetry of the Bernstein polynomials.
The Bernstein polynomials are linearly independent.
We prove by induction that the collection of bernsteinPolynomial n ν
for ν = 0, ..., k
are linearly independent.
The inductive step relies on the observation that the (n-k)
-th derivative, evaluated at 1,
annihilates bernsteinPolynomial n ν
for ν < k
, but has a nonzero value at ν = k
.