5.02 Direct Method of Interpolation
5.02 Direct Method of Interpolation
Direct Method
The direct method (also called the Vandermonde polynomial method) of interpolation is based on the following premise. Given
n + 1 data points, fit a polynomial of order n as given below
n
y = a0 + a1 x + … … … … … + an x (5.2.1.1)
through the data, where a , a , … … … , a are n + 1 real constants. Since n + 1 values of y are given at n + 1 values of x,
0 1 n
one can write n + 1 equations. Then the n + 1 constants, a , a , … … … , a can be found by solving the n + 1 simultaneous
0 1 n
linear equations. To find the value of y at a given value of x, simply substitute the value of x in Equation (5.2.1.1).
But, it is not necessary to use all the data points. How does one then choose the order of the polynomial and what data points to
use? This concept of choosing points and the direct method of interpolation are best illustrated using examples.
Example 5.2.1.1
0 0
10 227.04
15 362.78
20 517.35
22.5 602.97
30 901.67
5.02.1 https://math.libretexts.org/@go/page/126410
Figure 5.2.1.1 . Graph of velocity vs. time data for the rocket example.
Estimate the velocity at t = 16 seconds using the direct method of interpolation with a first-order polynomial.
Solution
For first-order polynomial interpolation (also called linear interpolation), the velocity given by
v (t) = a0 + a1 t (5.2.1.E1.1)
Then
t0 = 15, v (t0 ) = 362.78
5.02.2 https://math.libretexts.org/@go/page/126410
Equation (5.2.1.E1.1)gives
v (15) = a0 + a1 (15) = 362.78
1 15 a0 362.78
[ ][ ] =[ ]
1 20 a1 517.35
a1 = 30.914
= −100.93 + 30.914t, 15 ≤ t ≤ 20
At t = 16 ,
= 393.70 m/s
Example 5.2.1.2
0 0
10 227.04
15 362.78
20 517.35
22.5 602.97
30 901.67
a) Estimate the velocity at t = 16 seconds using the direct method of interpolation with a second-order polynomial.
b) Find the absolute relative approximate error for the second-order polynomial approximation.
c) Using the second-order polynomial interpolant for velocity from part (a), find the distance covered by the rocket from
t = 11 s to t = 16 s .
d) Using the second-order polynomial interpolant for velocity from part (a), find the acceleration of the rocket at t = 16 s .
Solution
For second-order polynomial interpolation (also called quadratic interpolation), the velocity is given by
2
v (t) = a0 + a1 t + a2 t (5.2.1.E2.1)
5.02.3 https://math.libretexts.org/@go/page/126410
Figure 5.2.1.3 . Quadratic interpolation.
a) 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 t = 10, t = 15, and t = 20 .
0 1 2
Then
Equation (5.2.1.E2.1)gives
2
v (10) = a0 + a1 (10) + a2 (10) = 227.04
2
v (15) = a0 + a1 (15) + a2 (15) = 362.78
2
v (20) = a0 + a1 (20) + a2 (20) = 517.35
⎢1 15 225 ⎥ ⎢ a1 ⎥ = ⎢ 362.78 ⎥
⎣ ⎦⎣ ⎦ ⎣ ⎦
1 20 400 a2 517.35
a1 = 17.733
a2 = 0.37660
At t = 16 ,
2
v (16) = 12.050 + 17.7333 (16) + 0.37660(16)
= 392.19 m/s
b) The absolute relative approximate error |ϵ | obtained between the results from the first- and second- order polynomial is
a
∣ 392.19 − 393.70∣
| ϵa | = ∣ ∣ × 100
∣ 392.19 ∣
= 0.38410%
c) The distance covered by the rocket between t = 11 s and t = 16 s can be calculated from the interpolating polynomial
(Equation 5.2.1.E2.2)
2
v (t) = 12.050 + 17.733t + 0.37660 t , 10 ≤ t ≤ 20
Note that the polynomial is valid between t = 10 s and t = 22.5 s and hence includes the limits of integration of t = 11 s and
t = 16 s .
5.02.4 https://math.libretexts.org/@go/page/126410
So,
16
16
2
=∫ (12.050 + 17.733t + 0.3766 0t ) dt
11
16
2 3
t t
= [12.050t + 17.733 + 0.37660 ]
2 3
11
= 1604.3 m
we get
d
a (t) = v (t)
dt
d 2
= (12.050 + 17.733t + 0.37660 t )
dt
= 17.733 + 0.75320t, 10 ≤ t ≤ 20
Hence
a (16) = 17.733 + 0.75320(16)
2
= 29.784 m/s
Example 5.2.1.3
0 0
10 227.04
15 362.78
20 517.35
22.5 602.97
30 901.67
a) Determine the value of the velocity at t = 16 seconds using the direct method of interpolation with a third-order
polynomial.
b) Find the absolute relative approximate error for the third-order polynomial approximation.
c) Using the third-order polynomial interpolant for velocity from part (a), find the distance covered by the rocket from
t = 11 s to t = 16 s .
d) Using the third-order polynomial interpolant for velocity from part (a), find the acceleration of the rocket at t = 16 s .
Solution
5.02.5 https://math.libretexts.org/@go/page/126410
a) For third-order polynomial interpolation (also called cubic interpolation), we choose the velocity given by
2 3
v (t) = a0 + a1 t + a2 t + a3 t (5.2.1.E3.1)
2 3
v (22.5) = a0 + a1 (22.5) + a2 (22.5) + a3 (22.5) = 602.97
⎣ ⎦⎣ ⎦ ⎣ ⎦
1 22.5 506.25 11391 a3 602.97
a1 = 21.266
a2 = 0.13204
a3 = 0.0054347
Hence
2 3
v (t) = a0 + a1 t + a2 t + a3 t
(5.2.1.E3.2)
2 3
= −4.2540 + 21.266t + 0.13204 t + 0.0054347 t , 10 ≤ t ≤ 22.5
= 392.06 m/s
5.02.6 https://math.libretexts.org/@go/page/126410
b) The absolute percentage relative approximate error |ϵ | for the value obtained for v(16) between the second- and third-order
a
polynomial is
∣ 392.06 − 392.19∣
| ϵa | = ∣ ∣ × 100
∣ 392.06 ∣
= 0.033269%
c) The distance covered by the rocket between t = 11 s and t = 16 s can be calculated from the interpolating polynomial
(Equation 5.2.1.E3.2), which is restated below:
2 3
v (t) = −4.2540 + 21.266t + 0.13204 t + 0.0054347 t , 10 ≤ t ≤ 22.5
Note that the polynomial is valid between t = 10 s and t = 22.5 s and hence includes the limits of integration of t = 11 s and
t = 16 s .
So,
16
16
2 3
=∫ (−4.2540 + 21.266t + 0.13204 t + 0.0054347 t ) dt
11
16
2 3 4
t t t
= [−4.2540t + 21.266 + 0.13204 + 0.0054347 ]
2 3 4
11
= 1605.0 m
we get
d
a (t) = v (t)
dt
d
2 3
= (−4.2540 + 21.266t + 0.13204 t + 0.0054347 t )
dt
2
= 21.266 + 0.26408t + 0.016304 t , 10 ≤ t ≤ 22.5
Hence
2
a (16) = 21.266 + 0.26408 (16) + 0.016304(16)
2
= 29.665 m/s
Time (s) 0 15 18 22 24
5.02.7 https://math.libretexts.org/@go/page/126410
Velocity (m/s) 22 24 37 25 123
The velocity in m/s at 16s using linear polynomial interpolation is most nearly
(A) 27.867
(B) 28.333
(C) 30.429
(D) 43.000
(3). The following data of the velocity of a body as a function of time is given as follows.
Time (s) 0 15 18 22 24
The velocity in m/s at 16s using quadratic polynomial interpolation is most nearly
(A) 27.867
(B) 28.333
(C) 30.429
(D) 43.000
(4). The following data of the velocity of a body is given as a function of time
Time, t (s) 0 15 18 22 24
approximates the velocity of the body. From this information, one of the times in seconds at which the velocity of the body is
35 m/s during the above time interval of t = 18 s to t = 24 s is
(A) 18.667
(B) 20.850
(C) 22.200
(D) 22.294
(5). The following data of the velocity of a body is given as a function of time
Time, t (s) 0 15 18 22 24
One of the interpolant approximations for the velocity from the above data is given as
2
v(t) = 8.6667 t − 349.67t + 3523, 18 ≤ t ≤ 24
Using the above interpolant, the distance in meters covered by the body between t = 19 s and t = 22 s is most nearly
(A) 10.337
(B) 88.500
(C) 93.000
(D) 168.00
(6). The following data of the velocity of a body is given as a function of time.
5.02.8 https://math.libretexts.org/@go/page/126410
Time, t (s) 0 15 18 22 24
If you were going to use quadratic interpolation to find the value of the velocity at t = 14.9 s , what three data points of time
would you choose for interpolation?
(A) 0, 15, 18
(B) 15, 18, 22
(C) 0, 15, 22
(D) 0, 18, 24
For complete solution, go to
http://nm.mathforcollege.com/mcquizzes/05inp/quiz_05inp_direct_solution.pdf
Problem Set
(1). The following data of the velocity of a body as a function of time is given
Time (s) 0 15 18 22 24
Answer
23.86 m/s
(2). The following data of the velocity of a body as a function of time is given
Time (s) 0 15 18 22 24
Answer
20.60 m/s
(3). The following data of the velocity of a body as a function of time is given:
Time (s) 0 15 18 22 24
Answer
17.30 m/s
(4). The following data of the velocity of a body as a function of time is given as follows.
Time (s) 0 15 18 22 24
5.02.9 https://math.libretexts.org/@go/page/126410
approximates the velocity of the body between 18 and 24 seconds. From this information, can you find out when the velocity of the
body is 26 m/s during the above time interval?
Answer
18.287 s or 22.028 s
(5). The following data of the velocity of a body as a function of time is given as follows.
Time (s) 0 15 18 22 24
Find the value of velocity at t = 16 seconds using the following interpolation function for the velocity of the body
Answer
24.875 m/s (Intermediate answers a
0 , ;
= 25.008 a1 = −9.2636 a2 = −5.0770 (arguments of sin are radians)
(6). You are given data for the upward velocity of a rocket as a function of time in the table below.
a) Determine the value of the velocity at t = 16 seconds using first order polynomial direct method.
b) Determine the value of the velocity at t = 16 seconds using second order polynomial direct method. Find the absolute relative
approximate error for approximation from the second order polynomial. How many significant digits would you at least trust in the
solution?
c) Determine the value of the velocity at t = 16 seconds using third order polynomial direct method. Find the absolute relative
approximate error for approximation from the third order polynomial. How many significant digits would you at least trust in the
solution?
d) What is the true error for part (a), (b) and (c), if I told you that the data given in the table above was derived from the formula
4
14 × 10
v(t) = 2000 ln[ ] − 9.8t, 0 ≤ t ≤ 30?
4
14 × 10 − 2100t
Answer
a) 393.69 m/s
(7). You are given data for the upward velocity of a rocket as a function of time in the table below.
5.02.10 https://math.libretexts.org/@go/page/126410
Velocity (m/s) 0 227.04 362.78 517.35 602.97 901.67
Answer
2
a) 30.914 m/s
2
b) 29.784 m/s
This page titled 5.02: Direct Method of Interpolation is shared under a CC BY-NC-SA 4.0 license and was authored, remixed, and/or curated by
Autar Kaw via source content that was edited to the style and standards of the LibreTexts platform; a detailed edit history is available upon
request.
5.02.11 https://math.libretexts.org/@go/page/126410