Search the atlas

Bernstein approximation

Solve Bernstein approximation exercises using binomial moments, distinguish sampled and exact coefficients, and choose degree from an explicit absolute-error bound.

Bernstein-Approximation Exercises: Sample Values Are Not Interpolation Conditions

The Bernstein basis can represent a polynomial exactly, but simply filling its coefficients with sampled function values usually produces an approximation. Confusing those operations can turn a bound on a surrogate into an unjustified claim about the original function.

Exercise 1: Interpret the Weights

For a continuous function on [0,1][0,1], define

Bn[f](x)=∑k=0nf(k/n)(nk)xk(1−x)n−k.B_n[f](x)=\sum_{k=0}^n f(k/n)\binom nk x^k(1-x)^{n-k}.

The binomial weights are nonnegative and sum to one. Thus the approximation lies between the smallest and largest sampled values. If KK is binomial with parameters n and x, the same expression is E[f(K/n)]\mathbb E[f(K/n)]. The University of Maryland analysis notes use this probabilistic construction in the uniform approximation theorem.

Does Bn[f](k/n)=f(k/n)B_n[f](k/n)=f(k/n) follow? No: at an interior x, several weights normally contribute. Only the endpoint identities at x=0 and x=1 follow immediately. This is an averaging operator, not an interpolation rule.

Exercise 2: Calculate the Bias for a Quadratic

Take f(x)=x2f(x)=x^2. From E[K]=nx\mathbb E[K]=nx and Var⁡(K)=nx(1−x)\operatorname{Var}(K)=nx(1-x),

Bn[x2](x)=x2+x(1−x)n.B_n[x^2](x)=x^2+\frac{x(1-x)}n.

For n=4 and x=1/2, the function equals 0.25 while its approximation equals 0.3125. Increasing degree reduces the bias; merely noticing that a quadratic has degree less than four does not make the sampled-coefficient construction exact.

For comparison, an exact degree-n Bernstein representation of x², with n≥2, uses coefficients k(k−1)/[n(n−1)]k(k-1)/[n(n-1)], not (k/n)2(k/n)^2. The range-certification lesson concerns coefficients of the represented polynomial. It does not certify an unaccounted approximation error.

Exercise 3: Choose a Degree from a Stated Error

For the quadratic, the maximum absolute error occurs at x=1/2 and equals 1/(4n)1/(4n). To make it at most 0.01, choose n≥25. This is an absolute bound on a dimensionless function, not a one-percent relative bound near x=0.

More generally, if ∣f′′∣≤M|f''|\le M on the interval, Taylor’s theorem around x, followed by averaging, gives

∣Bn[f](x)−f(x)∣≤M2E[(K/n−x)2]≤M8n.|B_n[f](x)-f(x)|\le\frac M2\mathbb E[(K/n-x)^2]\le\frac{M}{8n}.

The first-order term vanishes because the binomial mean is x. The derivative bound is a premise: continuity alone gives convergence but does not supply this particular rate estimate.

Applications and checks

Use the operator when preserving a convex range is useful and its approximation error is acceptable. If a clearance surrogate is constructed from samples, retain both numerical error and a justified function-approximation bound before making a sign decision. A nonnegative set of sampled coefficients proves a property of the resulting polynomial, not automatically of an unsampled physical response.

Independent exact-rational sums check the moment identity and the alternative exact coefficients over five degrees and nine positions. The explicit quadratic exposes the mismatch without another curve animation; the existing Bézier laboratory already explains basis geometry. Higher degree alone does not cure noisy input, model error or extrapolation beyond the normalized interval.

Back to contents