Special functions

For more information about the functions see the documentation of GSL.

FunctionDescription
Ai(x)Airy function Ai(x)
Bi(x)Airy function Bi(x)
Ais(x)scaled version of the Airy function SAi(x)
Bis(x)scaled version of the Airy function SBi(x)
Aid(x)Airy function derivative Ai'(x)
Bid(x)Airy function derivative Bi'(x)
Aids(x)derivative of the scaled Airy function SAi(x)
Bids(x)derivative of the scaled Airy function SBi(x)
Ai0(s)s-th zero of the Airy function Ai(x)
Bi0(s)s-th zero of the Airy function Bi(x)
Aid0(s)s-th zero of the Airy function derivative Ai'(x)
Bid0(s)s-th zero of the Airy function derivative Bi'(x)
J0(x)regular cylindrical Bessel function of zeroth order, J0(x)
J1(x)regular cylindrical Bessel function of first order, J1(x)
Jn(n,x)regular cylindrical Bessel function of order n, Jn(x)
Y0(x)irregular cylindrical Bessel function of zeroth order, Y0(x)
Y1(x)irregular cylindrical Bessel function of first order, Y1(x)
Yn(n,x)irregular cylindrical Bessel function of order n, Yn(x)
I0(x)regular modified cylindrical Bessel function of zeroth order, I0(x)
I1(x)regular modified cylindrical Bessel function of first order, I1(x)
In(n,x)regular modified cylindrical Bessel function of order n, In(x)
I0s(x)scaled regular modified cylindrical Bessel function of zeroth order, exp (-|x|) I0(x)
I1s(x)scaled regular modified cylindrical Bessel function of first order, exp(-|x|) I1(x)
Ins(n,x)scaled regular modified cylindrical Bessel function of order n, exp(-|x|) In(x)
K0(x)irregular modified cylindrical Bessel function of zeroth order, K0(x)
K1(x)irregular modified cylindrical Bessel function of first order, K1(x)
Kn(n,x)irregular modified cylindrical Bessel function of order n, Kn(x)
K0s(x)scaled irregular modified cylindrical Bessel function of zeroth order, exp(x) K0(x)
K1s(x)scaled irregular modified cylindrical Bessel function of first order, exp(x) K1(x)
Kns(n,x)scaled irregular modified cylindrical Bessel function of order n, exp(x) Kn(x)
j0(x)regular spherical Bessel function of zeroth order, j0(x)
j1(x)regular spherical Bessel function of first order, j1(x)
j2(x)regular spherical Bessel function of second order, j2(x)
jl(l,x)regular spherical Bessel function of order l, jl(x)
y0(x)irregular spherical Bessel function of zeroth order, y0(x)
y1(x)irregular spherical Bessel function of first order, y1(x)
y2(x)irregular spherical Bessel function of second order, y2(x)
yl(l,x)irregular spherical Bessel function of order l, yl(x)
i0s(x)scaled regular modified spherical Bessel function of zeroth order, exp(-|x|) i0(x)
i1s(x)scaled regular modified spherical Bessel function of first order, exp(-|x|) i1(x)
i2s(x)scaled regular modified spherical Bessel function of second order, exp(-|x|) i2(x)
ils(l,x)scaled regular modified spherical Bessel function of order l, exp(-|x|) il(x)
k0s(x)scaled irregular modified spherical Bessel function of zeroth order, exp(x) k0(x)
k1s(x)scaled irregular modified spherical Bessel function of first order, exp(x) k1(x)
k2s(x)scaled irregular modified spherical Bessel function of second order, exp(x) k2(x)
kls(l,x)scaled irregular modified spherical Bessel function of order l, exp(x) kl(x)
Jnu(ν,x)regular cylindrical Bessel function of fractional order ν, Jν(x)
Ynu(ν,x)irregular cylindrical Bessel function of fractional order ν, Yν(x)
Inu(ν,x)regular modified Bessel function of fractional order ν, Iν(x)
Inus(ν,x)scaled regular modified Bessel function of fractional order ν, exp(-|x|) Iν(x)
Knu(ν,x)irregular modified Bessel function of fractional order ν, Kν(x)
lnKnu(ν,x)logarithm of the irregular modified Bessel function of fractional order ν,ln(Kν(x))
Knus(ν,x)scaled irregular modified Bessel function of fractional order ν, exp(|x|) Kν(x)
J0_0(s)s-th positive zero of the Bessel function J0(x)
J1_0(s)s-th positive zero of the Bessel function J1(x)
Jnu_0(nu,s)s-th positive zero of the Bessel function Jν(x)
clausen(x)Clausen integral Cl2(x)
hydrogenicR_1(Z,R)lowest-order normalized hydrogenic bound state radial wavefunction R1 := 2Z √Z exp(-Z r)
hydrogenicR(n,l,Z,R)n-th normalized hydrogenic bound state radial wavefunction
dawson(x)Dawson's integral
D1(x)first-order Debye function D1(x) = (1/x) ∫0x(t/(et - 1)) dt
D2(x)second-order Debye function D2(x) = (2/x2) ∫0x (t2/(et - 1)) dt
D3(x)third-order Debye function D3(x) = (3/x3) ∫0x (t3/(et - 1)) dt
D4(x)fourth-order Debye function D4(x) = (4/x4) ∫0x (t4/(et - 1)) dt
D5(x)fifth-order Debye function D5(x) = (5/x5) ∫0x (t5/(et - 1)) dt
D6(x)sixth-order Debye function D6(x) = (6/x6) ∫0x (t6/(et - 1)) dt
Li2(x)dilogarithm
Kc(k)complete elliptic integral K(k)
Ec(k)complete elliptic integral E(k)
F(phi,k)incomplete elliptic integral F(phi,k)
E(phi,k)incomplete elliptic integral E(phi,k)
P(phi,k,n)incomplete elliptic integral P(phi,k,n)
D(phi,k,n)incomplete elliptic integral D(phi,k,n)
RC(x,y)incomplete elliptic integral RC(x,y)
RD(x,y,z)incomplete elliptic integral RD(x,y,z)
RF(x,y,z)incomplete elliptic integral RF(x,y,z)
RJ(x,y,z)incomplete elliptic integral RJ(x,y,z,p)
erf(x)error function erf(x) = 2/√π ∫0x exp(-t2) dt
erfc(x)complementary error function erfc(x) = 1 - erf(x) = 2/√π ∫x exp(-t2) dt
log_erfc(x)logarithm of the complementary error function log(erfc(x))
erf_Z(x)Gaussian probability function Z(x) = (1/(2π)) exp(-x2/2)
erf_Q(x)upper tail of the Gaussian probability function Q(x) = (1/(2π)) ∫x exp(-t2/2) dt
hazard(x)hazard function for the normal distribution
exp(x)Exponential, base e
expm1(x)exp(x)-1
exp_mult(x,y)exponentiate x and multiply by the factor y to return the product y exp(x)
exprel(x)(exp(x)-1)/x using an algorithm that is accurate for small x
exprel2(x)2(exp(x)-1-x)/x2 using an algorithm that is accurate for small x
expreln(n,x)n-relative exponential, which is the n-th generalization of the functions `exprel'
E1(x)exponential integral E1(x), E1(x) := Re ∫1 exp(-xt)/t dt
E2(x)second-order exponential integral E2(x), E2(x) := Re ∫1 exp(-xt)/t2 dt
En(x)exponential integral E_n(x) of order n, En(x) := Re ∫1 exp(-xt)/tn dt)
Ei(x)exponential integral E_i(x), Ei(x) := PV(∫-x exp(-t)/t dt)
shi(x)Shi(x) = ∫0x sinh(t)/t dt
chi(x)integral Chi(x) := Re[ γE + log(x) + ∫0x (cosh[t]-1)/t dt ]
Ei3(x)exponential integral Ei3(x) = ∫0x exp(-t3) dt for x >= 0
si(x)Sine integral Si(x) = ∫0x sin(t)/t dt
ci(x)Cosine integral Ci(x) = -∫x cos(t)/t dt for x > 0
atanint(x)Arctangent integral AtanInt(x) = ∫0x arctan(t)/t dt
Fm1(x)complete Fermi-Dirac integral with an index of -1, F-1(x) = ex / (1 + ex)
F0(x)complete Fermi-Dirac integral with an index of 0, F0(x) = ln(1 + ex)
F1(x)complete Fermi-Dirac integral with an index of 1, F1(x) = ∫0 (t /(exp(t-x)+1)) dt
F2(x)complete Fermi-Dirac integral with an index of 2, F2(x) = (1/2) ∫0 (t2 /(exp(t-x)+1)) dt
Fj(j,x)complete Fermi-Dirac integral with an index of j, Fj(x) = (1/Γ(j+1)) ∫0 (tj /(exp(t-x)+1)) dt
Fmhalf(x)complete Fermi-Dirac integral F-1/2(x)
Fhalf(x)complete Fermi-Dirac integral F1/2(x)
F3half(x)complete Fermi-Dirac integral F3/2(x)
Finc0(x,b)incomplete Fermi-Dirac integral with an index of zero, F0(x,b) = ln(1 + eb-x) - (b-x)
lngamma(x)logarithm of the Gamma function
gammastar(x)regulated Gamma Function Γ*(x) for x > 0
gammainv(x)reciprocal of the gamma function, 1/Γ(x) using the real Lanczos method.
fact(n)factorial n!
doublefact(n)double factorial n!! = n(n-2)(n-4)...
lnfact(n)logarithm of the factorial of n, log(n!)
lndoublefact(n)logarithm of the double factorial log(n!!)
choose(n,m)combinatorial factor `n choose m' = n!/(m!(n-m)!)
lnchoose(n,m)logarithm of `n choose m'
taylor(n,x)Taylor coefficient xn / n! for x >= 0, n >= 0
poch(a,x)Pochhammer symbol (a)x := Γ(a + x)/Γ(x)
lnpoch(a,x)logarithm of the Pochhammer symbol (a)x := Γ(a + x)/Γ(x)
pochrel(a,x)relative Pochhammer symbol ((a,x) - 1)/x where (a,x) = (a)x := Γ(a + x)/Γ(a)
gammainc(a,x)incomplete Gamma Function Γ(a,x) = ∫x ta-1 exp(-t) dt for a > 0, x >= 0
gammaincQ(a,x)normalized incomplete Gamma Function P(a,x) = 1/Γ(a) ∫x ta-1 exp(-t) dt for a > 0, x >= 0
gammaincP(a,x)complementary normalized incomplete Gamma Function P(a,x) = 1/Γ(a) ∫0x ta-1 exp(-t) dt for a > 0, x >= 0
beta(a,b)Beta Function, B(a,b) = Γ(a) Γ(b)/Γ(a+b) for a > 0, b > 0
lnbeta(a,b)logarithm of the Beta Function, log(B(a,b)) for a > 0, b > 0
betainc(a,b,x)normalize incomplete Beta function B_x(a,b)/B(a,b) for a > 0, b > 0
C1(λ,x)Gegenbauer polynomial Cλ1(x)
C2(λ,x)Gegenbauer polynomial Cλ2(x)
C3(λ,x)Gegenbauer polynomial Cλ3(x)
Cn(n,λ,x)Gegenbauer polynomial Cλn(x)
hyperg_0F1(c,x)hypergeometric function 0F1(c,x)
hyperg_1F1i(m,n,x)confluent hypergeometric function 1F1(m,n,x) = M(m,n,x) for integer parameters m, n
hyperg_1F1(a,b,x)confluent hypergeometric function 1F1(a,b,x) = M(a,b,x) for general parameters a,b
hyperg_Ui(m,n,x)confluent hypergeometric function U(m,n,x) for integer parameters m,n
hyperg_U(a,b,x)confluent hypergeometric function U(a,b,x)
hyperg_2F1(a,b,c,x)Gauss hypergeometric function 2F1(a,b,c,x)
hyperg_2F1c(aR,aI,c,x)Gauss hypergeometric function 2F1(aR + i aI, aR - i aI, c, x) with complex parameters
hyperg_2F1r(aR,aI,c,x)renormalized Gauss hypergeometric function 2F1(a,b,c,x) / Γ(c)
hyperg_2F1cr(aR,aI,c,x)renormalized Gauss hypergeometric function 2F1(aR + i aI, aR - i aI, c, x) / Γ(c)
hyperg_2F0(a,b,x)hypergeometric function 2F0(a,b,x)
L1(a,x)generalized Laguerre polynomials La1(x)
L2(a,x)generalized Laguerre polynomials La2(x)
L3(a,x)generalized Laguerre polynomials La3(x)
W0(x)principal branch of the Lambert W function, W0(x)
Wm1(x)secondary real-valued branch of the Lambert W function, W-1(x)
P1(x)Legendre polynomials P1(x)
P2(x)Legendre polynomials P2(x)
P3(x)Legendre polynomials P3(x)
Pl(l,x)Legendre polynomials Pl(x)
Q0(x)Legendre polynomials Q0(x)
Q1(x)Legendre polynomials Q1(x)
Ql(l,x)Legendre polynomials Ql(x)
Plm(l,m,x)associated Legendre polynomial Plm(x)
Pslm(l,m,x)normalized associated Legendre polynomial √{(2l+1)/(4π)} √{(l-m)!/(l+m)!} Plm(x) suitable for use in spherical harmonics
Phalf(λ,x)irregular Spherical Conical Function P1/2-1/2 + i λ(x) for x > -1
Pmhalf(λ,x)regular Spherical Conical Function P-1/2-1/2 + i λ(x) for x > -1
Pc0(λ,x)conical function P0-1/2 + i λ(x) for x > -1
Pc1(λ,x)conical function P1-1/2 + i λ(x) for x > -1
Psr(l,λ,x)Regular Spherical Conical Function P-1/2-l-1/2 + i λ(x) for x > -1, l >= -1
Pcr(l,λ,x)Regular Cylindrical Conical Function P-m-1/2 + i λ(x) for x > -1, m >= -1
H3d0(λ,η)zeroth radial eigenfunction of the Laplacian on the 3-dimensional hyperbolic space, LH3d0(λ,,η) := sin(λ η)/(λ sinh(η)) for η >= 0
H3d1(λ,η)zeroth radial eigenfunction of the Laplacian on the 3-dimensional hyperbolic space, LH3d1(λ,η) := 1/√{λ2 + 1} sin(λ η)/(λ sinh(η)) (coth(η) - λ cot(λ η)) for η >= 0
H3d(l,λ,η)L'th radial eigenfunction of the Laplacian on the 3-dimensional hyperbolic space eta >= 0, l >= 0
logabs(x)logarithm of the magnitude of X, log(|x|)
logp(x)log(1 + x) for x > -1 using an algorithm that is accurate for small x
logm(x)log(1 + x) - x for x > -1 using an algorithm that is accurate for small x
psiint(n)digamma function ψ(n) for positive integer n
psi(x)digamma function ψ(n) for general x
psi1piy(y)real part of the digamma function on the line 1+i y, Re[ψ(1 + i y)]
psi1int(n)Trigamma function ψ'(n) for positive integer n
psi1(n)Trigamma function ψ'(x) for general x
psin(m,x)polygamma function ψ(m)(x) for m >= 0, x > 0
synchrotron1(x)first synchrotron function x ∫x K5/3(t) dt for x >= 0
synchrotron2(x)second synchrotron function x K2/3(x) for x >= 0
J2(x)transport function J(2,x)
J3(x)transport function J(3,x)
J4(x)transport function J(4,x)
J5(x)transport function J(5,x)
zetaint(n)Riemann zeta function ζ(n) for integer n
zeta(s)Riemann zeta function ζ(s) for arbitrary s
zetam1int(n)Riemann ζ function minus 1 for integer n
zetam1(s)Riemann ζ function minus 1
zetaintm1(s)Riemann ζ function for integer n minus 1
hzeta(s,q)Hurwitz zeta function ζ(s,q) for s > 1, q > 0
etaint(n)eta function η(n) for integer n
eta(s)eta function η(s) for arbitrary s