您好,欢迎访问三七文档
当前位置:首页 > 机械/制造/汽车 > 汽车理论 > Hermite-插值解析
函数逼近的插值法——Hermite插值多项式主讲孟纯军Lagrange插值公式所求得L(x)保证了节点处的函数值相等,也就是保证了函数的连续性。但不少实际问题还需要插值得光滑度,也就是还要求它在节点处的导数值也相等,导数的阶数越高则光滑度越高。现代的仿生学就是一个典型的例子。在设计交通具的外形,就是参照海豚的标本上已知点及已知点的导数,做插值在计算机上模拟海豚的外形制成飞机、汽车等外形。Hermite插值多项式Hermite插值问题的提法01001,,...,,(){},,...,,nninxxxfxxyyy给定节点给定函数在节点处的函数值01',',...,',nyyy以及相应的一阶导数值21(),nHx求多项式使得21''21()(),(0,1,2,...)()'()niiiniiiHxyfxinHxyfx21()HermitenHx称为插值多项式。Hermite插值多项式的求法—Lagrange方法21''21()(),(0,1,2,...)()'()niiiniiiHxyfxinHxyfx由插值条件'2100()()()nnnjjjjjjHxxyxy设()()22jjxxn其中,,为个基函数。Lagrange由插值基函数,设想11()0jijixji()'2()00,1,2,...jixin()3()00,1,2,...jixin()'14()0jijixji()()21:jxn为次数不超过的多项式,考虑它的零点01110()()...()()...()jjjjjjjnxxxxx'''011''10()()...()()...()jjjjjjjnxxxxx'()1,()0jjjjxx而0111,,...,,...,()jjnjxxxxxx则是的二重零点。2222201112222201112()()...()()...()()()()()...()()...()()()jjnjjjjjjjjnjxxxxxxxxxxxCxxxxxxxxxxxCxlx所以,令()21()jxnCx由于是次多项式,故为一次多是项式。2()()()()jjCxAxBxAxBlx令即'12()()0jjjjAxBAAxBlx''2()12()jjjjjAlxBxlx)())()(21()())(21)(2()(2'2''xlxlxxxlxlxxxlxjjjjjjjjjjj故得:()21:jxn也为次数不超过的多项式,它的零点01110()()...()()...()jjjjjjjnxxxxx'''011''10()()...()()...()jjjjjjjnxxxxx'()0,()1jjjjxx而0111,,...,,...,()jjnjjxxxxxxx则是的二重零点,是单重零点。2222201112222201112()()...()()...()()()()()...()()...()()()jjnjjjjjjjjjnjjxxxxxxxxxxxCxxxxxxxxxxxxCxxlx()21jxnC由于是次多项式,故为常数。2'()()2()()'()|1jjjjjjjxxClxCxxlxlxC2()()()jjjxxxlx所以'2100()()()nnnjjjjjjHxxyxy'22'0012()())()()()nnjjjjjjjjjjxxlxlxyxxlxy(''20()2())()njjjjjjjjyxxyylxlx((0,()Lagrangenijiijjixxlxxx其中为插值基函数。012121''21,,...,(),'()',0,1,...,,()()(),(0,1,2,...)()'()niiiinniiiniiixxxfxyfxyinHxHxyfxinHxyfx定理:给定互异的节点,给定函数值则存在唯一的Hermite插值多项式满足'()jjlx如何实现?012010201()()()...()()()...(),nnlxxxxxxxAAxxxxxx例如:其中则0'23131211()(()()...()()()...()...()()...())nnnlxxxxxxxAxxxxxxxxxxxx'0002030010300102011()(()()...()()()...()...()()...())nnnlxxxxxxxAxxxxxxxxxxxx所以有01020111...()()()nxxxxxx101()nijxx'01111111()...()()()111...()()()jjjjjjnijjjnjiijlxxxxxxxxxxxxx类似地,Hermite插值余项定理:设函数(21)()[,]nfxCab,且f(x)在(a,b)内存在2n+2次导数,则满足式插值条件的21()nHx的余式有如下估计(22)2211()()()()()(22)!nnRxfxHxfxn其中,01(,)()()()()nabxxxxxxx,三次Hermite插值多项式(n=1)313331113''''111()()(),()()()'(),()'()jjjjjjjjjjjjjjjHxHxfxyHxfxyHxfxyHxfxyhxx插值多项式满足条件:1''3111:()()()()()jjjjjjjjHxxyxyxyxy则11'2111'2((12)())()((12)())()jjjjjjjjjjjjjjxxxxyxxyhhxxxxyxxyhh33(4)22111()()()1()()()4!(),(,)jjjjjjjRxfxHxfxxxxhxxxx其中,例设()sinfxx,试用(0)0f,1()62f,'(0)1f,'3()62f确定二点三次Hermite插值多项式3()Hx并计算3()12H的值。解:由二点三次Hermite插值公式得:2306()[[12]0(0)1][]66xxHxx21306[[12]()][]26266xxx222636336(1)[()()]226xxxxx所以有313()0.2587686161248496H与真值sin0.25881904512相比已有三位有小数字。x=[0,pi/6];y=sin(x);z=cos(x);u=pi/12;d=hermitchazhi(x,y,z,u)d=0.25876861681747e=abs(sin(u)-d)e=5.042828505269492e-005Hermit插值问题的一般提法(1)()jxjpxii若给定插值多项式在节点处的阶导数值,2,3,,1(-1)(-2)(),(),...,'()ixjjijjpxpxpxii则在节点处的阶导数值都给定,()pxi此节点的函数值也给定。xji也就是说,在节点处满足个插值条件。,...,0:()()(01,0)xxnxkiijPxcjkiniiji设节点为,多项式在节点满足插个值条件()112pxkkkmn插值多项式一共满足的插值条件的个数1mm可以证明,满足个这样的插值条件的次数不超过的多项式是唯一的。这样的插值问题称为Hermite插值问题Hermite插值多项式的求法——Newton方法.??01c10c1x00c0x00c0x10)1p(x,01)0(xp',00)0p(xp(x),问号表示待算元素:写出如下形式的差商表使得假定要求多项式ccc()(x)0lim[x,]lim'(x)00xxxxx000fxffxfx由导数的定义:f[x,x]'(x)000f所以,定义2p(x)p(x)p[x,x](x)p[x,x,x](x)00000010xx()(x)101000p[x,x]01xx1010pxpccxx表格中待定元素的计算方法:p[x,x]p[x,x]0100p[x,x,x]001x10x)0()(!1]0,,0f[x)()(!1],,0f[xxkfkxkfkkx方法:得到同节点的差商计算由差商与导数的关系:列差商表如下:解:满足如下插值条件:,差商方法求插值多项式:利用例题8(2)p7,(2)p'6,p(2)3,(1)p'2,p(1))(Newtonxp123???12???2674262612312-11243126742626Newton第一行为所求各阶差商,也就是型插值多项式的系数。2222p(x)23(x-1)(x-1)2(x-1)(2)(x-1)(2)xx分段多项式插值前面我们根据区间[a,b]上给出的节点做插值多项式Ln(x)近似表示f(x)。一般总以为Ln(x)的次数越高,逼近f(x)的精度越好,但实际并非如此,次数越高,计算量越大,也不一定收敛。Runge现象21,[5,5]1[5,5],yxnx给定函数区间将区间等分,获得节点21,1[,]yxxy计算相应的函数值点获得数据,()xn由此构造插值多项式N21()1nxyxn当次数增加时,逼近N和的逼近效果:[5,5]30,a描图点为中的个等分点,构成向量2()1()1ayaan描图z=N,z1=-5-4-3-2-1012345-0.200.20.40.60.811.2[a,z,z1]=divided1(5);plot(a,z,'r',a,z1,'g')-5-4-3-2-1012345-0.500.511.52[a,z,z1]=divided1(10);plot(a,z,'r',a,z1,'g')-5-4-3-2-1012345-0.200.20.40.60.811.21.41.61.8[a,z,z1]=divided1(15);plot(a,z,'r',a,z1,'g')-5-4-3-2-1012345-25-20-15-10-505[a,z,z1]=divided1(20);plot(a,z,'r',a,z1,'g')当节点加密时,被插函数与插值多项式的差别越来越大,这种现象称为Runge现象。所以,高次插值多项式要慎用。一般,采用低次分段多项式插值。分段线性插值。上的线性插值函数表示用则判断)已知(],[)(],[,,...,1,0,,11jjjjjjxxxfxxxnjyx1,jjxux则线性插值函数为11111111()()/()jjjjjjjjjjjjjjxxxxyyyxxxxyxxyyxx11111,():()()()/()jjjjjjjjxuxyuyuyuxyyxx估算1012121()(,)()(,)()......()(,)nnnIxxxxIxxxxIxIxxxx分段插值函数1111jjjjjjjjjxxxxIyyxxxx其中11()()()max{}jjjjnIxIxIxhhxx特点:连续,但在节点处不可导,即节点处不光滑。并且
本文标题:Hermite-插值解析
链接地址:https://www.777doc.com/doc-2240091 .html