数学与应用数学专业论文英文文献翻译Word文档格式.docx
《数学与应用数学专业论文英文文献翻译Word文档格式.docx》由会员分享,可在线阅读,更多相关《数学与应用数学专业论文英文文献翻译Word文档格式.docx(10页珍藏版)》请在冰豆网上搜索。
,
Later,weexamineotherpolynomials,oflowerdegree,thatonlyapproximatethedata.Theyarenotinterpolatingpolynomials.
ThemostcompactrepresentationoftheinterpolatingpolynomialistheLa-grangeform.
Therearetermsinthesumandtermsineachproduct,sothisexpressiondefinesapolynomialofdegreeatmost.Ifisevaluatedat,alltheproductsexceptthetharezero.Furthermore,thethproductisequaltoone,sothesumisequaltoandtheinterpolationconditionsaresatisfied.
Forexample,considerthefollowingdataset:
x=0:
3;
y=[-5-6-116];
Thecommand
disp([x;
y])
displays
0123
-5-6-116
TheLagrangianformofthepolynomialinterpolatingthisdatais
Wecanseethateachtermisofdegreethree,sotheentiresumhasdegreeatmostthree.Becausetheleadingtermdoesnotvanish,thedegreeisactuallythree.Moreover,ifwepluginor3,threeofthetermsvanishandthefourthproducesthecorrespondingvaluefromthedataset.
PolynomialsareusuallynotrepresentedintheirLagrangianform.Morefre-quently,theyarewrittenassomethinglike
Thesimplepowersofxarecalledmonomialsandthisformofapolynomialissaidtobeusingthepowerform.
Thecoefficientsofaninterpolatingpolynomialusingitspowerform,
can,inprinciple,becomputedbysolvingasystemofsimultaneouslinearequations
ThematrixofthislinearsystemisknownasaVandermondematrix.Itselementsare
ThecolumnsofaVandermondematrixaresometimeswrittenintheoppositeorder,butpolynomialcoefficientvectorsinMatlabalwayshavethehighestpowerfirst.
TheMatlabfunctionvandergeneratesVandermondematrices.Forourex-ampledataset,
V=vander(x)
generates
V=
0001
1111
8421
27931
Then
c=V\y’
computesthecoefficients
c=
1.0000
0.0000
-2.0000
-5.0000
Infact,theexampledatawasgeneratedfromthepolynomial.
OneoftheexercisesasksyoutoshowthatVandermondematricesarenonsin-gularifthepointsaredistinct.ButanotheroneoftheexercisesasksyoutoshowthataVandermondematrixcanbeverybadlyconditioned.Consequently,usingthepowerformandtheVandermondematrixisasatisfactorytechniqueforproblemsinvolvingafewwell-spacedandwell-scaleddatapoints.Butasageneral-purposeapproach,itisdangerous.
Inthischapter,wedescribeseveralMatlabfunctionsthatimplementvariousinterpolationalgorithms.Allofthemhavethecallingsequence
v=interp(x,y,u)
Thefirsttwoinputarguments,and,arevectorsofthesamelengththatdefinetheinterpolatingpoints.Thethirdinputargument,,isavectorofpointswherethefunctionistobeevaluated.Theoutput,v,isthesamelengthasuandhaselements
Ourfirstsuchinterpolationfunction,polyinterp,isbasedontheLagrangeform.ThecodeusesMatlabarrayoperationstoevaluatethepolynomialatallthecomponentsofusimultaneously.
functionv=polyinterp(x,y,u)
n=length(x);
v=zeros(size(u));
fork=1:
n
w=ones(size(u));
forj=[1:
k-1k+1:
n]
w=(u-x(j))./(x(k)-x(j)).*w;
end
v=v+w*y(k);
Toillustratepolyinterp,createavectorofdenselyspacedevaluationpoints.
u=-.25:
.01:
3.25;
v=polyinterp(x,y,u);
plot(x,y,’o’,u,v,’-’)
createsfigure3.1.
Figure3.1.polyinterp
Thepolyinterpfunctionalsoworkscorrectlywithsymbolicvariables.Forexample,create
symx=sym(’x’)
Thenevaluateanddisplaythesymbolicformoftheinterpolatingpolynomialwith
P=polyinterp(x,y,symx)
pretty(P)
produces
-5(-1/3x+1)(-1/2x+1)(-x+1)-6(-1/2x+3/2)(-x+2)x
-1/2(-x+3)(x-1)x+16/3(x-2)(1/2x-1/2)x
Thisexpressionisarearrange