Graphics Programs Reference
In-Depth Information
(10 )
(0 )
25 β
β
25 1
.
4186
1
.
6595
˙
(5 )
β
=
=
=−
34
.
51 rad/s
2 h
2(0
.
087266)
etc.
The complete set of results is
α
(deg)
0
5
10
15
20
25
30
˙
β
.
.
.
.
.
.
.
(rad/s)
32
01
34
51
35
94
35
44
33
52
30
81
27
86
5.4 Derivatives by Interpolation
If f ( x ) is givenas a set of discrete datapoints, interpolation can be avery effective
meansofcomputing its derivatives. The ideaistoapproximate the derivativeof f ( x )
by the derivative of the interpolant. Thismethodis particularlyuseful if the datapoints
are locatedat unevenintervals of x , when the finite difference approximationslisted
in the last article are not applicable. 9
Polynomial Interpolant
The idea here issimple:fit the polynomialofdegree n
1
a 1 x n 1
a 2 x n 2
P n 1 ( x )
=
+
+···+
a n
(a)
through n datapoints and then evaluate its derivatives at the given x .As pointed out
in Art. 3.2, it is generally advisable to limit the degree of the polynomial to less than
six in order to avoid spurious oscillations of the interpolant.Since these oscillations
are magnifiedwith each differentiation, their effect can be devastating. Inview of the
abovelimitation, the interpolation shouldusuallybe a localone, involving no more
than a fewnearest-neighbordatapoints.
For evenly spaceddatapoints, polynomial interpolation and finite difference
approximations produce identical results. In fact, the finite difference formulas are
equivalenttopolynomial interpolation.
Several methodsofpolynomial interpolationwere introducedinArt. 3.2. Unfor-
tunately, none of themissuited for the computation of derivatives. The method that
we needisonethat determines the coefficients a 1 ,
a n of the polynomial in
Eq. (a). There isonly onesuch methoddiscussedinChapter3—the least-squares fit.
Althoughthis methodis designedmainly for smoothing of data, it will carry out inter-
polationif we use m
a 2 ,...,
n in Eq. (3.22). If the data contains noise, then the least-squares
fit shouldbe usedinthe smoothing mode, that is, with m
=
<
n .After the coefficients of
9
It is possible to derive finite difference approximationsforunevenly spaceddata, but theywould
not be as accurate as the formulas derivedinArt. 5.2.
Search WWH ::




Custom Search