Professional Documents
Culture Documents
𝑁𝑁 𝑦𝑦𝑘𝑘
𝑃𝑃 𝑥𝑥 = � 𝑓𝑓 𝑥𝑥𝑘𝑘 � 𝐿𝐿𝑵𝑵,𝑘𝑘 𝑥𝑥
𝑘𝑘=0
wherein
𝑥𝑥 − 𝑥𝑥0 𝑥𝑥 − 𝑥𝑥1 ⋯ 𝑥𝑥 − 𝑥𝑥𝒌𝒌−𝟏𝟏 𝑥𝑥 − 𝑥𝑥𝒌𝒌+𝟏𝟏 ⋯ 𝑥𝑥 − 𝑥𝑥𝑁𝑁
𝐿𝐿𝑁𝑁,𝒌𝒌 𝑥𝑥 =
𝑥𝑥𝑘𝑘 − 𝑥𝑥0 𝑥𝑥𝑘𝑘 − 𝑥𝑥1 ⋯ 𝑥𝑥𝑘𝑘 − 𝑥𝑥𝒌𝒌−𝟏𝟏 𝑥𝑥𝑘𝑘 − 𝑥𝑥𝒌𝒌+𝟏𝟏 ⋯ 𝑥𝑥𝑘𝑘 − 𝑥𝑥𝑁𝑁
𝑁𝑁 𝑁𝑁
𝐻𝐻2𝑁𝑁+1 𝑥𝑥 = � 𝑓𝑓 𝑥𝑥𝑗𝑗 𝐻𝐻𝑁𝑁,𝑗𝑗 𝑥𝑥 + � �𝑁𝑁,𝑗𝑗 𝑥𝑥 ,
𝑓𝑓 ′ 𝑥𝑥𝑗𝑗 𝐻𝐻
𝑗𝑗=0 𝑗𝑗=0
where, for 𝐿𝐿𝑁𝑁,𝑗𝑗 (𝑥𝑥) denoting the 𝑗𝑗th Lagrange coefficient polynomial of degree 𝑁𝑁,
𝐻𝐻𝑁𝑁,𝑗𝑗 𝑥𝑥 = 1 − 2 𝑥𝑥 − 𝑥𝑥𝑗𝑗 𝐿𝐿′ 𝑁𝑁,𝑗𝑗 𝑥𝑥𝑗𝑗 𝐿𝐿2𝑁𝑁,𝑗𝑗 𝑥𝑥
�
�𝑁𝑁,𝑗𝑗 𝑥𝑥 = 𝑥𝑥 − 𝑥𝑥𝑗𝑗 𝐿𝐿2𝑁𝑁,𝑗𝑗 𝑥𝑥
𝐻𝐻
Hermite Interpolation
Theorem (cont.). Moreover, if 𝑓𝑓 ∈ 𝐶𝐶 2𝑛𝑛+2 [𝑎𝑎, 𝑏𝑏], then
𝑥𝑥 − 𝑥𝑥0 2 ⋯ 𝑥𝑥 − 𝑥𝑥𝑁𝑁 2
2𝑁𝑁+2
𝑓𝑓 𝑥𝑥 = 𝐻𝐻2𝑁𝑁+1 𝑥𝑥 + 𝑓𝑓 𝜉𝜉(𝑥𝑥)
2𝑁𝑁 + 2 !
Solution.
Step 1. Construct 𝐿𝐿2,0 𝑥𝑥 , 𝐿𝐿2,1 𝑥𝑥 , 𝐿𝐿2,2 𝑥𝑥 .
Step 2. Construct 𝐿𝐿′2,0 𝑥𝑥 , 𝐿𝐿′2,1 𝑥𝑥 , 𝐿𝐿′2,2 𝑥𝑥 .
Step 3. Construct 𝐻𝐻2×2+1 𝑥𝑥 .
Step 4. Estimate 𝑓𝑓(1.5) ≈ 𝐻𝐻5 𝑥𝑥 .
Hermite Interpolation
Solution (cont.).
𝑥𝑥 − 𝑥𝑥1 𝑥𝑥 − 𝑥𝑥2 50 2 175 152 100 175
𝐿𝐿2,0 𝑥𝑥 = = 𝑥𝑥 − 𝑥𝑥 + ′
𝐿𝐿2,0 𝑥𝑥 = 𝑥𝑥 −
𝑥𝑥0 − 𝑥𝑥1 𝑥𝑥0 − 𝑥𝑥2 9 9 9 9 9
𝑥𝑥 − 𝑥𝑥0 𝑥𝑥 − 𝑥𝑥2 −100 2 320 247 −200 320
𝐿𝐿2,1 𝑥𝑥 = = 𝑥𝑥 + 𝑥𝑥 − ⟹ 𝐿𝐿′2,1 𝑥𝑥 = 𝑥𝑥 +
𝑥𝑥1 − 𝑥𝑥0 𝑥𝑥1 − 𝑥𝑥2 9 9 9 9 9
𝑥𝑥 − 𝑥𝑥0 𝑥𝑥 − 𝑥𝑥1 50 2 145 104 ′
100 145
𝐿𝐿2,2 𝑥𝑥 = = 𝑥𝑥 − 𝑥𝑥 + 𝐿𝐿2,2 𝑥𝑥 = 𝑥𝑥 −
𝑥𝑥2 − 𝑥𝑥0 𝑥𝑥2 − 𝑥𝑥1 9 9 9 9 9
𝐻𝐻2,0 𝑥𝑥 = 1 − 2 𝑥𝑥 − 𝑥𝑥0 𝐿𝐿′ 2,0 𝑥𝑥0 𝐿𝐿22,0 𝑥𝑥 = 10𝑥𝑥 − 12 50⁄9 𝑥𝑥 2 − 175⁄9 𝑥𝑥 + 152⁄9 2
�
�2,0 𝑥𝑥 = 𝑥𝑥 − 𝑥𝑥0 𝐿𝐿22,0 𝑥𝑥 = 𝑥𝑥 − 1.3 50⁄9 𝑥𝑥 2 − 175⁄9 𝑥𝑥 + 152⁄9 2
𝐻𝐻
𝐻𝐻2,1 𝑥𝑥 = 1 − 2 𝑥𝑥 − 𝑥𝑥1 𝐿𝐿′ 2,1 𝑥𝑥1 𝐿𝐿22,1 𝑥𝑥 = −100⁄9 𝑥𝑥 2 + 320⁄9 𝑥𝑥 − 247⁄9 2
�
�2,1 𝑥𝑥 = 𝑥𝑥 − 𝑥𝑥1 𝐿𝐿22,1 𝑥𝑥 = 𝑥𝑥 − 1.6 −100⁄9 𝑥𝑥 2 + 320⁄9 𝑥𝑥 − 247⁄9 2
𝐻𝐻
𝐻𝐻2,2 𝑥𝑥 = 1 − 2 𝑥𝑥 − 𝑥𝑥2 𝐿𝐿′ 2,2 𝑥𝑥2 𝐿𝐿22,2 𝑥𝑥 = −10 𝑥𝑥 − 2 50⁄9 𝑥𝑥 2 − 145⁄9 𝑥𝑥 + 104⁄9 2
�
�2,2 𝑥𝑥 = 𝑥𝑥 − 𝑥𝑥2 𝐿𝐿22,2 𝑥𝑥 = 𝑥𝑥 − 1.9 50⁄9 𝑥𝑥 2 − 145⁄9 𝑥𝑥 + 104⁄9 2
𝐻𝐻
Hermite Interpolation
Solution (cont.).
⟹ 𝐻𝐻5 𝑥𝑥 = 𝐻𝐻2×2+1 𝑥𝑥
2 2
=� 𝑓𝑓 𝑥𝑥𝑗𝑗 𝐻𝐻2,𝑗𝑗 𝑥𝑥 + � �2,𝑗𝑗 𝑥𝑥
𝑓𝑓 ′ 𝑥𝑥𝑗𝑗 𝐻𝐻
𝑗𝑗=0 𝑗𝑗=0
= 0.6200860𝐻𝐻2,0 𝑥𝑥 + 0.4554022𝐻𝐻2,1 𝑥𝑥 +
�2,0 𝑥𝑥 −
0.2818186𝐻𝐻2,2 𝑥𝑥 − 0.5220232𝐻𝐻
�2,1 𝑥𝑥 − 0.5811571 𝐻𝐻
0.5698959𝐻𝐻 �2,1 𝑥𝑥
𝑁𝑁
𝑃𝑃𝑁𝑁 (𝑥𝑥) = 𝑓𝑓 [𝑥𝑥0 ] + � 𝑓𝑓[𝑥𝑥0 , 𝑥𝑥1 , . . . , 𝑥𝑥𝑘𝑘 ](𝑥𝑥 − 𝑥𝑥0 ) · · · (𝑥𝑥 − 𝑥𝑥𝑘𝑘−1 )
𝑘𝑘=1
Theorem. Suppose that 𝑓𝑓 ∈ 𝐶𝐶 𝑁𝑁 [𝑎𝑎, 𝑏𝑏] and 𝑥𝑥0 , 𝑥𝑥1 , . . . , 𝑥𝑥𝑁𝑁 ∈ [𝑎𝑎, 𝑏𝑏] are
distinct numbers in [𝑎𝑎, 𝑏𝑏]. Then a number 𝜉𝜉 exists in (𝑎𝑎, 𝑏𝑏) with
𝑁𝑁
𝑓𝑓 (𝜉𝜉 )
𝑓𝑓 [𝑥𝑥0 , 𝑥𝑥1 , . . . , 𝑥𝑥𝑁𝑁 ] = .
𝑁𝑁!
Hermite Interpolation
& Divided Differences
𝑁𝑁
Method. Suppose that the distinct numbers 𝑥𝑥𝑖𝑖 𝑖𝑖=0 are given together with the
values of 𝑓𝑓 and 𝑓𝑓 ′ at these numbers.
Step 2. Construct the divided difference table in the form of Table using 𝑧𝑧𝑖𝑖 2𝑁𝑁+1
𝑖𝑖=0 .
Hermite Interpolation
& Divided Differences
Method (cont.).
Recall. Divided difference table:
Hermite Interpolation
& Divided Differences
Method (cont.).
Caution. Since 𝑧𝑧2𝑖𝑖 = 𝑧𝑧2𝑖𝑖+1 = 𝑥𝑥𝑖𝑖 for each 𝑖𝑖, we cannot define 𝑓𝑓[𝑧𝑧2𝑖𝑖 , 𝑧𝑧2𝑖𝑖+1 ] by the
divided difference formula, since
2𝑁𝑁+1
𝐻𝐻2𝑁𝑁+1 (𝑥𝑥) = 𝑓𝑓 [𝑧𝑧0 ] + � 𝑓𝑓[𝑧𝑧0 , 𝑧𝑧1 , . . . , 𝑧𝑧𝑘𝑘 ](𝑥𝑥 − 𝑧𝑧0 ) · · · (𝑥𝑥 − 𝑧𝑧𝑘𝑘−1 )
𝑘𝑘=1
When the free BC occur, the spline is called a natural spline, and its
graph approximates the shape that a long flexible rod would assume
if forced to go through the data points.
Theorem. If 𝑓𝑓 is defined at 𝑎𝑎 = 𝑥𝑥0 < 𝑥𝑥1 < ⋯ < 𝑥𝑥𝑁𝑁 = 𝑏𝑏 and differentiable
at 𝑎𝑎 and 𝑏𝑏, then 𝑓𝑓 has a unique clamped spline interpolant 𝑆𝑆 on the
nodes 𝑥𝑥0 , 𝑥𝑥1 , ⋯ , 𝑥𝑥𝑁𝑁 .