
© 2001 by CRC Press LLC
Because numerical differentiation is highly inaccurate, whenever possible
numerical integration should be preferred over numerical differentiation. In case that
one needs to find the velocity of a certain motion study and has the option of
collecting the displacement or acceleration data, then the acceleration data should
be taken not the displacement data. The reason is that one has the choice of applying
numerical differentiation to the displacement data or numerical integration to the
acceleration data to obtain the velocity results. The numerical integration which is
the topic of Chapter 5 has the smoothing effect and hence is more accurate! Graph-
ically, differentiation is of a
local
evaluation of determining the slope at a selected
point on a curve which could be the result of fitting a number of data points discussed
in Chapter 3 while integration is of a global evaluation of finding the area under the
curve between two specified limits of the independent variable. For a set of three
given points fitted linearly by two linear segments and quadratically by a parabola,
the slope at the mid-point could have very different slope values while the areas
under the linear segments and under the parabola would not differ too significantly.
Hence, it is worthy of emphasizing that learning the computational methods is easier
when compared to making decision of which method is best to solve the problem
at hand.
4.2 PROGRAM DIFFTABL — APPLICATIONS
OF FINITE-DIFFERENCE TABLE
Program
DiffTabl
has been developed for the need of constructing a table of finite
differences of a given set of N two-dimensional points, (x
i
,y
i
) for i = 1–N. The x
values are assumed to be equally spaced, i.e., , x
2
–x
1
= x
3
–x
2
= ••• = x
N
-x
N–1
= h, h
being called the
increment
, or,
stepsize
. This so-called
difference table
can be applied
for interpolation of the y value for a specified, unlisted x value inside the range of
x = x
1
and x = x
N
(extrapolation if outside the range), and differentiation. Table 1
shows a typical difference table.
The symbol
used in Table 1 is called Forward Difference Operator. If we refer
the numbers listed in the x and y columns as x
1
to x
6
and y
1
to y
6
, respectively, the
first number listed under
y, 1.9495, is obtained from the calculation of y
2
–y
1
and
is identified as
∆
y
1
. The last number listed in the
y column, 5.3015, is equal to
y
6
–y
5
and referred to as
y
5
. Or, we may write the general formula as, for i = 1 to 5,
(1)
y
i
is called the first forward difference of y at x
i
. The higher order forward
differences listed in Table 1 are obtained by extended application of Equation 1.
That is,
(2)
∆yy y
ii i
=−
+1
∆∆ ∆ ∆
2
1121
2yyyy yy yy
iiii ii ii
=−
()
=−=−+
++++