9512.net

Hermite插值公式

§5.5 Hermite插值公式 插值公式
Newton插值和Lagrange插值虽然构造比较简单，但都存 在插值曲线在节点处有尖点，不光滑，插值多项式在节 点处不可导等缺点. 为了保证插值多项式 Pn (x)能更好地逼近 f (x)，对 Pn (x)增 加一些约束条件，例如要求 Pn (x) 在某些结点处与 f (x) 相切，即具有相同的导数值.

H ( xi ) = f ( xi ), i = 0,1,2,L, n ------(1) H ′( xi ) = f ′( xi ), i = 0,1,2,L, r (r ≤ n)
1

H ( x) = ∑ hk ( x) f ( xk ) + ∑ hk ( x) f ′( xk ) ------(2)
k =0 k =0

n

r

2

1 hk ( xi ) = 0

i=k i≠k

i, k = 0,1,L, n

------(3)

′ hk ( xi ) = 0, k = 0,1,L, n; i = 0,1,L, r

1 hk ( xi ) = 0 ′

i=k i≠k

i, k = 0,1,L, r

------(4)

hk ( xi ) = 0, k = 0,1,L, r; i = 0,1,L, n

1.求解 hk ( x) (k = 0,1,L n)

(i = 0,1,L, r ; i ≠ k ) 是 hk (x) 的二重
3

(i = r + 1, r + 2,L, n; i ≠ k ) 是 hk (x)

(1)当0 ≤ k ≤ r时, hk ( x)具有如下形式：

hk ( x) = ( Ax + B)( x x0 ) 2 L( x xk 1 ) 2 ( x xk +1 ) 2 L( x xr ) 2 ( x xr +1 )L ( x xn ) = ( Ax + B)∏ ( x xi ) 2 ∏ ( x xi )
i =0 i≠k i = r +1 r n

------(5)

4

( Axk + B)∏ ( xk xi ) 2 ∏ ( xk xi ) = 1
i =0 i≠k i = r +1

r

n

A∏ ( xk xi ) 2 ∏ ( xk xi ) +
i =0 i≠k i = r +1

r

n

2( Axk + B )∑ ( xk x j )∏ ( xk xi )
j =0 i =0 i≠ j i≠k n r n

r

r

2

i = r +1

∏ (x

n

k

xi ) +

( Axk + B ) ∑ ∏ ( xk xi ) 2 ∏ ( xk xi ) = 0
j = r +1 i =0 i≠k i = r +1 i≠ j

5

A=

n 1 1 2∑ +∑ j =0 xk x j j = r +1 xk x j

r

( xk xi ) 2 ∏ ( xk xi ) ∏
i =0 i≠k i =r +1

r

n

B=

1 Axk ( xk xi ) 2 ∏ ( xk xi ) ∏
i =0 i≠k i = r +1 r n

′ ′ hk ( x) = {1 ( x xk )[lkn ( xk ) + lkr ( xk )]}lkn ( x)lkr ( x) ------(6) k = 0,1,L, r
6

x xi lkn ( x) = ∏ i =0 xk xi
n i≠k r

x xi lkr ( x) = ∏ i =0 xk xi
i≠k n

1 ′ lkn ( xk ) = ∏ i =0 xk xi
i≠k
r

1 ′ lkr ( xk ) = ∏ i =0 xk xi
i≠k
7

(2)当r + 1 ≤ k ≤ n时, hk ( x)具有如下形式：

hk ( x) = C ∏ ( x xi )
i =0

r

2

i = r +1 i≠k

∏ (x x )
i

n

------(7)

C=

1

∏ (x
i =0

r

k

xi )

2

i =r +1 i≠k

∏ (x

n

k

xi )

wr ( x) hk ( x) = lkn ( x), wr ( xk )

k = r + 1, r + 2,L, n -(8)
8

wr ( x) = ∏ ( x xi )

r

wr ( xk ) = ∏ ( xk xi )
i =0
n

i =0 r

x xi lkn ( x) = ∏ i =0 xk xi
i≠k

2.求解 hk ( x) (k = 0,1,L n)

(i = 0,1,L, r ; i ≠ k ) 是 hk (x) 的二重
9

(i = k , r + 1, r + 2,L, n) 是
n r

hk (x)

hk ( x) = D∏ ( x xi )∏ ( x xi )
i =0

-----(9)

′ 由条件(4)知hk ( xk ) = 1
D= 1

i =0 i≠k

∑∏ (x
j =0 i =0 i≠ j

n

n

k

xi )∏ ( xk xi ) + ∑ ∏ ( xk xi )∏ ( xk xi )
i =0 i≠k j =0 i =0 j ≠k i =0 i≠k i≠ j

r

r

n

r

hk ( x) = ( x xk )lkn ( x)lkr ( x), k = 0,1,L, r -----(10)
10

x xi lkn ( x) = ∏ i =0 xk xi
n i≠k r

x xi lkr ( x) = ∏ i =0 xk xi
i≠k

11

G ( xi ) = 0, i = 0,1,L, n G′( xi ) = 0, i = 0,1,L, r

12

F ( x) = F ( x0 ) = F ( x1 ) = L = F ( xn ) = 0

F ′( x0 ) = F ′( x1 ) = L = F ′( xr ) = 0
13

F ( n+r +2 ) (t )在(a, b)内至少有一个零点ξ，因此
f
( n+ r + 2 )

(n + r + 2)! (ξ ) [ f ( x) H ( x)] = 0 wn ( x) wr ( x)

f ( n+r +2 ) (ξ ) 即得 f ( x) H ( x) = wn ( x) wr ( x) (n + r + 2)!
14

H ( x) = ∑ hk ( x) f ( xk ) + ∑ hk ( x) f ′( xk )
k =0 k =0 n n

-----(11)

2 ′ ( xk )]lkn ( x), k = 0,1,L, n hk ( x) = [1 2( x xk )lkn 2 hk ( x) = ( x xk )lkn ( x), k = 0,1,L, n

15

H ( xi ) = f ( xi ), H ′( xi ) = f ′( xi ), i = 0,1

H ( x) = h0 ( x) f ( x0 ) + h1 ( x) f ( x1 ) + h0 ( x) f ′( x0 ) + h1 ( x) f ′( x1 ) --(12)

x x0 x x1 2 h0 ( x) = (1 + 2 )( ) x1 x0 x0 x1 x x1 x x0 2 h1 ( x) = (1 + 2 )( ) x0 x1 x1 x0

16 多项式(12)常用作分段低次插值，称为分段三次Hermite插值.

x x1 2 h0 ( x) = ( x x0 )( ) x0 x1 x x0 2 h1 ( x) = ( x x1 )( ) x1 x0

x0 = 1, x1 = 2

y0 = 2 , y1 = 3

′ ′ y 0 = 0 , y1 = 1

′ ′ H 3 ( x) = y0 h0 ( x) + y1h1 ( x) + y0 h0 ( x) + y1h1 ( x)

x x0 x x1 x x1 x x0 = y0 1 + 2 x x + y1 1 + 2 x x x x x1 x0 0 1 0 0 1 1

2

2

x x0 x x1 ′ ′ + y0 ( x x0 ) + y1 ( x x1 ) x x x x 1 0 1 0
2

2

17

2 H 3 ( x ) = 2 (1 + 2( x 1)) ( x 2 )2 + 3(1 2( x 2 )) ( x 1)

( x 2 ) ( x 1)2 = 3 x 3 + 13 x 2 17 x + 9

f ( 1.5) ≈ H 3 ( 1.5) = 2.625 f (1.7 ) ≈ H 3 (1.7 ) = 2.931

18

Hermite插值多项式H
(i)-u)*(2*p*y(i)-y_1(i))+y(i)); end f0=subs(f,'u',x0); 实例:根据下面的数据点求出其埃尔米特插值多项式,并计算当 x=1.44 时 y 的值...
Hermite插值报告

>>ydot=[0.353553 0.322749]; >>xi=2.45; >>yi=Hermite(x,y,ydot,xi) 输出结果如下: yi = 1.5652 则用两点三次 Hermite 插值公式求 f ( x) ...

Hermite插值函数

hermite插值多项式的例题
f ' ( x0 ) 的插值多项式,并估计误差。 解 由给定的 3 个插值条件,显然可确定一个次数不超过 2 次的埃尔米特插值多项式 H ( x) ,又有 H ( x ) 应...