Professional Documents
Culture Documents
Lagrangian Interpolation
Lagrangian Interpolation
Lagrangian interpolating polynomial is given by
n
f n ( x) Li ( x ) f ( xi )
i 0
where ‘ n ’ in f n (x ) stands for the n th order polynomial that approximates the function y f (x)
1
10/14/2021
Example
The upward velocity of a rocket is given as a function of
time in Table 1. Find the velocity at t=16 seconds using
the Lagrangian method for linear interpolation.
Table Velocity as a
function of time
t (s) v(t ) (m/s)
0 0
10 227.04
15 362.78
20 517.35
22.5 602.97
30 901.67
Linear Interpolation
550
517.35
1
v(t ) Li (t )v (ti ) 500
i 0
ys
L0 (t )v(t 0 ) L1 (t )v (t1 ) f ( range)
450
f x desired
2
10/14/2021
1 t tj t t0
L1 (t )
j 0 t1 t j t1 t 0
j 1
t t1 t t0 t 20 t 15
v (t ) v(t 0 ) v(t1 ) (362.78) (517.35)
t 0 t1 t1 t 0 15 20 20 15
16 20 16 15
v(16) (362.78) (517.35)
15 20 20 15
0.8(362.78) 0.2(517.35)
393.7 m/s.
Quadratic Interpolation
For the second order polynomial interpolation (also called quadratic interpolation), we
choose the velocity given by
2
v (t ) Li ( t ) v(t i )
i 0
L0 (t )v (t 0 ) L1 (t ) v( t1 ) L2 (t ) v( t 2 )
3
10/14/2021
Example
The upward velocity of a rocket is given as a function of
time in Table 1. Find the velocity at t=16 seconds using
the Lagrangian method for quadratic interpolation.
Table Velocity as a
function of time
t (s) v(t ) (m/s)
0 0
10 227.04
15 362.78
20 517.35
22.5 602.97
30 901.67
ys
400
f ( range)
2 t tj t t1 t t 2
L0 (t )
f x desired 350
j 0 t0 t j t 0 t 1 t 0 t 2
j 0
300
2 t t j t t0 t t 2
L1 (t )
j 0 t1 t j t1 t 0 t1 t2 250
j 1
t2 t j t 2 t 0 t 2 t 1
10 x s range x desired 20
j 0
j 2
10
4
10/14/2021
392.19 393.70
a 100
392.19
0.38410%
11
Cubic Interpolation
For the third order polynomial (also called cubic interpolation), we choose the velocity given by
3
v (t ) Li ( t ) v(t i )
i 0
600
ys 500
f ( range)
f x desired
400
300
227.04 200
10 12 14 16 18 20 22 24
10 x s range x desired 22.5
12
5
10/14/2021
Example
The upward velocity of a rocket is given as a function of
time in Table 1. Find the velocity at t=16 seconds using
the Lagrangian method for cubic interpolation.
Table Velocity as a
function of time
t (s) v(t ) (m/s)
0 0
10 227.04
15 362.78
20 517.35
22.5 602.97
30 901.67
700
3 t tj t t1 t t 2 t t 3 602.97
L0 (t ) ;
j 0 t0 t j t 0 t 1 t 0 t 2 t0 t 3 600
j 0
3 t t j t t0 t t 2 t t3
L1 (t )
ys
500
j 0 t1 t j t1 t 0 t1 t 2 t1 t 3 f ( range)
j 1
f x desired
400
3 ttj t t 0 t t1 t t 3
L2 (t ) ;
t2 t j t 2 t 0 t 2 t 1 t 2 t 3
300
j 0
j2
ttj t t 0 t t1 t t2
227.04 200
3
L3 ( t )
10 12 14 16 18 20 22 24
10 x s range x desired 22.5
j 0 t3 t j t3 t 0 t3 t1 t3 t2
j 3
14
6
10/14/2021
Comparison Table
Order of
1 2 3
Polynomial
v(t=16) m/s 393.69 392.19 392.06
Absolute Relative
-------- 0.38410% 0.033269%
Approximate Error
16
7
10/14/2021
s(16) s (11) v( t) dt
11
16
t2 t3 t4
[ 4.245t 21.265 0.13195 0.00544 ]16
11
2 3 4
1605 m
17
dt dt
29.665 m / s 2
18
8
10/14/2021
THANK YOU!