Weierstrass Approximation Theorem

Helmut Knaust, Department of Mathematical Sciences, UTEP, El Paso TX 79968
hknaust@utep.edu
4/19/2010

Bernstein Polynomials

degree=12;Manipulate[Plot[BernsteinBasis[degree,k,x],{x,0,1},PlotRange->{0,.5},PlotLabel->k,ImageSize->500],{k,0,degree,1}]

degree=12;
f[x_]=2Sin[6x]+10 Abs[x-1/5]+5Sqrt[Abs[x-2/3]]
app[degree_,x_]:=Sum[f[k/degree]BernsteinBasis[degree,k,x],{k,0,degree,1}];
Plot[{f[x],app[degree,x]},{x,0,1},PlotLabel->degree,PlotStyle->{{Blue,Thick},{Red,Dashed,Thick}},ImageSize->500]

Manipulate[Plot[{f[x],app[degree,x]},{x,0,1},PlotLabel->degree,PlotRange->{3,8},PlotStyle->{{Blue,Thick},{Red,Dashed,Thick}},ImageSize->500],{degree,10,200,10}]

Landau Polynomials

Landau[n_,x_]:=(1-x^2)^n/(2Integrate[(1-z^2)^n,{z,0,1}])

Table[Landau[n,x],{n,1,5}]

Plot[Evaluate[Table[Landau[n,x],{n,5,100,10}]],{x,-1,1},PlotRange->All,ImageSize->500]

Below, the original function is blue, while the approximating polynomial is shown in green. Convergence is uniform on intervals [a,b] satisfying 0<a<b<1.

n=50;
f[x_]=(x-6/10)^2-Abs[Sin[2π x]]+Sqrt[Abs[1-3x]]
landau[y_]:=NIntegrate[Landau[n,y-x]f[x],{x,0,1}];
p1=ListPlot[Table[{y,landau[y]},{y,0.1,0.9,0.8/250}],PlotStyle->{Green,Thick,Dashed},Joined->True];
p2=Plot[f[x],{x,0.1,0.9},PlotStyle->{Blue,Thick},PlotLabel->n,ImageSize->500,AxesOrigin->{0,0},PlotRange->{{0,1},All}];
Show[p2,p1]

n=500;
f[x_]=(x-6/10)^2-Abs[Sin[2π x]]+Sqrt[Abs[1-3x]]
landau[y_]:=NIntegrate[Landau[n,y-x]f[x],{x,0,1}];
p1=ListPlot[Table[{y,landau[y]},{y,0.1,0.9,0.8/250}],PlotStyle->{Green,Thick,Dashed},Joined->True];
p2=Plot[f[x],{x,0.1,0.9},PlotStyle->{Blue,Thick},PlotLabel->n,ImageSize->500,AxesOrigin->{0,0},PlotRange->{{0,1},All}];
Show[p2,p1]