






















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!























1
0
0
1
1
n
2
Interpolants
Polynomials are the most common choicePolynomials are the most common choice
of interpolants because they are easy to:
Evaluate,
Differentiate and
3
Differentiate, and
Integrate
Direct Method of Interpolation
44
Linear Interpolation
v t a at 0 1 v t a at 0 1
15 15 362. 78 0 1
20 20 517. 35 0 1
a 10093 a 30914
x 0 (^) , y 0 f 1 x
x 1 , y 1
x
y
Figure 3 Linear interpolation
7
0 a 30. 914 1
a
v t 100. 93 30. 914 t , 15 t 20.
v 16 100. 93 30. 914 16 393. 7 m/s
Figure 3 Linear interpolation.
Quadratic Interpolation
y
2
10 10 10 227. 04
2 0 1 2
15 15 15 362. 78
2 0 1 2
20 20 20 517. 35
2 0 1 2
x 0 , y 0
x 1 , y 1 x 2 , y 2
f 2 x
x
8
a 17. 733
a 0. 3766
a
Figure 6 Quadratic interpolation.
Quadratic Interpolation (cont.)
517.35^550
(^20010 12 14 16 18 )
250
300
350
400
450
500
y s f range( ) f x desired
10 20
12. 05 17. 733 0. 3766 , 10 20
2
2
9
10 x s range x desired 20
a
a
Cubic Interpolation
y
3 3
2
3 3
2 v 10 227. 04 a 0 a 110 a 210 a 10
3 3
2 0 1 2 v 15 362. 78 a a 15 a 15 a 15
3 3
2 v 20 517. 35 a 0 a 120 a 220 a 20
x
f 3 x
x 3 , y 3
x 2 , y 2
x 1 , y 1
x 0 , y 0
Figure 7 Cubic interpolation
10
3 3
2 v 22. 5 602. 97 a 0 a 122. 5 a 222. 5 a 22. 5
0
1
Figure 7 Cubic interpolation.
Distance from Velocity Profile
4. 3810 21. 289 0. 13064 0. 0054606 , 10 22. 5
2 3
4. 2540 21. 266 0. 13204 0. 0054347
16
11
2 3
16
11
13
16
11
2 3 4
Acceleration from Velocity Profile
4. 2540 21. 266 0. 13204 0. 0054347 , 10 22. 5
2 3
2
2 3
14
2
2
2
Lagrange Method of Interpolation
15
Lagrangian interpolating polynomial is given by
n
Lagrangian Interpolation
n
i
f (^) n x Lix fxi 0
where ‘ n ’ in f (^) n ( x )stands for the
th n order polynomial that approximates the function y f ( x )
n
j i j
j i x x
x x L x 0
j i
j i j
Li ( x )is a weighting function that includes a product of ( n 1 )terms with terms of j i
omitted.
16
Linear Interpolation (cont.)
1
(^0 )
j (^) j
j
0 1
1
0
(^0 ) j
1
1
(^0 )
j
j (^) j
j
1 0
0
1 1 0
0 0 0 1
1
19
393. (^7) m/s.
Quadratic Interpolation
2
0
i
0 0 1 1 2 2
20
Quadratic Interpolation (cont.)
550 517 35
350
400
450
500
y (^) s
f range( )
f x (^) desired
0
0
1
1
2
0
(^0 )
0 ()
j
j (^) j
j
t t
t t L t
0 2
2
0 1
1
t t
t t
t t
t t
21
10 12 14 16 18 20
200
250
300
10 x (^) s rangex (^) desired 20
2
1
(^0 )
1 ()
j
j (^) j
j
t t
t t L t
1 2
2
1 0
0
t t
t t
t t
t t
2
2
(^0 )
2 ()
j
j (^) j
j
t t
t t L t
2 1
1
2 0
0
t t
t t
t t
t t
Quadratic Interpolation (cont.)
1 2 0 2 0 1
v t
2 2 0 2 1
1 1 0 1 2
0 0 1 0 2
22
a
a
Cubic Interpolation (cont.)
1 1 2 2
0 1 3
1 1 3
3
1 2
2
1 0
0 0 0 3
3
0 2
2
0 1
1
v t
t t t t t t vt
t t t t t t
vt t t
t t
t t
t t
t t
t t vt t t
t t
t t
t t
t t
t t vt
3 3 1 3 1 3 2
2 2 0 2 1 2 3
v
t t t t t t t t t t t t
25
a
Newton’s Divided Difference
Method of Interpolation
26
General Form
Given ( n 1 )data points, n n n n
0 0 1 1 1 1
0 1 0 0 1 1
n n n
0 0 0
1 0
1 0 1 1 0
27
2 0
1 0
1 0
2 1
2 1
2 0
2 1 1 0 2 2 1 0
General Form (cont.)
Given ( n 1 )data points, n n n n
0 0 1 1 1 1
0 1 0 0 1 1
n n n
0 0
1 1 0
st
2 2 1 0
nd
28
1 1 2 0
n n n
1 0
n n n
th
Example 3 (cont.)
0 1 0 2 0 1 3 0 1 2
t (^) 0 10 , v ( t 0 ) 227. 04
1 t ( ) 362. 78 1 vt
t (^) 2 20 , v ( t 2 ) 517. 35
31
t (^) 3 22. 5 , v ( t 3 ) 602. 97
Example 3 (cont.)
bb 00
t 0 (^) 10 227. 04 b 1
t 1 (^) 15 , 362. 78 0. 37660 b 3
3
t 2 (^) 20 , 517. 35 0. 44453
32
−
3 t 602. 97
Example 3 (cont.)
Hence
v ( t ) b 0 b 1 ( t t 0 ) b 2 ( t t 0 )( t t 1 ) b 3 ( t t 0 )( t t 1 )( t t 2 )
3
t t t
t t t
At t 16 ,
3
v
33
392. 06 m/s
Matlab Worksheet: Cubic Interpolation
34
0 8
-0.
0
-1 -0.5 0 0.5 1
y
37
-0.
x
19th Order Polynomial f (x) 5th Order Polynomial
forming the consecutive data through straight lines. So if the above data is given in an ascending
Figure : Linear splines
38
Linear Splines (cont.)
1 0
1 0 0 x x x x
f x f x f x f x
x 0 (^) x x 1
f x 2 f x 1 f
2 1
2 1 1 x x x x
f f f x
x 1 (^) x x 2
1 1
1 1
n n n
n n n x x x x
f x f x f x n n x x x 1
39
1
i i
i i
x x
f x fx
Example 4
The upward velocity of a rocket is given as a function of
time. Find the velocity at t=16 seconds using linear
splinessplines.
Table Velocity as a
function of time
40
Figure. Velocity vs. time data
for the rocket example