1.Interpolation error
As mentioned, a polynomial interpolant of
already incorporates the function values ,
so additional information on is required
to estimate the error
when is not one of the sample points. One
approach is to assume that is smooth,
, in which
case the error is given by
|
(1) |
for some , assuming .
The above error estimate is obtained by repeated application of Rolle's
theorem to the function
that has
roots at ,
hence its -order derivative must have a root in the
interval , denoted by
establishing (1.2). Though the error estimate seems
promising due to the in the denominator, the
derivative can be arbitrarily large even for a
smooth function. This is the behavior that arises in the Runge function
(Fig. 1), for which a typical higher-order derivative
appears as
In[29]:= |
Runge[t_]=1/(1+25*t^2); Simplify[D[Runge[t],{t,10}]] |
The behavior might be attributable to the presence of poles of in the complex plane at ,
but the interpolant of the holomorphic function ,
with a similar power series to ,
In[30]:= |
Series[Runge[t],{t,0,6}] |
In[31]:= |
Series[Exp[-(5t)^2],{t,0,6}] |
also exhibits large errors (Fig. 1), and also has a
high-order derivative of large norm .
In[33]:= |
Simplify[D[Exp[-(5t)^2],{t,10}]] |
|
|
Figure 1. Interpolants of ,
,
based on equidistant sample points.
|
∴ |
function MonomialBasis(t,n)
m=size(t)[1]; A=ones(m,1);
for j=1:n-1
A = [A t.^j]
end
return A
end; |
∴ |
function plotInterp(a,b,f,Basis,m,n,M,txt)
data=sample(a,b,f,m); t=data[1]; y=data[2]
Data=sample(a,b,f,M); T=Data[1]; Y=Data[2]
A = Basis(t,n); x = A\y; z = Basis(T,n)*x
plot(t,y,"ok",T,z,"-r",T,Y,"-b"); grid("on");
xlabel("t"); ylabel("y");
title(txt)
end; |
∴ |
function sample(a,b,f,m)
t = LinRange(a,b,m); y = f.(t)
return t,y
end; |
∴ |
f(t)=1/(1+25*t^2); g(t)=exp(-(5*t)^2); |
∴ |
FigPrefix=homedir()*"/courses/MATH661/images/L19"; |
∴ |
clf(); plotInterp(-1,1,f,MonomialBasis,10,10,100,"Interpolant of f"); |
∴ |
savefig(FigPrefix*"Fig01a.eps") |
∴ |
clf(); plotInterp(-1,1,g,MonomialBasis,10,10,100,"Interpolant of g"); |
∴ |
savefig(FigPrefix*"Fig01b.eps") |
1.1.Error minimization - Chebyshev
polynomials
Since is problem-specific, the
remaining avenue to error control suggested by formula (1.2)
is a favorable choice of the sample points ,
.
The polynomial
is monic (coefficient of highest power is unity), and any interval can be mapped
to the interval by ,
leading to consideration of the problem
i.e., finding the sample points or roots of that lead to
the smallest possible inf-norm of . Plots of
the Lagrange basis (L18, Fig. 2), or Legendre basis, suggest study of
basis functions that have distinct roots in the interval
and attain the same maximum. The trigonometric functions satisfy these
criteria, and can be used to construct the Chebyshev family of
polynomials through
The trigonometric identity
leads to a recurrence relation for the Chebyshev polynomials
The definition in terms of the cosine function easily leads to the
roots, ,
and extrema ,
The Chebyshev polynomials are not themselves monic, but can readily be
rescaled through
Since , the above
suggests that the monic polynomials
have ,
small for large , and indeed the smallest
possible monic polynomials in the inf-norm defined on .
Theorem. The monic polynomial
has a inf-norm lower bound
Proof. By contradiction, assume the monic polynomial
has .
Construct a comparison with the Chebyshev polynomials by evaluating
at the extrema ,
Since the above states
deduce
|
(2) |
However,
both monic implies that
is a polynomial of degree
that would change signs
times to satisfy (2), and thus have
roots contradicting the fundamental theorem of algebra.
 |
|
Figure 2. First
Chebyshev polynomials
|
∴ |
function ChebyshevBasis(m,n)
B=ones(m,1);
θ=LinRange(π,0,m);
for j=1:n
B = [B cos.(j*θ)]
end
return B
end; |
∴ |
n=6; B=ChebyshevBasis(100,n); |
∴ |
clf(); grid("off"); plot(B[:,2],B[:,1]); |
∴ |
xlabel("x"); ylabel("Tn(x)"); title("Chebyshev polynomials"); |
∴ |
for j=2:n+1
plot(B[:,2],B[:,j])
end |
∴ |
FigPrefix=homedir()*"/courses/MATH661/images/L19"; |
∴ |
savefig(FigPrefix*"Fig02.eps"); |
1.2.Best polynomial approximant
Based on the above the optimal choice of
sample points is given by the roots
of the Chebyshev polynomial of
degree , in which
case the interpolation error has the bound