= Bernstein approximation of a corner
{c}
{title2=$f(x)=|x-1/2|$}
Take the <continuous> function $f(x)=|x-1/2|$ on $[0,1]$. It is <Lipschitz continuous> with <Lipschitz constant> one, but is not <differentiable> at $x=1/2$. For $n=2$, the sample values are $1/2,0,1/2$, so
$$
B_2f(x)=\frac12(1-x)^2+\frac12x^2,
\qquad B_2f(1/2)=\frac14\ne f(1/2).
$$
This is already a useful warning: the <Bernstein polynomial> is built from grid values but is not generally their <polynomial interpolation>.
\Image[/bernstein-approximation-continuous-corner.png]
{title=<Bernstein polynomials> approximate the values of an <absolute value> function, including its corner}
{description=The black target is $|x-1/2|$ on $[0,1]$; colored curves are the explicitly computed <Bernstein polynomials> of degrees $2$, $10$, $50$, and $200$. Each has exact endpoint values and a smooth middle. These are theoretical functions, not measured data.}
Every finite approximant is <differentiable>, and symmetry makes its <derivative> zero at the center. The target instead has left <derivative> $-1$ and right <derivative> $1$. Smooth curves can therefore approach a corner in <supremum norm> while their center <derivatives> have no target value to approach. The <Lipschitz error bound for Bernstein approximation> quantifies the improvement in values.
Back to article page