Error function
From Wikipedia, the free encyclopedia
In mathematics, the error function (also called the Gauss error function) is a non-elementary function which occurs in probability, statistics and partial differential equations. It is defined as:
The complementary error function, denoted erfc, is defined in terms of the error function:
The complex error function, denoted w(x), (also known as the Faddeeva function) is also defined in terms of the error function:
Contents |
[edit] Properties
The error function is odd:
Also, for any complex number x one has
where x * is the complex conjugate of x.
The integral cannot be evaluated in closed form in terms of elementary functions, but by expanding the integrand in a Taylor series, one obtains the Taylor series for the error function as follows:
which holds for every real number x, and also throughout the complex plane. This result arises from the Taylor series expansion of
which is
and is then integrated term by term. The denominator terms are sequence A007680 in the OEIS.
For iterative calculation of the above series, the following alternate formulation may be useful:
because
expresses the multiplier to turn the ith term into the (i+1)th term (assuming we number the "x" as the first term).
The error function at infinity is exactly 1 (see Gaussian integral).
The derivative of the error function follows immediately from its definition:
The inverse error function has series
where c0 = 1 and
So we have the series expansion (note that common factors have been canceled from numerators and denominators):
(After cancellation the numerator/denominator fractions are entries A092676/A132467 in the OEIS; without cancellation the numerator terms are given in entry A002067.)
Note that error function's value at plus/minus infinity is equal to plus/minus 1.
[edit] Applications
When the results of a series of measurements are described by a normal distribution with standard deviation σ and expected value 0, then
is the probability that the error of a single measurement lies between −a and +a, for positive a.
The error and complementary error functions occur, for example, in solutions of the heat equation when boundary conditions are given by the Heaviside step function.
In digital optical communication system, BER is expressed by:
[edit] Asymptotic expansion
A useful asymptotic expansion of the complementary error function (and therefore also of the error function) for large x is
This series diverges for every finite x. However, in practice only the first few terms of this expansion are needed to obtain a good approximation of erfc(x), whereas the Taylor series given above converges very slowly.
Another approximation is given by
where
[edit] Related functions
The error function is essentially identical to the standard normal cumulative distribution function, denoted Φ, as they differ only by scaling and translation. Indeed,
The inverse of
is known as the normal quantile function, or probit function and may be expressed in terms of the inverse error function as
The standard normal cdf is used more often in probability and statistics, and the error function is used more often in other branches of mathematics.
The error function is a special case of the Mittag-Leffler function, and can also be expressed as a confluent hypergeometric function (Kummer's function):
It has a simple expression in terms of the Fresnel integral. In terms of the Regularized Gamma function P and the incomplete gamma function,
is the sign function.
[edit] Generalised error functions
Some authors discuss the more general functions
Notable cases are:
- E0(x) is a straight line through the origin:

- E2(x) is the error function, erf(x).
After division by n!, all the En for odd n look similar (but not identical) to each other. Similarly, the En for even n look similar (but not identical) to each other after a simple division by n!. All generalised error functions for n>0 look similar on the positive x side of the graph.
These generalised functions can equivalently be expressed for x>0 using the Gamma function:
Therefore, we can define the error function in terms of the Gamma function:
[edit] Iterated integrals of the complementary error function
The iterated integrals of the complementary error function are defined by
They have the power series
from which follow the symmetry properties
and
[edit] Implementation
C/C++: It is provided by C99 as the functions double erf(double x) and double erfc(double x) in the header math.h or cmath. The pairs of functions {erff(),erfcf()} and {erfl(),erfcl()} take and return values of type float and long double respectively. GCC makes these functions available in C++ too.
Fortran: E.g. gfortran provides the intrinsic real function ERF(X) and the double precision function DERF(X).
[edit] See also
[edit] References
- Milton Abramowitz and Irene A. Stegun, eds. Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables. New York: Dover, 1972. (See Chapter 7)












![\mathrm{erfc}(x) = \frac{e^{-x^2}}{x\sqrt{\pi}}\left [1+\sum_{n=1}^\infty (-1)^n \frac{1\cdot3\cdot5\cdots(2n-1)}{(2x^2)^n}\right ]=\frac{e^{-x^2}}{x\sqrt{\pi}}\sum_{n=0}^\infty (-1)^n \frac{(2n)!}{n!(2x)^{2n}}.\,](../../../../math/9/e/f/9ef17d31264a82a34acaa8d63c6806cf.png)


![\Phi(x) = \frac{1}{2}\left[1+\mbox{erf}\left(\frac{x}{\sqrt{2}}\right)\right]=\frac{1}{2}\,\mbox{erfc}\left(-\frac{x}{\sqrt{2}}\right).](../../../../math/8/4/5/845d7c679104f78205d9d1a768c27f5e.png)












