Function Math Miscellaneous Class

ChebychevT

"Evaluate Chebychev T Polynomial"

Signature (Visual Basic / VBA)

Public Function ChebychevT( _
      ByVal vN As Variant _
    , ByVal vX As Variant _
    ) As Variant

Code Examples

    ChebychevT(1, 1) = 1
    ChebychevT(1, 2) = 2
    ChebychevT(1, 3) = 3
    ChebychevT(1, 4) = 4
    ChebychevT(2, 1) = 1
    ChebychevT(2, 2) = 7
    ChebychevT(2, 3) = 17
    ChebychevT(2, 4) = 31
    ChebychevT(3, 1) = 1
    ChebychevT(3, 2) = 26
    ChebychevT(3, 3) = 99
    ChebychevT(3, 4) = 244
    If N = 0: 1
    If N = 1: X
    If N > 1: 2 * X * ChebychevT(N - 1, X) - ChebychevT(N - 2, X)

Parameters

Parameter Description
vN The number of iterations. Function returns Null if vN is Null or cannot be fixed up to a number.
vX The multiplier. Function returns Null if vX is Null or cannot be fixed up to a number.

Notes & Version History

Note Function will return Null instead of generating an error if any of its calculations cause Overflow or other types of errors.