Gamma, GammaNum , Zeta, ZetaNum , Bernoulli, BernoulliArray , LambertW, LambertWNum .

Special functions

In this chapter, special and transcendental mathematical functions are described.

Gamma, GammaNum Euler's Gamma function
Zeta, ZetaNum Riemann's Zeta function
Bernoulli, BernoulliArray Bernoulli numbers and polynomials
LambertW, LambertWNum Lambert's W function


Gamma, GammaNum -- Euler's Gamma function

Standard library
Calling format:
Gamma(x)
GammaNum(number)

Parameters:
x -- expression

number -- expression that can be evaluated to a number

Description:
Gamma(x) is an interface to Euler's Gamma function Gamma(x). It returns exact values on integer and half-integer arguments. GammaNum(x) or equivalently N(Gamma(x) takes a numeric parameter and always returns a floating-point number in the current precision.

Examples:
In> Precision(30)
Out> True;
In> Gamma(1.3)
Out> Gamma(1.3);
In> N(%)
Out> 0.897470696306277188493754954771;
In> Gamma(1.5)
Out> Sqrt(Pi)/2;
In> GammaNum(1.5);
Out> 0.88622692545275801364908374167;

See also:
! , N .


Zeta, ZetaNum -- Riemann's Zeta function

Standard library
Calling format:
Zeta(x)
ZetaNum(number)

Parameters:
x -- expression

number -- expression that can be evaluated to a number

Description:
Zeta(x) is an interface to Riemann's Zeta function zeta(s). It returns exact values on integer and half-integer arguments. ZetaNum(x) or equivalently N(Zeta(x) takes a numeric parameter and always returns a floating-point number in the current precision.

Examples:
In> Precision(30)
Out> True;
In> Zeta(1)
Out> Infinity;
In> Zeta(1.3)
Out> Zeta(1.3);
In> N(%)
Out> 3.93194921180954422697490751058798;
In> Zeta(2)
Out> Pi^2/6;
In> ZetaNum(2);
Out> 1.64493406684822643647241516664602;

See also:
! , N .


Bernoulli, BernoulliArray -- Bernoulli numbers and polynomials

Standard library
Calling format:
Bernoulli(index)
BernoulliArray(index)
Bernoulli(index, x)

Parameters:
x -- expression that will be the variable in the polynomial

index -- expression that can be evaluated to an integer

Description:
Bernoulli(n) evaluates the n-th Bernoulli number. Bernoulli(n, x) returns the n-th Bernoulli polynomial in the variable x. The polynomial is returned in the Horner form.

An auxiliary function BernoulliArray(n) might be useful too: it returns an array (of type GenericArray) of Bernoulli numbers up to n. The array is 1-based, so that the n-th Bernoulli number is BernoulliArray(n)[n+1].

Example:
In> Bernoulli(20);
Out> -174611/330;
In> Bernoulli(4, x);
Out> ((x-2)*x+1)*x^2-1/30;

See also:
Gamma , Zeta .


LambertW, LambertWNum -- Lambert's W function

Standard library
Calling format:
LambertW(x)
LambertWNum(x)
Parameters:
x -- expression, argument of the function

Description:
Lambert's W function is (a multiple-valued, complex function) defined for any (complex) z by

W(z)*Exp(W(z))=z.

This function is sometimes useful to represent solutions of transcendental equations. For example, the equation Ln(x)=3*x can be "solved" by writing x= -3*W(-1/3). It is also possible to take a derivative or integrate this function "explicitly".

For real arguments x, W(x) is real if x>= -Exp(-1).

LambertWNum is an auxiliary function that computes the numerical value of the principal branch of Lambert's W function for real arguments x>= -Exp(-1) to current precision.

Examples:
In> LambertW(0)
Out> 0;
In> N(LambertW(-0.24/Sqrt(3*Pi)))
Out> -0.0851224014;

See also:
Exp .