第六章插值/ nterpolation 当精确函数y=x)非常复杂或未知时,在 系列节点x…xn处测得函数值y=∫(xo), Jn=fxn),由此构造一个简单易算的近似函 数g(x)≈fx),满足条件g(x)=(x)(=0, n)。这里的g(x)称为f(x)的插值函数。最常 用的插值函数是多项式 g(x)≈f(x)
第六章 插值 /* Interpolation */ 当精确函数 y = f(x) 非常复杂或未知时,在一 系列节点 x0… xn 处测得函数值 y0 = f(x0), … yn = f(xn ),由此构造一个简单易算的近似函 数 g(x) f(x),满足条件g(xi) = f(xi) (i = 0, … n)。这里的 g(x) 称为f(x) 的插值函数。最常 用的插值函数是多…项? 式 x0 x1 x2 x x3 x4 g(x) f(x)
§1拉格朗日多项式 Lagrange Polynomial 求n次多项式P(x)=a+a1x+…+anx"使得 条件:无重合节点,即氵≠jx1≠x 称为拉氏基函数/ Lagrange Basis 得 满足条件l(x)=5 Kronecker Delta * 可见ru m两点的直线。 P1(x)=y0+ yIn (x-x0) X-x r- l()y 0
§1 拉格朗日多项式 /* Lagrange Polynomial */ Pn ( xi ) = yi , i = 0, ... , n 求 n 次多项式 Pn (x) = a0 a1 x an x n 使得 条件:无重合节点,即 i j xi x j n = 1 已知 x0 , x1 ; y0 , y1,求 P x a a x 1 0 1 ( ) = 使得 1 0 0 1 1 1 P ( x ) = y , P ( x ) = y 可见 P1(x) 是过 ( x0 , y0 ) 和 ( x1 , y1 ) 两点的直线。 ( ) ( ) 0 1 0 1 0 1 0 x x x x y y P x y - - - = 0 1 1 x x x x - - 1 0 0 x x x x - - = y0 + y1 l0(x) l1(x) = = 1 0 ( ) i i x yi l 称为拉氏基函数 /* Lagrange Basis */, 满足条件 li(xj)=ij /* Kronecker Delta */
8 1 Lagrange Polynomial The mathematician S had to move to a new place His wife didnt trust him very much, so when they stood down on the street with all their things she asked him to watch their ten trunks, while she got a taxi. Some minutes later she returned. Said the husband: "I thought you said there were ten trunks, but Ive only counted to nine The wife said: "No, they're TEN! But i have counted them :0.1.2 n21希望找到(x),=0,…,n使得();然后令 P(x)=∑l(x)y,则显然有Pn(x)=y2 l(x)每△ ▲ 与节点有关,而与∫无关 Lagrange Polynomial (x2-x;) x-xi (x-x;) (x)=∑l(x)y
The mathematician S. had to move to a new place. His wife didn't trust him very much, so when they stood down on the street with all their things, she asked him to watch their ten trunks, while she got a taxi. Some minutes later she returned. Said the husband: "I thought you said there were ten trunks, but I've only counted to nine!" The wife said: "No, they're TEN!" "But I have counted them: 0, 1, 2, ..." §1 Lagrange Polynomial n 1 希望找到li(x),i = 0, …, n 使得 li(xj)=ij ;然后令 = = n i n i i P x l x y 0 ( ) ( ) ,则显然有Pn (xi) = yi 。 li(x) 每个 li有 n 个根 x0 … xi … xn = = - - - = - n j j i i x Ci x x x xi x xn Ci x xj l 0 ( ) ( 0 )...( )...( ) ( ) - = = j i i j i i i x x l x C ( ) 1 ( ) 1 = - - = n j j i i j j i x x x x l x 0 ( ) ( ) ( ) = = n i n i i L x l x y 0 ( ) ( ) Lagrange Polynomial 与 节点 有关,而与 f 无关
8 1 Lagrange Polynomial 定理{(唯-性)满是P(x)=,1=0,m的m阶插值多 项式是唯一存在的。 证明:(p105-106利用 Vandermonde行列式论证) 反证:若不唯一,则除了L(x)外还有另一n阶多项 式Pn(x)满足Pn(x)=y 考察Q(x)=P(x)-Ln(x),则Qn的阶数n 而Qn有+1个不同的根x0…,xn 注:若不将多项式次数限制为n,则插值多项式不唯 例如P(x)=Ln(x)+p(x(x-x)也是一个插值 多项式,其中p(x)可以是任意多项式
§1 Lagrange Polynomial 定理 (唯一性) 满足 的 n 阶插值多 项式是唯一存在的。 P( xi ) = yi , i = 0, ... , n 证明: ( p.105-106 利用Vandermonde 行列式论证) 反证:若不唯一,则除了Ln (x) 外还有另一 n 阶多项 式 Pn (x) 满足 Pn (xi) = yi 。 考察 Qn(x) = Pn(x)-Ln(x),则 Qn 的阶数 n 而 Qn有 n + 1 个不同的根 x0 … xn 注:若不将多项式次数限制为 n ,则插值多项式不唯一。 例如 也是一个插值 多项式,其中 可以是任意多项式。 = = - n i n i P x L x p x x x 0 ( ) ( ) ( ) ( ) p( x)
8 1 Lagrange Polynomial >插值余项/ Remainder 设节点a≤x<x<…<x≤b,且f满足条件∫eCn列l, 在a,b内存在考察截断误差R(x)=()-L) Rn(x)至少有+1个根→→R(x)=K(x)I(x-x) 注意这里是对t求导叫()=(0-()(=x) i=0 g(x)有+2个不同的根x…xnx今p"(5)=0,5 ∈(a (1(5x)-+(5)-K(x)(n+1)!=R(5)-k(x)(m+1! (n+1) ( K(x)= ( r,(x)= wIS ITe-x,) (n+1)! (n+1) i=0
§1 Lagrange Polynomial 插值余项 /* Remainder */ 设节点 (n1) f 在[a , b]内存在, 考察截断误差 R (x) f (x) L (x) n = - n f C [a,b] n a x x x b 0 1 n ,且 f 满足条件 , Rolle’s Theorem: 若 充分光滑, ,则 存在 使得 。 (x) ( ) ( ) 0 x0 = x1 = ( , ) 0 1 x x ( ) = 0 推广:若(x0 ) =(x1 ) =(x2 ) = 0 ( , ), ( , ) 0 0 1 1 1 2 x x x x 使得 ( ) ( ) 0 0 = 1 = ( , ) 0 1 使得 ( ) = 0 ( x0 ) = = ( xn ) = 0 存在 (a, b) 使得 ( ) 0 ( ) = n Rn (x) 至少有 n+1个根 = = - n i Rn x K x x xi 0 ( ) ( ) ( ) 任意固定 x xi (i = 0, …, n), 考察 = = - - n i xi t Rn t K x t 0 ( ) ( ) ( ) ( ) (x)有 n+2 个不同的根 x0 … xn x ( ) 0, ( , ) ( 1) a b x x n = ( ) ( ) ( 1) ! ( 1) - R x K x n n n 注意这里是对 t 求导 - - = ( ) ( ) ( )( 1) ! ( 1) ( 1) f L x K x n n x n n ( 1)! ( ) ( ) ( 1) = n f K x x n = - = n i i x n n x x n f R x 0 ( 1) ( ) ( 1)! ( ) ( )