Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
What is Interpolation?
Given(𝑥0 , 𝑦0 ), (𝑥1 , 𝑦1 ), …… (𝑥𝑛 , 𝑦𝑛 ),find the value of ‘y’ at a value of ‘x’ that is not given.
Direct Method
Given ‘n+1’ data points (𝑥0, 𝑦0 ),(𝑥1 , 𝑦1 ),………….. (𝑥𝑛 , 𝑦𝑛 ), pass a polynomial of order ‘n’
through the data as given below:
y a0 a1 x .................... an x n .
Linear Interpolation
y
x1 , y1
x0 , y0
f1 x
Example 1
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 direct method for linear interpolation.
t , s vt , m/s
Table 1 Velocity as a function of time. Figure 2 Velocity vs. time data for the rocket example
Given:
n=1
n+1=2pts.
t=15; v=362.78
t=20; v=517.35
Solution
362.78 = 𝑎0 + 𝑎1 (15) 𝑒𝑞𝑢𝑎𝑡𝑖𝑜𝑛 1.
517.35 = 𝑎0 + 𝑎1 (20) 𝑒𝑞𝑢𝑎𝑡𝑖𝑜𝑛 2.
𝑎0 = −100.93
𝑎1 = 30.914
𝑣(𝑡) = −100.93 + 30.914𝑡
𝑣(16) = −100.93 + 30.914(16)
𝒗(𝟏𝟔) = 𝟑𝟗𝟑. 𝟔𝟗𝟒 𝒎⁄𝒔
Quadratic Interpolation
𝒗(𝒕) = 𝒂𝟎 + 𝒂𝟏 𝒕 + 𝒂𝟐 𝒕𝟐
Example 2
The upward velocity of a rocket is given as a function of time in Table 2. Find the velocity at
t=16 seconds using the direct method for quadratic interpolation.
t , s vt , m/s
Table 2 Velocity as a function of time. Figure 5 Velocity vs. time data for the rocket example.
Given:
n=2
n+1=3pts.
t=15; v=362.78
t=20; v=517.35
t=10; v=227.04
Solution
362.78 = 𝑎0 + 𝑎1 (15) + 𝑎2 (225) 𝑒𝑞𝑢𝑎𝑡𝑖𝑜𝑛 1
517.35 = 𝑎0 + 𝑎1 (20) + 𝑎2 (400) 𝑒𝑞𝑢𝑎𝑡𝑖𝑜𝑛 2
227.04 = 𝑎0 + 𝑎1 (10) + 𝑎2 (100) 𝑒𝑞𝑢𝑎𝑡𝑖𝑜𝑛 3
𝑎0 = 12.05
𝑎1 = 17.733
𝑎2 = 0.3766
𝑣(𝑡) = 12.05 + 17.733𝑡 + 0.3766𝑡 2
𝑣(16) = 12.05 + 17.733(16) + 0.3766(16)2
𝒗(𝟏𝟔) = 𝟑𝟗𝟐. 𝟏𝟖𝟕𝟔 𝒎⁄𝒔
550
517.35
500
450
ys
400
f ( range)
f x desired 350
300
250
227.04 200
10 12 14 16 18 20
10 x s range x desired 20
The absolute relative approximate error obtained between the results from the first and second
order polynomial is
392.19 393.70
a 100
392.19
0.38410%
Comparison Table
Table 4 Comparison of different orders of the polynomial.
Order of
1 2 3
Polynomial
vt 16 m/s 393.7 392.19 392.06
Absolute Relative
---------- 0.38410 % 0.033269 %
Approximate Error
∫ 𝑑𝑣 = 𝑎𝑑𝑡
∫ 𝑣𝑑𝑡 = 𝑥
Solution
Req’d: x=1 from t=11s to t=16s
16
𝑥 = ∫ 𝑣(𝑡)𝑑𝑡
11
16
∫ (−4.2540 + 21.266𝑡 + 𝑜. 13204𝑡 2 + 0.0054347𝑡 3 )𝑑𝑡
11
𝑡2 𝑡3 𝑡 4 16
[−4.2540𝑡 + 21.266 + 0.13204 + 0.00554347 ]11
2 3 4
𝒙 = 𝟏𝟔𝟎𝟒. 𝟗𝟖𝟖𝒎
Acceleration from Velocity Profile
Example 4
Find the acceleration of the rocket at t=16s given that