![]() |

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 c0 T0 (x) + c1 T1 (x) + ... + cn Tn (x) using Clenshaw's recurrence formula.
The ChebyshevCoefficients subroutine can represent Tn (x) as a sum of powers of x: c0 + c1 x + ... + cn x n.
The FromChebyshev subroutine can perform a conversion of a series of Chebyshev polynomials to a power series.
This article is intended for personal use only.
C# source.
C++ source.
C++ source. MPFR/GMP is used.
GMP source is available from gmplib.org. MPFR source is available from www.mpfr.org.
FreePascal version.
Delphi version.
VB.NET version.
VBA version.
Python version (CPython and IronPython are supported).
|
ALGLIB® - numerical analysis library, 1999-2012. |