Download as pdf or txt
Download as pdf or txt
You are on page 1of 19

FET 222

PART A4 WORKED EXAMPLES

Example 1
The upward velocity of a rocket is given as a function of time in the table below

t(s) 0 10 15 20 22.5 30
v(t) m/s 0 227.04 362.78 517.35 602.97 901.27

Graph of velocity vs. time data for the rocket example.

Determine the value of the velocity at t  16 seconds using the direct method of interpolation and a
first order polynomial.

Solution
For first order polynomial interpolation (also called linear interpolation), the velocity given by
v  t   a0  a1t

Page 1 of 19
Since we want to find the velocity at t  16 and we are using a first order polynomial, we need to
choose the two data points that are closest to t  16 that also bracket t  16 to evaluate it. The two
points are t0  15 and . t1  20

Linear interpolation.

Then
t0  15 , v  t0   362.78

t1  20 , v  t1   517.25

gives
v 15  a0  a1 (15)  362.78

v  20   a0  a1 (20)  517.25

Writing the two equations in matrix form, we have

1 15   a0  362.78
1 20   a   517.35
  1  
Solving the above two equations gives
a0  100.93

a1  30.914
Hence
v  t   a0  a1t

 100.93  30.914t
At t  16
v 16   100.93  30.914x 16

=393.7 m/s

Page 2 of 19
Example 2
The upward velocity of a rocket is given as a function of time in the table below

t(s) 0 10 15 20 22.5 30
v(t) m/s 0 227.04 362.78 517.35 602.97 901.27

Determine the value of the velocity at t  16 seconds using the direct method of interpolation and a
second order polynomial.

Solution
For second order polynomial interpolation (also called quadratic interpolation), the velocity given by
v  t   a0  a1t  a2t 2

Quadratic interpolation

Since we want to find the velocity at t  16 and we are using a second order polynomial, we need to
choose the three data points that are closest to t  16 that also bracket t  16 to evaluate it. The
three points are t0  10 , t1  15 and . t2  20

Then
t0  10 , v  t0   227.04

t1  15 , v  t1   362.78

t2  20 , v  t2   517.25

gives

v 10   a0  a1 (10)  a2 10   227.04


2

v 15  a0  a1 (15)  a2 15  362.78


2

Page 3 of 19
v  20   a0  a1 (20)  a2  20   517.35
2

Writing the three equations in matrix form, we have

1 10 100   a0   227.04
1 15 225  a    362.78 
  1  
1 20 400   a2   517.35 

Solving the above two equations gives


a0  12.05

a1  17.733

a2  0.376
Hence
v  t   a0  a1t  a2t 2

 12.05  17.733t  0.3766t 2


At t  16

v 16   12.05  17.733 16   0.3766 16 


2

=392.19 m/s
Example 3
The upward velocity of a rocket is given as a function of time in the table below

t(s) 0 10 15 20 22.5 30
v(t) m/s 0 227.04 362.78 517.35 602.97 901.27

(a) Determine the value of the velocity at t = 16 seconds using the direct method of interpolation and
a third order polynomial.
(b) Using the third order polynomial interpolant for velocity from part (a), find the distance covered by
the rocket from t = 11s to t = 16s.
(c) Using the third order polynomial interpolant for velocity from part (a), find the acceleration of the
rocket at t = 16s

Solution
(a) For third order polynomial interpolation (also called cubic interpolation), we choose the velocity
given by
Page 4 of 19
v  t   a0  a1t  a2t 2  a3t 3

Cubic interpolation
Since we want to find the velocity at t  16 and we are using a third order polynomial, we need to
choose the four
data points closest to t  16 that also bracket t  16 to evaluate it. The four points are t0  10 ,

t1  15 , t2  20 and t3  22.5
Then
t0  10 , v  t0   227.04

t1  15 , v  t1   362.78

t2  20 , v  t2   517.25

t3  22.5 , v  t3   602.97

Gives

v 10  a0  a1 (10)  a2 10   a3 10   227.04


2 3

v 15  a0  a1 (15)  a2 15  a3 15  362.78


2 3

v  20  a0  a1 (20)  a2  20   a3  20   517.35


2 3

v  22.5  a0  a1 (22.5)  a2  22.5  a3  22.5  602.97


2 3

Writing the four equations in matrix form, we have


1 10 100 1000   a0   227.04 
1 15
 225 3375   a1   362.78 

1 20 400 8000   a2   517.35 
    
1 22.5 506.25 11391  a3  602.97 
Solving the above four equations gives
a0  4.2540

Page 5 of 19
a1  21.266

a2  0.13204

a3  0.0054347
Hence
v  t   a0  a1t  a2t 2  a3t 3

 4.2540  21.266t  0.13204t 2  0.0054347t 3


Therefore

v 16   4.2540  21.266 16   0.13204 16   0.0054347 16 


2 3

 392.06 m/s
(b) The distance covered by the rocket between t =11s and t = 16s can be calculated from the
interpolating polynomial by integrating it between these limits.
So
16
s 16   s 11   v  t dt
11

16
   4.2540  21.266t  0.13204t 2  0.0054347t 3 dt
11

16
 t2 t3 t4 
  4.2540t  21.266  0.13204  0.0054347 
 2 3 4 11

= 1605 m
(c )The acceleration at t = 16 is given by
d
a 16   v  t t 16
dt
Given that
v  t   4.2540  21.266t  0.13204t 2  0.0054347t 3

d
a t   v t 
dt
 21.266  0.26408t  0.016304t 2

a 16  21.266  0.26408 16   0.016304 16 


2

 29.665m / s 2

Page 6 of 19
Example 4

The upward velocity of a rocket is given as a function of time in the table below

t(s) 0 10 15 20 22.5 30
v(t) m/s 0 227.04 362.78 517.35 602.97 901.27

Determine the value of the velocity at t = 16 seconds using first order polynomial interpolation by
Newton’s divided difference polynomial method.

Solution
For linear interpolation, the velocity is given by
v  t   b0  b1  t  t0 

Since we want to find the velocity at t  16 , and we are using a first order polynomial, we need to
choose the two data points that are closest to t t  16 that also bracket t  16 to evaluate it. The two
points are t0  15 and t1  20

Then
t0  15 , v  t0   362.78

t1  20 , v  t1   517.25

gives
b0  v  t0 

 362.78

v  t1   v  t0 
b1 
t1  t0

517.35  362.78

20  15

 30.914
Hence
v  t   b0  b1  t  t0 

 362.78  30.914  t  15

Page 7 of 19
At t  16
v 16   362.78  30.914 16  15

 393.69 m/s
If we expand
v  t   362.78  30.914  t  15

we get
v  t   100.93  30.914t

and this is the same expression as obtained in the direct method.

Example 5

The upward velocity of a rocket is given as a function of time in the table below

t(s) 0 10 15 20 22.5 30
v(t) m/s 0 227.04 362.78 517.35 602.97 901.27

Determine the value of the velocity at t = 16 seconds using second order polynomial interpolation by
Newton’s divided difference polynomial method.

Solution
For second order (quadratic) polynomial interpolation, the velocity is given by
v  t   b0  b1  t  t0   b2  t  t0  t  t1 
Since we want to find the velocity at t  16 , and we are using a second order polynomial, we need to choose
the three data points that are closest to t  16 and also bracket t  16 to evaluate it. The three points are
t0  10 , t1  15 and t2  20
Then
t0  10 , v  t0   227.04

t1  15 , v  t1   362.78

t2  20 , v  t2   517.35

From these values


b0  v  t0 

 227.04

Page 8 of 19
v  t1   v  t0 
b1 
t1  t0

362.78  227.04

15  10

 27.148

v  t2   v  t1  v  t1   v  t0 

t2  t1 t1  t0
b2 
t 2  t0

517.35  362.78 362.78  227.04



 20  15 15  10
20  10

30.914  27.148

10

 0.37660

Hence
v  t   b0  b1  t  t0   b2  t  t0  t  t1 
 227.04  27.148  t  10   0.37660  t  10  t  15
At t  16
v 16   227.04  27.148 16  10   0.37660 16  10 16  15
 392.19 m/s

If we expand
v  t   227.04  27.148  t  10   0.37660  t  10  t  15

we get
v  t   12.05  17.733t  0.3766t 2

and this is the same expression as obtained in the direct method.

Example 6

Page 9 of 19
The upward velocity of a rocket is given as a function of time in the table below

t(s) 0 10 15 20 22.5 30
v(t) m/s 0 227.04 362.78 517.35 602.97 901.27

Determine the value of the velocity at t = 16 seconds with third order polynomial interpolation using
Newton’s divided difference polynomial method.

Solution
(a) For third order interpolation, the velocity is given by
v  t   b0  b1  t  t0   b2  t  t0  t  t1   b3 t  t0 t  t1 t  t2 
Since we want to find the velocity at t  16 , and we are using a third order polynomial, we need to choose the
three data points that are closest to t  16 and also bracket t  16 to evaluate it. The four points are t0  10 ,
t1  15 , t2  20 and t3  22.5
Then
t0  10 , v  t0   227.04

t1  15 , v  t1   362.78

t2  20 , v  t2   517.35

t3  22.5 , v  t3   602.97

gives

Page 10 of 19
Page 11 of 19
Hence
v  t   b0  b1  t  t0   b2  t  t0  t  t1   b3 t  t0 t  t1 t  t2 
 227.04  27.148  t  10   0.37660  t  10  t  15   5,5347x10-4  t 10  t 15  t  20 

At t  16

v 16   227.04  27.148 16  10   0.37660 16  10 16  15   5,5347x10-4  t  10  t  15 t  20 


 392.06 m/s

Example 7
Solve example 6 using divided difference table

Solution
First form the table. Enter the data given in columns 1 and 2 leaving empty rows for entering the
divided differences in subsequent columns.

ti v  ti  v t j , ti  v tk , t j , ti  v tl , tk , t j , ti 

v  t0  =
t0 =10 227.04

= b0

27.148 = b1

v  t1 
t1 =15 0.3766 0 = b2
=362.78

30.914 = x 0.0055347 = b3

v  t2 
t2 =20 o.4453 =z
=517.35
34248 =y

v  t3 
t3 =22.5
=602.97

Page 12 of 19
The other values in the table are obtained as indicated below:

v  t1   v  t0 
b1 
t1  t0

v  t2   v  t1 
x
t2  t1

v  t3   v  t 2 
y
t3  t2

x  b1
b2 
t 2  t0

yx
z
t3  t1

z  b2
b3 
t3  t 0

From the table

Example 8

Page 13 of 19
The upward velocity of a rocket is given as a function of time in the table below

t(s) 0 10 15 20 22.5 30
v(t) m/s 0 227.04 362.78 517.35 602.97 901.27

Determine the value of the value of v at t = 16 using a first order Lagrange polynomial method

Solution
Since we want to find the velocity at t  16 , and we are using a third order polynomial, we need to choose the
three data points that are closest to t  16 and also bracket t  16 to evaluate it. The two points are t0  15
and t1  20
For first order polynomial interpolation (also called linear interpolation), v(t) is given by

From the given data

Therefore

Hence

Page 14 of 19
Example 9

The upward velocity of a rocket is given as a function of time in the table below

t(s) 0 10 15 20 22.5 30
v(t) m/s 0 227.04 362.78 517.35 602.97 901.27

Determine the value of the value of v at t = 16 using a second order Lagrange polynomial
given the table

Solution
For second order polynomial interpolation (also called quadratic interpolation), v(t) is given by

From the given data

Therefore

Page 15 of 19
Hence

Page 16 of 19
Example 10
The upward velocity of a rocket is given as a function of time in the table below
t (s) 10 15 20 22.5
v(t) (m/s) 227.04 362.78 517.25 602.67

Determine the value of the velocity at t =16 seconds using third order Lagrangian polynomial
interpolation

Solution
For third order polynomial interpolation (also called cubic interpolation), the velocity is
given by

From the given table

Therefore

Page 17 of 19
Hence

Page 18 of 19
Page 19 of 19

You might also like