Special Functions

AiryA(x)

The AiryA function returns the value of the Airy Ai (x ) function:

Eqn

where K() is the modified Bessel function of the second kind.

AiryAD(x)

The AiryAD function returns the value of the derivative of the Airy function.

AiryB(x)

The AiryB function returns the value of the Airy Bi (x ) function:

where I() is the modified Bessel function of the first kind.

AiryBD(x)

The AiryBD function returns the value of the derivative Bi' (x ) of the AiryB function.

BesselI(n, z)

The BesselI function returns the modified Bessel function of the first kind, of order n and argument z. If z is real, a real value is returned. If z is real and negative, Besseli returns NaN unless n is an integer.

For complex z a complex value is returned, and there are no restrictions on z except for possible overflow.

BesselJ(n, z)

The BesselJ function returns the Bessel function of the first kind, Jn (z), of ordern and argument z. If z is real, a real value is returned. If z is real and negative, BesselJ returns NaN unless n is an integer. For complex z a complex value is returned, and there are no restrictions on z except for possible overflow.

BesselK(n, z)

The BesselK function returns the modified Bessel function of the second kind, Kn (z), of ordern and argument z. If z is real, a real value is returned. If z is real and negative, BesselK returns NaN.

BesselY(n, z)

The BesselY function returns the Bessel function of the second kind, Yn (z ), of ordern and argument z. If z is real, a real value is returned. If z is real and negative, BesselY returns NaN.

Beta(a, b)

The beta function returns for real or complex arguments

with Re(a), Re(b)>0.

Betai

The betai function returns the regularized incomplete beta function

Here a,b>0, and 0<=x<=1.

Binomial(n,k)

The binomial function returns the ratio:

where both n and k are positive integers, k<=n and ! denotes the factorial function.Binomialln(n,k)

Returns the natual log of the binomial coefficient for n, and k.

Chebyshev(n,x)

The chebyshev function returns the Chebyshev polynomial of the first kind and of degree n. The Chebyshev polynomials satisfy the recurrence relation:

The orthogonality of the polynomial is expressed by the integral:

ChebyshevU(n,x)

The chebyshevU function returns the Chebyshev polynomial of the second kind, degree n and argument x. The Chebyshev polynomial of the second kind satisfies the recurrence relation

U(n+1,x)=2xU(n,x)-U(n-1,x),

which is also the recurrence relation of the Chebyshev polynomials of the first kind. The first 10 polynomials of the second kind are:

U(0,x)=1

U(1,x)=2x

U(2,x)=4x^2-1

U(3,x)=8x^3-4x

U(4,x)=16x^4-12x^2+1

U(5,x)=32x^5-32x^3+6x

U(6,x)=64x^6-80x^4+24x-1

U(7,x)=128x^7-192x^5+80x^3-8x

U(8,x)=256x^8-448x^6+240x^4-40x^2+1

U(9,x)512x^9-1024x^7+672x^5-160x^3+10x

Dawson(x)

The dawson function returns the value of the Dawson integral

Digamma(z)

The digamma function returns the digamma, or psi function of z. This is the logarithmic derivative of the gamma function

In complex expressions, z is complex, and digamma(z) returns a complex value. Limited testing indicates that the accuracy is approximately 1 part in 1016, at least for moderately-sized values of x.

Ei(x)

The ei function returns the value of the exponential integral Ei (x )

where P denotes the principal value of the integral.

Erf(z)

The erf function returns the error function. For real input x the function is given by

In complex expressions the error function is defined by

where

is the confluent hypergeometric function of the first kind HyperG1F1.

Erfc(z)

The erfc function returns the complementary error function of z (erfc(z) = 1 - erf(z)).

where

is the confluent hypergeometric function of the first kind HyperG1F1.

expInt(n,x)

The expInt function returns the value of the exponential integral En (x )

where P is the principal value.

Factorial(n)

The Factorial function returns n !, where n is assumed to be a positive integer. Note that while factorial is an integer-valued function, a double-precision number has 53 bits for the mantissa. This means that numbers over 252 will be accurate to about one part in about 2x1016. Values of n greater than 170 result in overflow and return the nonnumber Inf.

FresnelCos(x)

The FresnelCos function returns the Fresnel cosine function C (x ).

FresnelSin(x)

The FresnelSin function returns the Fresnel sine function S(x )

Gamma(z)

The gammma function returns the value of the gamma function of z. If z is complex, it returns a complex result. Note that the return value for num close to negative integers is NaN, not +/-Inf.

GammaInc(a,x)

The gammaInc function returns the value of the incomplete gamma function, defined by the integral

Note that gammaInc(a, x) = gamma(a) - gammaInc(a, x, 0). Defined for x > 0, a >= 0

Gammln(z)

The gammln function returns the natural log of the gamma function of z, where z>0. If z is complex, it returns a complex result.

Gammp(a,x)

The gammp function returns the regularized incomplete gamma function P(a,x), where a>0, x>=0. It is defined by

gammp(a,x)=gammaInc(a,x)/gamma(a).

Gammq(a,x)

The gammq function returns the regularized incomplete gamma function 1-P(a,x), where a >0, x>=0. It is defined by

gammaInc(a,x)/gamma(a).

Hermite(n,x)

The hermite function returns the Hermite polynomial of order n

The first few polynomials are:

H(0,x)=1

H(1,x)=2x

H(2,x)=4x^2-2

H(3,x)=8x^3-12x

HermiteGauss(n,x)

The HermiteGauss function returns the normalized Hermite polynomial of order n :

Here the normalization was chosen such that

HyperG0F1(b,z)

The hyperG0F1 function returns the confluent hypergeometric function

where

is the gamma function.

HyperG1F1(a,b,z)

The hyperG1F1 function returns the confluent hypergeometric function

where the Pochhammer symbol is defined as:

HyperG2F1(a,b,c,z)

The hyperG2F1 function returns the confluent hypergeometric function

where the Pochhammer symbol is defined as:

HyperGPFQ(a,b,z)

The hyperGPFQ function returns the generalized hypergeometric function

where the Pochhammer symbol is defined as:

InverseERF(x)

The inverseErf function returns the inverse of the error function

InverseERFC

The inverseErfc function returns the inverse of the complementary error function.

Laguerre

The laguerre function returns the Laguerre polynomial of degree n (positive integer) and argument x. The polynomials satisfy the recurrence relation:

with the initial conditions

LegendreA

The legendreA function returns the associated Legendre polynomial

where n and m are integers such that 0<=m<=n and |x | <=1.

The first three polynomials are given by

SphericalBessJ

The sphericalBessJ function returns the spherical Bessel function of the first kind and order n.

The first three functions are

SphericalBessJD

The sphericalBessJD function returns the derivative of the spherical Bessel function of the first kind and order n.

SphericalBessY(n,x)

The sphericalBessY function returns the spherical Bessel function of the second kind and order n.

The first few orders are given by

SphericalBessYD(n,x)

The sphericalBessYD function returns the derivative of the spherical Bessel function of the second kind and order n.

SphericalHarmonics(L,M,t,f)

The sphericalHarmonics function returns the complex-valued spherical harmonics

where

is the associated Legendre function.

ZernikeR(n,m,r)

The ZernikeR function returns the Zernike radial polynomials of degree n that contains no power of r that is less than m. Here m is even or odd according to whether n is even or odd, and r is in the range [0,1]. Note that the full circle polynomials are complex. For any angle t (theta), they are given by: ZernikeR(n,m,r )*exp(it ).