# 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:

$\frac{{e}^{xt}}{{e}^{t}-1}=\sum _{n=0}^{\infty }{B}_{n}\left(x\right)\cdot \frac{{t}^{n-1}}{n!}$

`bernoulli(n)`

`bernoulli(n,t)`

`bernoulli``(n)`

`bernoulli``(n,t)`

$n\ge 0$

$0<|t|<2\pi$

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\left(x,y\right)=\frac{\Gamma \left(x\right)\cdot \Gamma \left(y\right)}{\Gamma \left(x+y\right)}$

`Beta(x,y)`

`beta``(x,y)`

Binomial coefficients

$\left(\frac{m}{n}\right)=\frac{m!}{n!\left(m-n\right)!}$

$=\frac{\Gamma \left(m+1\right)}{\Gamma \left(n+1\right)\Gamma \left(m-n+1\right)}$

`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={k}^{2}={\mathrm{sin}}^{2}\alpha$.

`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={k}^{2}={\mathrm{sin}}^{2}\alpha$.

`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\left(z\right)=\frac{2}{\sqrt{\pi }}\cdot \underset{z}{\overset{\infty }{\int }}{e}^{-t}{}^{{}^{2}}dt=1-erf\left(z\right)$

$erfc\left(-1,z\right)=\frac{2}{\sqrt{\pi }}\cdot {e}^{-{z}^{2}}$

$erfc\left(n,z\right)=\underset{z}{\overset{\infty }{\int }}erfc\left(n-1,t\right)dt$

`erfc(z)`

`erfc(n,z)`

`erfc``(z)`

`erfc``(n,z)`

n > 0

Dawson's integral

$F\left(x\right)={e}^{-{x}^{2}}\cdot \underset{0}{\overset{x}{\int }}{e}^{{t}^{2}}dt$

`dawson(x)`

`dawson``(x)`

Digamma function

$\Psi \left(x\right)=\frac{d}{dx}\mathrm{ln}\left(\Gamma \left(x\right)\right)=\frac{{\Gamma }^{\prime }\left(x\right)}{\Gamma \left(x\right)}$

`Psi(x)`

`psi``(x)`

Dilogarithm integral

$f\left(x\right)=\underset{1}{\overset{x}{\int }}\frac{\mathrm{ln}\left(t\right)}{1-t}dt$

`dilog(x)`

`dilog``(x)`

x > 1

Error function

$erf\left(z\right)=\frac{2}{\sqrt{\pi }}\underset{0}{\overset{z}{\int }}{e}^{-{t}^{2}}dt$

`erf(z)`

`erf``(z)`

Euler numbers and polynomials

Generating function for Euler numbers:

$\frac{1}{\mathrm{cosh}\left(t\right)}=\sum _{n=0}^{\infty }{E}_{n}\frac{{t}^{n}}{n!}$

`euler(n)`

`euler(n,z)`

`euler``(n)`

`euler``(n,z)`

n ≥ 0

$|t|<\frac{\pi }{2}$

Exponential integrals

$Ei\left(n,z\right)=\underset{1}{\overset{\infty }{\int }}\frac{{e}^{-zt}}{{t}^{n}}dt$

$Ei\left(x\right)=PV\left(-\underset{-\infty }{\overset{x}{\int }}\frac{{e}^{t}}{t}\right)$

`Ei(n,z)`

`Ei(x)`

`expint``(n,x)`

`ei``(x)`

n ≥ 0

Real(z) > 0

Fresnel sine and cosine integrals

$C\left(x\right)=\underset{0}{\overset{x}{\int }}\mathrm{cos}\left(\frac{\pi }{2}{t}^{2}\right)dt$

$S\left(x\right)=\underset{0}{\overset{x}{\int }}\mathrm{sin}\left(\frac{\pi }{2}{t}^{2}\right)dt$

`FresnelC(x)`

`FresnelS(x)`

`fresnelc``(x)`

`fresnels``(x)`

Gamma function

$\Gamma \left(z\right)=\underset{0}{\overset{\infty }{\int }}{t}^{z-1}{e}^{-t}dt$

`GAMMA(z)`

`gamma``(z)`

Harmonic function

$h\left(n\right)=\sum _{k=1}^{n}\frac{1}{k}=\Psi \left(n+1\right)+\gamma$

`harmonic(n)`

`harmonic``(n)`

n > 0

Hyperbolic sine and cosine integrals

$Shi\left(z\right)=\underset{0}{\overset{z}{\int }}\frac{\mathrm{sinh}\left(t\right)}{t}dt$

$Chi\left(z\right)=\gamma +\mathrm{ln}\left(z\right)+\underset{0}{\overset{z}{\int }}\frac{\mathrm{cosh}\left(t\right)-1}{t}dt$

`Shi(z)`

`Chi(z)`

`sinhint``(z)`

`coshint``(z)`

(Generalized) hypergeometric function

$F\left(n,d,z\right)=\sum _{k=0}^{\infty }\frac{\prod _{i=1}^{j}\frac{\Gamma \left({n}_{i}+k\right)}{\Gamma \left({n}_{i}\right)}\cdot {z}^{k}}{\prod _{i=1}^{m}\frac{\Gamma \left({d}_{i}+k\right)}{\Gamma \left({d}_{i}\right)}\cdot 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={k}^{2}={\mathrm{sin}}^{2}\alpha$.

`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

$\Gamma \left(a,z\right)=\underset{z}{\overset{\infty }{\int }}{e}^{-t}\cdot {t}^{a-1}dt$

`GAMMA(z1,z2)`

`z1` = a
`z2` = z

`igamma``(z1,z2)`

`z1` = a
`z2` = z

Logarithm of the gamma function

$\mathrm{lnGAMMA}\left(z\right)=\mathrm{ln}\left(\Gamma \left(z\right)\right)$

`lnGAMMA(z)`

`gammaln``(z)`

Logarithmic integral

$Li\left(x\right)=PV\left\{\underset{0}{\overset{x}{\int }}\frac{dt}{\mathrm{ln}t}\right\}=Ei\left(\mathrm{ln}x\right)$

`Li(x)`

`logint``(x)`

x > 1

Polygamma function

${\Psi }^{\left(n\right)}\left(z\right)=\frac{{d}^{n}}{dz}\Psi \left(z\right)$

where $\Psi \left(z\right)$ is the Digamma function.

`Psi(n,z)`

`psi``(n,z)`

n ≥ 0

Shifted sine integral

$Ssi\left(z\right)=Si\left(z\right)-\frac{\pi }{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)`

## 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.