Professional Documents
Culture Documents
Discrete Functions
1. find approximate values of the first derivative of functions that are given at
discrete data points, and
2. use Lagrange polynomial interpolation to find derivatives of discrete functions.
To find the derivatives of functions that are given at discrete points, several methods are
available. Although these methods are mainly used when the data is spaced unequally, they
can be used for data that is spaced equally as well.
x x x x
Example 1
The upward velocity of a rocket is given as a function of time in Table 1.
0 0
10 227.04
15 362.78
20 517.35
22.5 602.97
30 901.67
vti 1 ti
ati
t
t i 15
t i 1 20
t ti 1 ti
20 15
5
20 15
a 16
5
517.35 362.78
5
= 30.914 m/s 2
Example 2
The upward velocity of a rocket is given as a function of time in Table 2.
Solution
For the third order polynomial (also called cubic interpolation), we choose the velocity given
by
vt a 0 a1t a 2 t 2 a3t 3
Since we want to find the velocity at t 16 s , and we are using a third order polynomial, we
need to choose the four points closest to t 16 and that also bracket t 16 to evaluate it.
The four points are t0 10, t1 15, t 2 20 and t 3 22.5 .
t 0 10, vt 0 227.04
t1 15, vt1 362.78
t 2 20, vt 2 517.35
t 3 22.5, vt 3 602.97
such that
v10 227.04 a 0 a1 10 a 2 10 a 3 10
2 3
29.664 m/s2
Lagrange Polynomial
In this method, given x0 , y 0 , , xn , y n , one can fit a n th order Lagrangian polynomial
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) and
n x xj
Li ( x)
j 0 xi x j
j i
2 x x1 x 2 2 x x0 x 2 2 x x 0 x1
f 2 x f x0 f x1 f x
x0 x1 x0 x 2 x1 x0 x1 x 2 x2 x0 x 2 x1 2
Differentiating again would give the second derivative as
2 2 2
f 2 x f x0 f x1 f x2
x0 x1 x0 x2 x1 x0 x1 x2 x2 x0 x 2 x1
Example 3
The upward velocity of a rocket is given as a function of time in Table 3.
Determine the value of the acceleration at t 16 s using second order Lagrangian polynomial
interpolation for velocity.
Solution
t t1 t t 2 t t 0 t t 2 t t 0 t t1
v(t ) v(t 0 ) v(t1 ) v(t 2 )
t 0 t1 t 0 t 2 t1 t 0 t1 t 2 t 2 t 0 t 2 t1
2t t1 t 2 2t t 0 t 2 2t t 0 t1
at t 0 t1 t
t 0 t1 t 0 t 2 t1 t 0 t1 t 2 t 2 t 0 t 2 t1 2
216 15 20
a 16 227.04 216 10 20 362.78
10 1510 20 15 1015 20
216 10 15
517.35
20 1020 15
0.06227.04 0.08362.78 0.14517.35
29.784 m/s 2