Direct Method
Direct Method
Evaluate
Differentiate, and
Integrate
Direct Method
Given ‘n+1’ data points (x0,y0), (x1,y1),………….. (xn,yn),
pass a polynomial of order ‘n’ through the data as given
below:
n
y = a0 + a1 x + .................... + an x .
where a0, a1,………………. an are real constants.
(x1 , y1 )
v(15) = a0 + a1 (15) = 362.78
v(20 ) = a0 + a1 (20 ) = 517.35 (x0 , y0 )
f1(x)
y
v(t ) = a0 + a1t + a2t 2
2 (x1 , y1 )
v(10) = a0 + a1 (10) + a2 (10) = 227.04 (x2 , y2 )
2
v(15) = a0 + a1 (15) + a2 (15) = 362.78
2
v(20) = a0 + a1 (20) + a2 (20) = 517.35 f 2 (x )
( x0 , y 0 )
x
500
2 450
= 392.19 m/s (
f x desired ) 350
300
250
227.04 200
10 12 14 16 18 20
10 x s , range, x desired 20
392.19 − 393.70
∈a = × 100
392.19
= 0.38410%
Example 3
The upward velocity of a rocket is given as a function of time in
Table 3.
Find the velocity at t=16 seconds using the direct method for
cubic interpolation.
(x3 , y3 )
(x1 , y1 )
v(t ) = a0 + a1t + a2t 2 + a3t 3
f 3 (x )
(x2 , y2 )
2 3
v(10) = 227.04 = a0 + a1 (10) + a2 (10) + a3 (10) (x0 , y0 )
x
2 3
v(15) = 362.78 = a0 + a1 (15) + a2 (15) + a3 (15)
Figure 7 Cubic interpolation.
2 3
v(20) = 517.35 = a0 + a1 (20) + a2 (20) + a3 (20)
2 3
v(22.5) = 602.97 = a0 + a1 (22.5) + a2 (22.5) + a3 (22.5)
602.97
700
The absolute percentage relative
600 approximate error ∈a between
ys
second and third order polynomial is
500
f ( range)
(
f x desired )
400
392.06 − 392.19
∈a = × 100
392.06
300
227.04 200
10
10
12 14 16 18
x s , range, x desired
20 22 24
22.5
= 0.033269 %
Comparison Table
Table 4 Comparison of different orders of the polynomial.
Order of
t(s) v (m/s) 1 2 3
Polynomial
0 0
v(t = 16) m/s 393.7 392.19 392.06
10 227.04
15 362.78 Absolute Relative
---------- 0.38410 % 0.033269 %
Approximate Error
20 517.35
22.5 602.97
30 901.67
between second and third order polynomial is
392.06 − 392.19
Distance from Velocity Profile
∈a =
392.06
× 100
= 0.033269%
c) The Find
distancethe covered
distancebycovered
the rocket
by between t =from
the rocket 11s and t = to
t=11s can be? calcul
16 st=16s
interpolating polynomial
v(t ) = −4.2540 + 21.266t + 0.13204t 2 + 0.0054347t 3 , 10 ≤ t ≤ 22.5
Note that the polynomial is valid between t = 10 and t = 22.5 and hence inclu
of integration of t =1611 and t = 16 .
So s (16 ) − s (11) = ∫ v(t )dt
11 16
∫
⎡= (−4.2540 + 21.t266t + 0.13204
t 3 t + 0.0054347
2 16 3
2
t 4 ⎤ t ) dt
4.2540t + 21.266 + 0.13204 + 0.0054347 ⎥
= ⎢− 11
⎣ 2 3 4 ⎦11 16
2 3 4
= 1605 t t t
= −m4.2540t + 21.266 + 0.13204 + 0.0054347
2 3 4 11
= 1605 m
d) The acceleration at t = 16 is given by
Acceleration from Velocity Profile
Find the acceleration of the rocket at t=16s given that