In numerical analysis, the Clenshaw algorithm, also called Clenshaw summation, is a recursive method to evaluate a linear combination of Chebyshev polynomials. It is a generalization of Horner's method for evaluating a linear combination of monomials.
Contents
- Clenshaw algorithm
- Horner as a special case of Clenshaw
- Special case for Chebyshev series
- Meridian arc length on the ellipsoid
- Difference in meridian arc lengths
- References
It generalizes to more than just Chebyshev polynomials; it applies to any class of functions that can be defined by a three-term recurrence relation.
Clenshaw algorithm
In full generality, the Clenshaw algorithm computes the weighted sum of a finite series of functions
where
where the coefficients
The algorithm is most useful when
To perform the summation for given series of coefficients
Note that this computation makes no direct reference to the functions
See Fox and Parker for more information and stability analyses.
Horner as a special case of Clenshaw
A particularly simple case occurs when evaluating a polynomial of the form
The functions are simply
and are produced by the recurrence coefficients
In this case, the recurrence formula to compute the sum is
and, in this case, the sum is simply
which is exactly the usual Horner's method.
Special case for Chebyshev series
Consider a truncated Chebyshev series
The coefficients in the recursion relation for the Chebyshev polynomials are
with the initial conditions
Thus, the recurrence is
and the final sum is
One way to evaluate this is to continue the recurrence one more step, and compute
(note the doubled a0 coefficient) followed by
Meridian arc length on the ellipsoid
Clenshaw summation is extensively used in geodetic applications. A simple application is summing the trigonometric series to compute the meridian arc distance on the surface of an ellipsoid. These have the form
Leaving off the initial
The recurrence relation for
making the coefficients in the recursion relation
and the evaluation of the series is given by
The final step is made particularly simple because
Note that the algorithm requires only the evaluation of two trigonometric quantities
Difference in meridian arc lengths
Sometimes it necessary to compute the difference of two meridian arcs in a way that maintains high relative accuracy. This is accomplished by using trigonometric identities to write
Clenshaw summation can be applied in this case provided we simultaneously compute
where
The first element of
where
takes the place of
where
This technique can be used in the limit