The Chebyshev polynomials of the first (Tn and second (Un) kinds can be defined by the trigonometric identity
Tn(x) = cos(n arccos x)or can be constructed using the three term recurrence relation:
T0(x) = 1The recurrence relation given above is the most efficient way to calculate the Chebyshev polynomial. The ChebyshevCalculate subroutine uses this relation to calculate Tn(x) and/or Un(x) for any given x.
The ChebyshevSum subroutine calculates the sum of Chebyshev polynomials c0T0(x) + c1T1(x) + ... + cnTn(x) using Clenshaw's recurrence formula.
The ChebyshevCoefficients subroutine can represent Tn(x) as a sum of powers of x: c0 + c1x + ... + cnxn.
The FromChebyshev subroutine can perform a conversion of a series of Chebyshev polynomials to a power series.
This article is licensed for personal use only.
ALGLIB Project offers you two editions of ALGLIB:
ALGLIB Free Edition:
+delivered for free
+offers full set of numerical functionality
+extensive algorithmic optimizations
-no multithreading
-non-commercial license
ALGLIB Commercial Edition:
+flexible pricing
+offers full set of numerical functionality
+extensive algorithmic optimizations
+high performance (SMP, SIMD)
+commercial license with support plan
Links to download sections for Free and Commercial editions can be found below: