Special functions in LaTeX are written with Greek letters or upright names. The Gamma function is \Gamma(z), the Riemann zeta function \zeta(s), the digamma function \psi(x) and the Dirac delta \delta(x). Functions named by Latin letters should be upright: there is no built-in \erf, so write \operatorname{erf}(x) or declare it once with \DeclareMathOperator from amsmath. Bessel functions and orthogonal polynomials are indexed letters such as J_n(x) and P_n(x), and the hypergeometric function is {}_2F_1(a, b; c; z). The table lists the special functions people use most, with the package each one needs; the full list follows below.
| Symbol | Command | Use | Package | Copy |
|---|---|---|---|---|
\Gamma(z) | Gamma function | built in | ||
\mathrm{B}(x, y) | Beta function (upright capital B) | built in | ||
\zeta(s) | Riemann zeta function | built in | ||
\operatorname{erf}(x) | Error function | amsmath | ||
\operatorname{erfc}(x) | Complementary error function | amsmath | ||
J_n(x) | Bessel function of the first kind | built in | ||
Y_n(x) | Bessel function of the second kind | built in | ||
P_n(x) | Legendre polynomial | built in | ||
H_n(x) | Hermite polynomial | built in | ||
{}_2F_1(a, b; c; z) | Gauss hypergeometric function | built in | ||
\psi(x) | Digamma function | built in | ||
\delta(x) | Dirac delta | built in |
If you use a function often, declare it in the preamble so it prints upright with operator spacing everywhere:
\usepackage{amsmath}
\DeclareMathOperator{\erf}{erf}
\DeclareMathOperator{\erfc}{erfc}\Gamma(z)B(x, y)\zeta(s)\text{erf}(x)\text{erfc}(x)J_n(x)Y_n(x)I_n(x)K_n(x)P_n(x)Q_n(x)H_n(x)L_n(x)T_n(x)U_n(x){}_2F_1(a,b;c;z)\psi(x)\psi^{(n)}(x)\delta(x)H(x)