Professional Documents
Culture Documents
Discrete Functions
Discrete Functions
Functions
1
Introduction
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.
2
Forward Difference
Approximation
lim f x Δx f x
f x
Δx 0 Δx
For a finite ' Δx'
f x x f x
f x
x
3
Graphical Representation Of
Forward Difference
Approximation
f(x)
x x+Δx
4
Example 1
The upward velocity of a rocket is given as a function of time in Table 1.
5
Example 1 Cont.
Solution
To find the acceleration at t 16s, we need to choose the two values
closest to t 16s, that also bracket t 16s to evaluate it. The two
points are t 15s and t 20s.
ti 1 ti
ati
t
ti 15
ti 1 20
t ti 1 ti
20 15
5
6
Example 1 Cont.
20 15
a16
5
517.35 362.78
5
30.914 m/s 2
7
Direct Fit Polynomials
In this method, given ' n 1' data points x0 , y 0 , x1 , y1 , x 2 , y 2 ,, x n , y n
one can fit a n th order polynomial given by
Pn x a0 a1x an 1x n 1 an xn
8
Example 2-Direct Fit Polynomials
The upward velocity of a rocket is given as a function of time in Table 2.
Using the third order polynomial interpolant for velocity, find the
acceleration of the rocket at t 16 s .
9
Example 2-Direct Fit Polynomials cont.
Solution
For the third order polynomial (also called cubic interpolation), we choose the velocity given by
a0 4.3810
a1 21.289
a2 0.13065
a3 0.0054606
Hence
12
Example 2-Direct Fit Polynomials cont.
29.664 m/s 2
14
Lagrange Polynomial
In this method, given x1 , y1 ,, xn , yn , one can fit a n 1th order Lagrangian polynomial
given by
n
f n ( x) L ( x) f ( x )
i 0
i i
15
Lagrange Polynomial Cont.
Then to find the first derivative, one can differentiate f n x once, and so on
f 2 x
x x1 x x2 f x x x0 x x2 f x x x0 x x1 f x
x0 x1 x0 x2 0 x1 x0 x1 x2 1 x2 x0 x2 x1 2
16
Lagrange Polynomial Cont.
2 x x1 x2 2 x x0 x2 2 x x0 x1
f 2 x f x0 f x1 f x
x0 x1 x0 x2 x1 x0 x1 x2 x2 x0 x2 x1 2
17
Example 3
The upward velocity of a rocket is given as a function of time in Table 3.
18
Example 3 Cont.
Solution
t t1 t t 2 t t0 t t 2 t t0 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 t2 t0 t 2 t1
2t t1 t 2 2t t 0 t 2
at t 0 t1 2t t0 t1 νt2
t 0 t1 t 0 t 2 t1 t 0 t1 t 2 t2 t0 t2 t1
216 15 20
a16 227.04 216 10 20 362.78 20
216 10 15
517.35
10 1510 20 15 1015 20 10 20 15
29.784 m/s 2
19
THE END
20