mfunlist

List special functions for use with mfun

mfun will be removed in a future release. Instead, use the appropriate special function syntax listed below. For example, use bernoulli(n) instead of mfun('bernoulli',n).

Syntax

mfunlist

Description

mfunlist lists the special mathematical functions for use with the mfun function. The following tables describe these special functions.

Syntax and Definitions of mfun Special Functions

The following conventions are used in the next table, unless otherwise indicated in the Arguments column.

x, y

real argument

z, z1, z2

complex argument

m, n

integer argument

mfun Special Functions

Function Name

Definition

mfun Name

Special Function Syntax

Arguments

Bernoulli numbers and polynomials

Generating functions:

extet1=n=0Bn(x)tn1n!

bernoulli(n)

bernoulli(n,t)

bernoulli(n)

bernoulli(n,t)

n0

0<|t|<2π

Bessel functions

BesselI, BesselJ—Bessel functions of the first kind.
BesselK, BesselY—Bessel functions of the second kind.

BesselJ(v,x)

BesselY(v,x)

BesselI(v,x)

BesselK(v,x)

besselj(v,x)

bessely(v,x)

besseli(v,x)

besselk(v,x)

v is real.

Beta function

B(x,y)=Γ(x)Γ(y)Γ(x+y)

Beta(x,y)

beta(x,y)

 

Binomial coefficients

(mn)=m!n!(mn)!

=Γ(m+1)Γ(n+1)Γ(mn+1)

binomial(m,n)

nchoosek(m,n)

 

Complete elliptic integrals

Legendre's complete elliptic integrals of the first, second, and third kind. This definition uses modulus k. The numerical ellipke function and the MuPAD® functions for computing elliptic integrals use the parameter m=k2=sin2α.

EllipticK(k)

EllipticE(k)

EllipticPi(a,k)

ellipticK(k)

ellipticE(k)

ellipticPi(a,k)

a is real, –∞ < a < ∞.

k is real, 0 < k < 1.

Complete elliptic integrals with complementary modulus

Associated complete elliptic integrals of the first, second, and third kind using complementary modulus. This definition uses modulus k. The numerical ellipke function and the MuPAD functions for computing elliptic integrals use the parameter m=k2=sin2α.

EllipticCK(k)

EllipticCE(k)

EllipticCPi(a,k)

ellipticCK(k)

ellipticCE(k)

ellipticCPi(a,k)

a is real, –∞ < a < ∞.

k is real, 0 < k < 1.

Complementary error function and its iterated integrals

erfc(z)=2πzet2dt=1erf(z)

erfc(1,z)=2πez2

erfc(n,z)=zerfc(n1,t)dt

erfc(z)

erfc(n,z)

erfc(z)

erfc(n,z)

n > 0

Dawson's integral

F(x)=ex20xet2dt

dawson(x)

dawson(x)

 

Digamma function

Ψ(x)=ddxln(Γ(x))=Γ(x)Γ(x)

Psi(x)

psi(x)

 

Dilogarithm integral

f(x)=1xln(t)1tdt

dilog(x)

dilog(x)

x > 1

Error function

erf(z)=2π0zet2dt

erf(z)

erf(z)

 

Euler numbers and polynomials

Generating function for Euler numbers:

1cosh(t)=n=0Entnn!

euler(n)

euler(n,z)

euler(n)

euler(n,z)

n ≥ 0

|t|<π2

Exponential integrals

Ei(n,z)=1ezttndt

Ei(x)=PV(xett)

Ei(n,z)

Ei(x)

expint(n,x)

ei(x)

n ≥ 0

Real(z) > 0

Fresnel sine and cosine integrals

C(x)=0xcos(π2t2)dt

S(x)=0xsin(π2t2)dt

FresnelC(x)

FresnelS(x)

fresnelc(x)

fresnels(x)

 

Gamma function

Γ(z)=0tz1etdt

GAMMA(z)

gamma(z)

 

Harmonic function

h(n)=k=1n1k=Ψ(n+1)+γ

harmonic(n)

harmonic(n)

n > 0

Hyperbolic sine and cosine integrals

Shi(z)=0zsinh(t)tdt

Chi(z)=γ+ln(z)+0zcosh(t)1tdt

Shi(z)

Chi(z)

sinhint(z)

coshint(z)

 

(Generalized) hypergeometric function

F(n,d,z)=k=0i=1jΓ(ni+k)Γ(ni)zki=1mΓ(di+k)Γ(di)k!

where j and m are the number of terms in n and d, respectively.

hypergeom(n,d,x)

where

n = [n1,n2,...]

d = [d1,d2,...]

hypergeom(n,d,x)

where

n = [n1,n2,...]

d = [d1,d2,...]

n1,n2,... are real.

d1,d2,... are real and nonnegative.

Incomplete elliptic integrals

Legendre's incomplete elliptic integrals of the first, second, and third kind. This definition uses modulus k. The numerical ellipke function and the MuPAD functions for computing elliptic integrals use the parameter m=k2=sin2α.

EllipticF(x,k)

EllipticE(x,k)

EllipticPi(x,a,k)

ellipticF(x,k)

ellipticF(x,k)

ellipticPi(x,a,k)

0 < x ≤ ∞.

a is real, –∞ < a < ∞.

k is real, 0 < k < 1.

Incomplete gamma function

Γ(a,z)=zetta1dt

GAMMA(z1,z2)

z1 = a
z2 = z

igamma(z1,z2)

z1 = a
z2 = z

 

Logarithm of the gamma function

lnGAMMA(z)=ln(Γ(z))

lnGAMMA(z)

gammaln(z)

 

Logarithmic integral

Li(x)=PV{0xdtlnt}=Ei(lnx)

Li(x)

logint(x)

x > 1

Polygamma function

Ψ(n)(z)=dndzΨ(z)

where Ψ(z) is the Digamma function.

Psi(n,z)

psi(n,z)

n ≥ 0

Shifted sine integral

Ssi(z)=Si(z)π2

Ssi(z)

ssinint(z)

 

The following orthogonal polynomials are available using mfun. In all cases, n is a nonnegative integer and x is real.

Orthogonal Polynomials

Polynomial

mfun Name

Special Function Syntax

Arguments

Chebyshev of the first and second kind

T(n,x)

U(n,x)

chebyshevT(n,x)

chebyshevU(n,x)

 

Gegenbauer

G(n,a,x)

gegenbauerC(n,a,x)

a is a nonrational algebraic expression or a rational number greater than -1/2.

Hermite

H(n,x)

hermiteH(n,x)

 

Jacobi

P(n,a,b,x)

jacobiP(n,a,b,x)

a, b are nonrational algebraic expressions or rational numbers greater than -1.

Laguerre

L(n,x)

laguerreL(n,x)

 

Generalized Laguerre

L(n,a,x)

laguerreL(n,a,x)

a is a nonrational algebraic expression or a rational number greater than -1.

Legendre

P(n,x)

legendreP(n,x)

 

Examples

mfun('H',5,10)
ans =
     3041200
mfun('dawson',3.2)
ans =
    0.1655

Limitations

In general, the accuracy of a function will be lower near its roots and when its arguments are relatively large.

Running time depends on the specific function and its parameters. In general, calculations are slower than standard MATLAB® calculations.

References

[1] Abramowitz, M. and I.A., Stegun, Handbook of Mathematical Functions With Formulas, Graphs, and Mathematical Tables. New York: Dover, 1972.

See Also

Was this topic helpful?