"Special Functions" |
|
Chebyshev Polynomial Method |
|
Chebyshev polynomial using "ChebyshevT method"
|
|
Chebyshev polynomial using "ChebyshevU method"
|
|
IMPLEMENTATION
Chebyshev Polynomial Method
Chebyshev polynomials are important in numerical analysis. There are two types of Chebyshev polynomials, both of which are
solutions to the Chebyshev difference equations:
(1 - x2)y'' - xy' + n2y = 0 (first kind)
(1 - x2)y'' - 3xy' + n(n + 2)y = 0 (second kind) |
The Chebyshev polynomials of the first kind are defined by the recurrence relation:
T0(x) = 1
T1(x) = x
T2(x) = 2x2 - 1
Tn+1(x) = 2xTn(x) - Tn-1(x) |
The Chebyshev polynomials of the second kind are defined by:
U0(x) = 1
U1(x) = 2x
U2(x) = 4x2 - 1
Un+1(x) = 2xUn(x) - Un-1(x)
|
Testing the Chebyshev Polynomial Method
To test the Chebyshev Polynomial method, new static methods ChevyshevT - (first kind) and ChevyshevU - (second kind) has been added. The implementation of these type of polynomials
are based on their recurrence relation. The TestChebyshevPolynomial() method has
been written, added and executed:
static void TestChebyshev Polynomial();
{
for (int i = 0; i < t2; i++)
{
double x = 0.25 * (i - 5.0);
ListBox1.Items.Add(" x = " + x + ".00, " + "T" + t1 + "(x) = " + SpecialFunctions.ChebyshevT(x, t1).ToString());
ListBox2.Items.Add(" x = " + x + ".00, " + "U" + t1 + "(x) = " + SpecialFunctions.ChebyshevU(x, t1).ToString());
}
}
|
|
|