OrthoP | Legendre and Jacobi orthogonal polynomials |
OrthoH | Hermite orthogonal polynomials |
OrthoG | Gegenbauer orthogonal polynomials |
OrthoL | Laguerre orthogonal polynomials |
OrthoT | Chebyshev polynomials |
OrthoU | Chebyshev polynomials |
OrthoPSum | sums of series of orthogonal polynomials |
OrthoHSum | sums of series of orthogonal polynomials |
OrthoLSum | sums of series of orthogonal polynomials |
OrthoGSum | sums of series of orthogonal polynomials |
OrthoTSum | sums of series of orthogonal polynomials |
OrthoUSum | sums of series of orthogonal polynomials |
OrthoPoly | internal function for constructing orthogonal polynomials |
OrthoPolySum | internal function for computing series of orthogonal polynomials |
OrthoP(n, x); OrthoP(n, a, b, x); |
x -- point to evaluate polynomial at
a, b -- parameters for Jacobi polynomial
The Jacobi polynomials are orthogonal with respect to the weight function (1-x)^a*(1+x)^b on the interval [-1,1]. They satisfy the recurrence relation
Legendre polynomials are a special case of Jacobi polynomials with the specific parameter values a=b=0. So they form an orthogonal system with respect to the weight function identically equal to 1 on the interval [-1,1], and they satisfy the recurrence relation
Most of the work is performed by the internal function OrthoPoly.
In> PrettyPrinter'Set("PrettyForm"); True In> OrthoP(3, x); / 2 \ | 5 * x 3 | x * | ------ - - | \ 2 2 / In> OrthoP(3, 1, 2, x); 1 / / 21 * x 7 \ 7 \ - + x * | x * | ------ - - | - - | 2 \ \ 2 2 / 2 / In> Expand(%) 3 2 21 * x - 7 * x - 7 * x + 1 ---------------------------- 2 In> OrthoP(3, 1, 2, 0.5); -0.8124999999 |
OrthoH(n, x); |
x -- point to evaluate polynomial at
The Hermite polynomials are orthogonal with respect to the weight function Exp(-x^2/2) on the entire real axis. They satisfy the recurrence relation
Most of the work is performed by the internal function OrthoPoly.
In> OrthoH(3, x); Out> x*(8*x^2-12); In> OrthoH(6, 0.5); Out> 31; |
OrthoG(n, a, x); |
a -- parameter
x -- point to evaluate polynomial at
The Gegenbauer polynomials are orthogonal with respect to the weight function (1-x^2)^(a-1/2) on the interval [-1,1]. Hence they are connected to the Jacobi polynomials via
Most of the work is performed by the internal function OrthoPoly.
In> OrthoG(5, 1, x); Out> x*((32*x^2-32)*x^2+6); In> OrthoG(5, 2, -0.5); Out> 2; |
OrthoL(n, a, x); |
a -- parameter
x -- point to evaluate polynomial at
The Laguerre polynomials are orthogonal with respect to the weight function x^a*Exp(-x) on the positive real axis. They satisfy the recurrence relation
Most of the work is performed by the internal function OrthoPoly.
In> OrthoL(3, 1, x); Out> x*(x*(2-x/6)-6)+4; In> OrthoL(3, 1/2, 0.25); Out> 1.2005208334; |
OrthoT(n, x); OrthoU(n, x); |
x -- point to evaluate polynomial at
The Chebyshev polynomials are orthogonal with respect to the weight function (1-x^2)^(-1/2). Hence they are a special case of the Gegenbauer polynomials G(n,a,x), with a=0. They satisfy the recurrence relations
In> OrthoT(3, x); Out> 2*x*(2*x^2-1)-x; In> OrthoT(10, 0.9); Out> -0.2007474688; In> OrthoU(3, x); Out> 4*x*(2*x^2-1); In> OrthoU(10, 0.9); Out> -2.2234571776; |
OrthoPSum(c, x); OrthoPSum(c, a, b, x); OrthoHSum(c, x); OrthoLSum(c, a, x); OrthoGSum(c, a, x); OrthoTSum(c, x); OrthoUSum(c, x); |
a, b -- parameters of specific polynomials
x -- point to evaluate polynomial at
The list of coefficients starts with the lowest order, so that for example OrthoLSum(c, a, x) = c[1] L[0](a,x) + c[2] L[1](a,x) + ... + c[N] L[N-1](a,x).
See pages for specific orthogonal polynomials for more details on the parameters of the polynomials.
Most of the work is performed by the internal function OrthoPolySum. The individual polynomials entering the series are not computed, only the sum of the series.
In> Expand(OrthoPSum({1,0,0,1/7,1/8}, 3/2, \ 2/3, x)); Out> (7068985*x^4)/3981312+(1648577*x^3)/995328+ (-3502049*x^2)/4644864+(-4372969*x)/6967296 +28292143/27869184; |
OrthoPoly(name, n, par, x) |
n -- degree of the polynomial
par -- list of values for the parameters
x -- point to evaluate at
All known families are stored in the association list returned by the function KnownOrthoPoly(). The name serves as key. At the moment the following names are known to Yacas: "Jacobi", "Gegenbauer", "Laguerre", "Hermite", "Tscheb1", and "Tscheb2". The value associated to the key is a pure function that takes two arguments: the order n and the extra parameters p, and returns a list of two lists: the first list contains the coefficients A,B of the n=1 polynomial, i.e. A+B*x; the second list contains the coefficients A,B,C in the recurrence relation, i.e. P[n]=(A+B*x)*P[n-1]+C*P[n-2]. (There are only 3 coefficients in the second list, because none of the polynomials use C+D*x instead of C in the recurrence relation. This is assumed in the implementation!)
If the argument x is numerical, the function OrthoPolyNumeric is called. Otherwise, the function OrthoPolyCoeffs computes a list of coefficients, and EvaluateHornerScheme converts this list into a polynomial expression.
OrthoPolySum(name, c, par, x) |
c -- list of coefficients
par -- list of values for the parameters
x -- point to evaluate at
The algorithm used to compute the series without first computing the individual polynomials is the Clenshaw-Smith recurrence scheme. (See the algorithms book for explanations.)
If the argument x is numerical, the function OrthoPolySumNumeric is called. Otherwise, the function OrthoPolySumCoeffs computes the list of coefficients of the resulting polynomial, and EvaluateHornerScheme converts this list into a polynomial expression.