0% found this document useful (0 votes)
6 views66 pages

Numeric PPT (Chapter 5)

Uploaded by

sikaryoseph
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views66 pages

Numeric PPT (Chapter 5)

Uploaded by

sikaryoseph
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 66

CHAPTER 5

INTERPOLATIONS

By: Habtamu Garoma (PHD) December 22, 2024


Interpolation
2
Suppose the following table represents a set of corresponding values of x

and y .

x: x0 x1 x2 x3 .... xn
y: y0 y1 y2 y3 .... yn

Now we require the value of y  y i corresponding to the value x  xi where

x0  xi  x n the method here what we employ uses what is known as

interpolation.

Extrapolation is used to denote the process of finding the values outside

the interval ( x0 , x n ) .
By: Habtamu Garoma (PHD) December 22, 2024
Cont’d
3
Let y  f (x) be the function taking the values y 0 , y1 , y 2 , y3 ,..., y n corresponding

to x0 , x1 , x2 , x3 ,..., xn . In other words, yi  f ( xi ) , i  0,1,2,...,n .

If f (x) is known, the value of y can be calculated for any x . But in many

practical cases we have to find y  f (x) such that yi  f ( xi ) , from the given

data. This is not an easy task because there are infinitely many functions

y   x  such that yi    xi .

For many reasons in the coming discussions we use the approximation

by polynomial functions. Actually there are several functions to approximate

the given set of data points, for instance trigonometric, exponential, etc.

functions.

By: Habtamu Garoma (PHD) December 22, 2024


4

Direct Method of Interpolation

By: Habtamu Garoma (PHD) December 22, 2024


What is Interpolation ?
5

Given (x0,y0), (x1,y1), …… (xn,yn), find the value of ‘y’ at a value


of ‘x’ that is not given.

Figure 1 Interpolation of discrete.


By: Habtamu Garoma (PHD) December 22, 2024
Interplants
6

Polynomials are the most common


choice of interpolants because they
are easy to:
Evaluate
Differentiate, and
Integrate

By: Habtamu Garoma (PHD) December 22, 2024


Direct Method
7

Given ‘n+1’ data points (x0,y0), (x1,y1),………….. (xn,yn),


pass a polynomial of order ‘n’ through the data as given
below:

y  a0  a1 x  .................... an x .n

where a0, a1,………………. an are real constants.


 Set up ‘n+1’ equations to find ‘n+1’ constants.
 To find the value ‘y’ at a given value of ‘x’, simply
substitute the value of ‘x’ in the above polynomial.

By: Habtamu Garoma (PHD) December 22, 2024


Example 1
8

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.
Table 1 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 Figure 2 Velocity vs. time data for the
rocket example
By: Habtamu Garoma (PHD) December 22, 2024
Linear Interpolation
9

y
vt   a0  a1t
x1, y1 
v15  a0  a1 15  362.78
v20  a0  a1 20  517.35 x0 , y0 
f1 x 

Solving the above two equations gives,


x
a0  100.93 a1  30.914 Figure 3: Linear interpolation.

Hence
vt   100.93  30.914t , 15  t  20.
v16  100.93  30.91416  393.7 m/s
By: Habtamu Garoma (PHD) December 22, 2024
Example 2
10
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.
Table 2 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 Figure 5 Velocity vs. time data for the
rocket example
By: Habtamu Garoma (PHD) December 22, 2024
Quadratic Interpolation
y

vt   a0  a1t  a2t 2 x1 , y1 


v10  a0  a1 10  a2 10  227.04
2 x2 , y2 

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


2

f 2 x 
v20  a0  a1 20  a2 20  517.35
2
 x0 , y 0 
x

Figure 6 Quadratic interpolation.

Solving the above three equations gives


a0  12.05 a1  17.733 a2  0.3766
By: Habtamu Garoma (PHD) 11 December 22, 2024
Quadratic Interpolation (cont.)
12

550
517.35

vt   12.05  17.733t  0.3766t , 10  t  20


500
2
450

ys

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


400
2 f ( range)


f x d es ired 350

 392.19 m/s 300

250

227.04 200
10 12 14 16 18 20
10 x s  range x d es ired 20

The absolute relative approximate error a obtained between


the results from the first and second order polynomial is
392.19  393.70
a  100
392.19
 0.38410%
By: Habtamu Garoma (PHD) December 22, 2024
Example 3
13
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.
Table 3 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 Figure 6 Velocity vs. time data for the
rocket example
By: Habtamu Garoma (PHD) December 22, 2024
Cubic Interpolation
14

x3 , y3 
vt   a0  a1t  a2t  a3t
2 3

x1 , y1 
v10  227.04  a0  a1 10  a2 10  a3 10
2 3

f 3 x 
x2 , y2 
v15  362.78  a0  a1 15  a2 15  a3 15
2 3
x0 , y0 

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


2 3 x

Figure 7 Cubic interpolation.


v22.5  602.97  a0  a1 22.5  a2 22.5  a3 22.5
2 3

a0  4.2540 a1  21.266 a2  0.13204 a3  0.0054347

By: Habtamu Garoma (PHD) December 22, 2024


Cubic Interpolation (contd)
15

vt   4.2540  21.266t  0.13204t 2  0.0054347t 3 , 10  t  22.5


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

 392.06 m/s
700

The absolute percentage relative


602.97

approximate error a between


600

ys 500 second and third order polynomial is


f ( range)


f x d es ired

392.06  392.19
400

300
a  100
392.06
227.04 200
10
10
12 14 16 18
x s  range x d es ired
20 22 24
22.5
 0.033269%

By: Habtamu Garoma (PHD) December 22, 2024


Comparison Table
16

Table 4 Comparison of different orders of the polynomial.

Order of
1 2 3
Polynomial
vt  16 m/s 393.7 392.19 392.06
Absolute Relative
---------- 0.38410 % 0.033269 %
Approximate Error

By: Habtamu Garoma (PHD) December 22, 2024


Distance from Velocity Profile
17

Find the distance covered by the rocket from t=11s to t=16s ?


vt   4.3810  21.289t  0.13064t 2  0.0054606t 3 , 10  t  22.5
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

By: Habtamu Garoma (PHD) December 22, 2024


Acceleration from Velocity Profile
18

Find the acceleration of the rocket at t=16s given that


 t   4.2540  21.266t  0.13204 2  0.0054347t 3 ,10  t  22.5

at   vt 
d
dt

d
dt

 4.2540  21.266t  0.13204t 2  0.0054347t 3 
 21.289  0.26130t  0.016382t 2 , 10  t  22.5

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


2

 29.665 m/s 2

By: Habtamu Garoma (PHD) December 22, 2024


19

Lagrange Method of
Interpolation

By: Habtamu Garoma (PHD) December 22, 2024


What is Interpolation ?
20

Given (x0,y0), (x1,y1), …… (xn,yn), find the


value of ‘y’ at a value of ‘x’ that is not given.

By: Habtamu Garoma (PHD) December 22, 2024


Interplants
21

Polynomials are the most common


choice of interpolants because they
are easy to:

Evaluate
Differentiate, and
Integrate.
By: Habtamu Garoma (PHD) December 22, 2024
Lagrangian Interpolation
22

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)

given at (n  1) data points as x0 , y 0 , x1 , y1 ,......, xn 1 , y n1 , xn , y n  , and
n x  xj
Li ( x)  
j 0 xi  x j
j i

Li (x) is a weighting function that includes a product of (n  1) terms with terms of j  i


omitted.
By: Habtamu Garoma (PHD) December 22, 2024
Example
23

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

Figure. Velocity vs. time data


By: Habtamu Garoma (PHD)
for the rocket example December 22, 2024
Linear Interpolation
24

550
517.35

1
v(t )   Li (t )v(ti ) 500
i 0

 L0 (t )v (t 0 )  L1 (t )v (t1 ) ys

f ( range)
450

f x desired 
t 0  15, t 0   362.78
400

t1  20, t1   517.35


362.78 350
10 12 14 16 18 20 22 24
x s 10 x s  range x desired x s  10
0 1

By: Habtamu Garoma (PHD) December 22, 2024


Linear Interpolation (contd)
25

1 t tj t  t1
L0 (t )   
j 0 t0  t j t 0  t1
j 0

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.

By: Habtamu Garoma (PHD) December 22, 2024


Quadratic Interpolation
26

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 (t0 )  L1 (t) v( t1 )  L2 (t) v( t2 )

By: Habtamu Garoma (PHD) December 22, 2024


Example
27

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

Figure. Velocity vs. time data


By: Habtamu Garoma (PHD)
for the rocket example December 22, 2024
Quadratic Interpolation (contd)

t 0  10, v(t 0 )  227.04


550
517.35

t1  15, v(t1 )  362.78


500

t 2  20, v(t 2 )  517.35 450

ys
400
f ( range)
2 t tj  t  t1  t  t 2 
L0 (t )       
f x d es ired 350
j 0 t0  t j t 
 0 1  0 2 
t t  t
j 0
300
2 t t j  t  t0  t  t 2 
L1 (t )      
j 0 t1  t j  t1  t 0  t1  t 2  250
j 1

2 t tj  t  t 0  t  t1  227.04 200


L2 (t )       10 12 14 16 18 20

j 0 t2  t j 
 2 0  2 1 
t t t  t 10 x s  range x d es ired 20
j 2

By: Habtamu Garoma (PHD) 28 December 22, 2024


Quadratic Interpolation (contd)
29

 t  t1  t  t2   t  t0  t  t2   t  t0  t  t1 
vt     vt0     vt1     vt2 
 t0  t1  t0  t2   t1  t0  t1  t2   t2  t0  t2  t1 
 16  15  16  20   16  10  16  20   16  10  16  15 
v16    227 .04      362 .78     517.35
 10  15  10  20   15  10  15  20   20  10  20  15 
  0.08227.04  0.96362.78  0.12527.35
 392.19 m/s
The absolute relative approximate error a obtained between the
results from the first and second order polynomial is

392.19  393.70
a  100
392.19
 0.38410%
By: Habtamu Garoma (PHD) December 22, 2024
Cubic Interpolation
30

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

 L0 (t) v( t0 )  L1 ( t) v(t1 )  L2 ( t) v(t 2 )  L3 ( t) v(t 3 )


700
6 0 2. 9 7

600

y s 500

f ( r an ge)


f x d es ired 
400

300

2 2 7. 0 4 200
10 12 14 16 18 20 22 24
10 x s  r an ge x d es ired 2 2 .5

By: Habtamu Garoma (PHD) December 22, 2024


Example
31

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

Figure. Velocity vs. time data


By: Habtamu Garoma (PHD)
for the rocket example December 22, 2024
Cubic Interpolation (contd)
32

t o  10, v t o   227.04 t1  15, v t1   362.78

t 2  20, v t 2   517.35 t 3  22.5, v t 3   602.97

3 t tj  t  t 1  t  t 2  t  t 3 
L0 (t )        ;
j 0 t0  t j  t 0  t 1  t 0  t 2  t 0  t 3  602.97
700
j 0

3 t t j  t  t0  t  t 2  t  t 3 
L1 (t )        600
j 0 t1  t j  t1  t 0  t1  t 2  t1  t 3 
j 1

3 t tj  t  t 0  t  t1  t  t 3  ys 500
L2 (t )        ;
t2  t j  2 0  2 1  t 2  t 3
  f ( range)
j 0 t t t t 
j 2 
f x d es ired
400
3 t tj  t  t 0  t  t1  t  t 2 
L3 ( t )       
j 0 t3  t j  t3  t 0  t 3  t1  t3  t 2  300
j 3

227.04 200
10 12 14 16 18 20 22 24
10 x s  range x d es ired 22.5

By: Habtamu Garoma (PHD) December 22, 2024


Cubic Interpolation (contd)
33

 t  t1  t  t 2  t  t3   t  t0  t  t 2  t  t3 
vt      vt1      vt 2 
 t 
 0 1  0 2  0 3 
t t t t  t t 
 1 0  1 2  1 3 
t t  t t  t
 t  t0  t  t1  t  t3   t  t1  t  t1  t  t 2 
    vt 2      vt3 
 t 
 2 0  2 1  2 3 
t t t t  t t 
 3 1  3 1  3 2 
t t  t t  t
 16  15  16  20  16  22.5   16  10  16  20  16  22.5 
v16      227.04      362.78
 10  15  10  20  10  22.5   15  10  15  20  15  22.5 
 16  10  16  15  16  22.5   16  10  16  15  16  20 
   517.35     602.97 
 20  10  20  15  20  22 .5   22 .5  10  22 .5  15  22 .5  20 
  0.0416 227.04   0.832 362.78  0.312 517.35   0.1024 602.97 
 392.06 m/s
The absolute relative approximate error a obtained between the
results from the first and second order polynomial is
392.06  392.19
a  100
392.06
 0.033269%
By: Habtamu Garoma (PHD) December 22, 2024
Comparison Table
34

Order of Polynomial 1 2 3

v(t=16) m/s 393.69 392.19 392.06

Absolute Relative
-------- 0.38410% 0.033269%
Approximate Error

By: Habtamu Garoma (PHD) December 22, 2024


Distance from Velocity Profile
35

Find the distance covered by the rocket from t=11s to


t=16s ?
v(t )  (t 3  57.5t 2  1087.5t  6750)(0.36326)  (t 3  52.5t 2  875t  4500)(1.9348)
 (t 3  47.5t 2  712.5t  3375)(4.1388)  (t 3  45t 2  650t  3000)(2.5727)
v (t )  4.245  21.265t  0.13195t 2  0.00544t 3 , 10  t  22.5
16
s(16)  s (11)   v( t ) dt
11

16
  ( 4.245  21.265t  0.13195t 2  0.00544t 3 ) dt
11

t2 t3 t 4 16
 [ 4.245t  21.265  0.13195  0.00544 ]11
2 3 4
By: Habtamu Garoma (PHD)  1605 m December 22, 2024
Acceleration from Velocity Profile
36

Find the acceleration of the rocket at t=16s given that

v(t )  4.245  21.265t  0.13195t 2  0.00544t 3 , 10  t  22.5

a t   v t    4.245  21.265t  0.13195t  0.00544t 3 


d d 2 ,

dt dt

 21.265  0.26390t  0.01632t 2


a (16)  21. 265  0.26390(16)  0.01632(16) 2

 29.665 m / s 2

By: Habtamu Garoma (PHD) December 22, 2024


37

Newton’s Divided
Difference Method of
Interpolation

By: Habtamu Garoma (PHD) December 22, 2024


What is Interpolation ?
38

Given (x0,y0), (x1,y1), …… (xn,yn), find the


value of ‘y’ at a value of ‘x’ that is not given.

By: Habtamu Garoma (PHD) December 22, 2024


Interplants
39

Polynomials are the most common


choice of interplants because they are
easy to:

Evaluate
Differentiate, and
Integrate.

By: Habtamu Garoma (PHD) December 22, 2024


Newton’s Divided Difference Method
40

Linear interpolation: Given ( x0 , y 0 ), ( x1 , y1 ), pass a linear


interpolant through the data
f1 ( x)  b0  b1 ( x  x0 )

where
b0  f ( x0 )
f ( x1 )  f ( x 0 )
b1 
x1  x 0

By: Habtamu Garoma (PHD) December 22, 2024


Example 1
41

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 Newton Divided Difference 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
Figure. Velocity vs. time data
By: Habtamu Garoma (PHD)
for the rocket example December 22, 2024
Linear Interpolation
42

v(t )  b0  b1 (t  t 0 ) 517.35
550

t 0  15, v(t 0 )  362.78 500

t1  20, v(t1 )  517.35 ys

b0  v(t 0 )  362.78
f ( range)
450

f x desired 
v(t1 )  v(t 0 )
b1   30.914
t1  t 0 400

362.78 350
10 12 14 16 18 20 22 24
x s 10 x s  range x desired x s  10
0 1

By: Habtamu Garoma (PHD) December 22, 2024


Linear Interpolation (contd)
43
550
5 1 7. 3 5

500

y s

f ( r an ge)
450

f x d es ired 

400

3 6 2. 7 8 350
10 12 14 16 18 20 22 24
x s 1 0 x s  r an ge x d es ired x s  10
0 1

v(t )  b0  b1 (t  t 0 )
 362.78  30.914(t  15), 15  t  20
At t  16
v(16)  362.78  30.914(16  15)
By: Habtamu Garoma (PHD)  393.69 m/s December 22, 2024
Quadratic Interpolation
44

Given ( x0 , y 0 ), ( x1 , y1 ), and ( x2 , y2 ), fit a quadratic interpolant through the data.

f 2 ( x)  b0  b1 ( x  x0 )  b2 ( x  x0 )( x  x1 )
b0  f ( x0 )

f ( x1 )  f ( x0 )
b1 
x1  x0

f ( x 2 )  f ( x1 ) f ( x1 )  f ( x0 )

x 2  x1 x1  x0
b2 
x 2  x0

By: Habtamu Garoma (PHD) December 22, 2024


Example 2
45

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 Newton Divided Difference 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
Figure. Velocity vs. time data
By: Habtamu Garoma (PHD)
for the rocket example December 22, 2024
Quadratic Interpolation (contd)
550
5 1 7. 3 5

500

450

y s
400
f ( r an ge)


f x d es ired  350

300

250

2 2 7. 0 4 200
10 12 14 16 18 20
10 x s  r an ge x d es ired 20

t 0  10, v(t 0 )  227.04


t1  15, v(t1 )  362.78
t 2  20, v(t 2 )  517.35

By: Habtamu Garoma (PHD) 46 December 22, 2024


Quadratic Interpolation (contd)
47

b0  v(t 0 )
 227.04
v(t )  v(t 0 ) 362.78  227.04
b1  1 
t1  t 0 15  10
 27.148

v(t 2 )  v(t1 ) v(t1 )  v(t 0 ) 517.35  362.78 362.78  227.04


 
t 2  t1 t1  t 0 20  15 15  10
b2  
t 2  t0 20  10
30.914  27.148

10
 0.37660
By: Habtamu Garoma (PHD) December 22, 2024
Quadratic Interpolation (contd)
48

v(t )  b0  b1 (t  t 0 )  b2 (t  t 0 )(t  t1 )
 227.04  27.148(t  10)  0.37660(t  10)(t  15), 10  t  20
At t  16,
v(16)  227.04  27.148(16  10)  0.37660(16  10)(16  15)  392.19 m/s

The absolute relative approximate errora obtained between the results from the first
order and second order polynomial is

a
392.19  393.69
 x100
392.19

= 0.38502 %
By: Habtamu Garoma (PHD) December 22, 2024
General Form
49

f 2 ( x)  b0  b1 ( x  x0 )  b2 ( x  x0 )( x  x1 )

where
b0  f [ x0 ]  f ( x0 )
f ( x1 )  f ( x 0 )
b1  f [ x1 , x0 ] 
x1  x0
f ( x 2 )  f ( x1 ) f ( x1 )  f ( x0 )

f [ x 2 , x1 ]  f [ x1 , x0 ] x 2  x1 x1  x0
b2  f [ x 2 , x1 , x0 ]  
x 2  x0 x 2  x0
Rewriting
f 2 ( x)  f [ x0 ]  f [ x1 , x0 ]( x  x0 )  f [ x2 , x1 , x0 ]( x  x0 )( x  x1 )
By: Habtamu Garoma (PHD) December 22, 2024
General Form
50

Given (n  1) data points, x0 , y0 , x1 , y1 ,......,xn1 , y n1 , xn , y n  as


f n ( x)  b0  b1 ( x  x0 )  ....  bn ( x  x0 )( x  x1 )...(x  xn1 )
where
b0  f [ x0 ]
b1  f [ x1 , x0 ]
b2  f [ x2 , x1 , x0 ]

bn 1  f [ x n 1 , x n 2 ,....,x0 ]
bn  f [ xn , xn1 ,....,x0 ]
By: Habtamu Garoma (PHD) December 22, 2024
General form
51

The third order polynomial, given ( x0 , y 0 ), ( x1 , y1 ), ( x2 , y2 ), and ( x3 , y3 ), is

f 3 ( x)  f [ x0 ]  f [ x1 , x0 ]( x  x0 )  f [ x 2 , x1 , x0 ]( x  x0 )( x  x1 )
 f [ x3 , x 2 , x1 , x0 ]( x  x0 )( x  x1 )( x  x 2 )

b0
x0 f ( x0 ) b1
f [ x1 , x0 ] b2
x1 f ( x1 ) f [ x 2 , x1 , x0 ] b3
f [ x 2 , x1 ] f [ x3 , x 2 , x1 , x0 ]
x2 f ( x2 ) f [ x3 , x 2 , x1 ]
f [ x3 , x 2 ]
x3 f ( x3 )

By: Habtamu Garoma (PHD) December 22, 2024


Example 3
52

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 Newton Divided Difference
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
Figure. Velocity vs. time data
By: Habtamu Garoma (PHD)
for the rocket example December 22, 2024
Cont’d
53

The velocity profile is chosen as


v(t )  b0  b1 (t  t 0 )  b2 (t  t 0 )(t  t1 )  b3 (t  t 0 )(t  t1 )(t  t 2 )
we need to choose four data points that are closest to t  16
t0  10, v(t 0 )  227.04
t1  15, v(t1 )  362.78
t 2  20, v(t 2 )  517.35
t 3  22.5, v(t 3 )  602.97

The values of the constants are found as:


b0 = 227.04; b1 = 27.148; b2 = 0.37660; b3 = 5.4347×10−3
By: Habtamu Garoma (PHD) December 22, 2024
Cont’d
54

b0
t0  10 227.04 b1
27.148 b2
t1  15, 362.78 0.37660 b3
30.914 5.4347 103
t2  20, 517.35 0.44453
34.248
t3  22.5, 602.97

b0 = 227.04; b1 = 27.148; b2 = 0.37660; b3 = 5.4347×10−3


By: Habtamu Garoma (PHD) December 22, 2024
Cont’d
55

Hence
v (t )  b0  b1 (t  t 0 )  b2 (t  t0 )( t  t1 )  b3 (t  t 0 )( t  t1 )(t  t 2 )
 227.04  27.148( t  10)  0.37660(t  10)(t  15)
 5.4347 * 10 3 (t  10)( t  15)( t  20)
At t  16,
v (16)  227.04  27.148(16  10)  0.37660(16  10)(16  15)
 5.4347 * 10 3 (16  10)(16  15)(16  20)
 392.06 m/s

The absolute relative approximate error a obtained is


392 .06  392 .19
a  x100
392 .06

= 0.033427 %
By: Habtamu Garoma (PHD) December 22, 2024
Comparison Table
56

Order of 1 2 3
Polynomial
v(t=16) 393.69 392.19 392.06
m/s
Absolute Relative ---------- 0.38502 % 0.033427 %
Approximate Error

By: Habtamu Garoma (PHD) December 22, 2024


Example 4
57

1. Using Newton’s divided difference formula, find the values of f (2) , f (8)

and f (15) given the following

x: 4 5 7 10 11 13

f (x) : 48 100 294 900 1210 2028

By: Habtamu Garoma (PHD) December 22, 2024


Solution
58

x f (x) f x 2 f x  3 f x  4 f x 

4 48
52
15
5 100
97 1
7 294 21
202 0
1
10 900 27
310 0
33 1
11 1210
409
13 2028

By: Habtamu Garoma (PHD) December 22, 2024


Cont’d
59

By Newton’s divided difference interpolation formula

f ( x)  f x0   x  x0  f x0  x1   x  x0 x  x1  f x0 , x1 , x2   ... 

x  x0 x  x1 x  x2 ...x  xn  f x0 , x1 , x2 ,...,xn1   ...

f x  48  x  452  x  4x  515  x  4x  5x  71

 48  52x  208  15x2  135x  300  x3  16x2  83x  140

 x3  x 2 and so f (2)  4 , f 8  648  1  448 and f 15  3150

By: Habtamu Garoma (PHD) December 22, 2024


Example 5
60

1. From the following table find f (x) and hence f (12) using Newton’s

interpolation formula.

x: 1 2 7 8

f (x) : 1 5 5 4

By: Habtamu Garoma (PHD) December 22, 2024


Solution
61

x f (x) f x  2 f x  3 f x  4 f x 

1 1
4 4
2 5 
6 1
0
7 5 1 14

-1 6
8 4

f x   f x0   x  x0  f x0 , x1   x  x0 x  x1  f x0 , x1 , x2   x  x0 x  x1 x  x2  f x0 , x1 , x2 , x3 

 1  x  14  x  1x  2  2  3  x  1x  2x  7 141 



1
42

3x 3  58 x 2  321x  224 
 f 12  10.95238095

By: Habtamu Garoma (PHD) December 22, 2024


Example 6
62

1. Find the function f from the following table and find f(3)

x: 0 1 2 4 5 7

f (x) : 0 0 -12 0 600 7308

By: Habtamu Garoma (PHD) December 22, 2024


Solution
63

Since f (0)  0, f (1)  0 and f (4)  0 we have xx  1x  4 is a factor of f (x) .

So let f x   xx  1x  4 x 

f x 
  x  
xx  1x  4

 12
Now  2  3
22  12  4

f 5 600 f 7 
 5    30 and  7    58
541 20 763

By: Habtamu Garoma (PHD) December 22, 2024


Cont’d
64

Now we find  x  using divided difference formula

x  x  f x  2 f x 

2 3
9
5 30 1
14
7 58

  x    2  x  29  x  2x  5

= 3  9 x  18  x 2  7 x  10 = x 2  2 x  5

Hence, f x   xx  1x  4( x 2  2 x  5)

By: Habtamu Garoma (PHD) December 22, 2024


Distance from Velocity Profile
65

Find the distance covered by the rocket from t=11s to


t=16s ?
v (t )  227.04  27.148(t  10)  0.37660( t  10)( t  15)
10  t  22.5
 5.4347 * 10 (t  10)( t  15)( t  20)
3

 4.2541  21.265t  0.13204t 2  0.0054347t 3 10  t  22.5


So
16
s16  s11   v t dt
11

16
  (  4.2541  21.265t  0.13204t  0.0054347t 3 ) dt
2

11

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

By: Habtamu Garoma (PHD)


 1605 m December 22, 2024
Acceleration from Velocity Profile
66

Find the acceleration of the rocket at t=16s given that

v(t )  4.2541  21.265t  0.13204t 2  0.0054347t 3

v(t )   4.2541  21.265t  0.13204t 2  0.0054347t 3 


d d
a(t ) 
dt dt

 21.265  0.26408t  0.016304t 2


a(16)  21.265  0.26408(16)  0.016304(16) 2

 29.664 m / s 2

By: Habtamu Garoma (PHD) December 22, 2024

You might also like