3 Interpolating Lagrange +divided Difference
3 Interpolating Lagrange +divided Difference
Faculty of Engineering
Numerical Analysis
Lecture 4
By : Mahmoud Salim
PhD in Telecommunication Engineering
m.salim.eng@o6u.edu.eg 1
Table of Content – Lecture 4
1 Lagrange Interpolation
Lagrange Interpolation
• Interpolation is the process of deriving a
simple function from a set of discrete
data points so that the function passes
through all the given data points (i.e.
reproduces the data points exactly) and
can be used to estimate data points in
between the given ones.
4
m.salim.eng@o6u.edu.eg
Lagrange Interpolation
5
m.salim.eng@o6u.edu.eg
Lagrange Interpolation
���� �� =�� − ���� �� − ����
… (�� − ����) ���� −
���� ���� − ���� …
(���� − ����)
�� − ��
���� �� = �� �� − ���� … (�� − ����)
���� − ���� ���� −
..
���� … (���� − ����) .
���� �� =�� − ���� �� − ���� …
(�� − ����−��) ���� −
���� ���� − ���� … (����
− ����−��)
6
m.salim.eng@o6u.edu.eg
Lagrange Interpolation
• Then we construct ����(x) as:
• Hence , the linear interpolant is:
7
m.salim.eng@o6u.edu.eg
Lagrange Interpolation
+
+
8
m.salim.eng@o6u.edu.eg
Lagrange Interpolation
• Example: Given a set of three data points:
xi 0 2 4
Yi = fi 1 5 17
• ���� =(��−����)(��−����)
(��−��)(��−��)
(����−����)(����−����)=
��(��−��)
(��−��)(��−��) =
��
9
m.salim.eng@o6u.edu.eg
Lagrange Interpolation
xi 0 2 4
Yi = fi 1 5 17
10
m.salim.eng@o6u.edu.eg
Interpolation Using Divided Differences
m.salim.eng@o6u.edu.eg 11
12
m.salim.eng@o6u.edu.eg
13
m.salim.eng@o6u.edu.eg
Interpolation Using Divided Differences
15
m.salim.eng@o6u.edu.eg
(����)
−����−�����
����−����= ������−(−���
����−����=
�
�)
−��−��= ����
��−(−��)= ������
�� ��
f [x3, x4 ] = �� −��
16
m.salim.eng@o6u.edu.eg
������−��
����−����= −��−��= ����
17
m.salim.eng@o6u.edu.eg
Interpolation Using Divided Differences
f [x
f [x0, x1, x2 ] = 1 ,x2]−f [x0 ,x1]
����−��
����−����=
������−����
��−(−��)= ���� ����−����=
��−��= ����
−��−��= �� f [x0, x1, x2 , x3 ]= ��−���� −��−(−��)=
f [x2, x3, x4 ] =f [x3 ,x4]−f [x2 ,x3] ��
f [x1, x2 , x3, x4 ]=����−�� ��−��= ����
18
m.salim.eng@o6u.edu.eg
−��−(−��)= �� ��−(−��)