Error function

This nonelementary integral is a sigmoid function that occurs often in probability, statistics, and partial differential equations.

In statistics, for non-negative real values of x, the error function has the following interpretation: for a real random variable Y that is normally distributed with mean 0 and standard deviation

"[3] The error function complement was also discussed by Glaisher in a separate publication in the same year.

(the normal distribution), Glaisher calculates the probability of an error lying between p and q as:

When the results of a series of measurements are described by a normal distribution with standard deviation σ and expected value 0, then erf (⁠a/σ √2⁠) is the probability that the error of a single measurement lies between −a and +a, for positive a.

This is useful, for example, in determining the bit error rate of a digital communication system.

The integrand f = exp(−z2) and f = erf z are shown in the complex z-plane in the figures at right with domain coloring.

For x >> 1, however, cancellation of leading terms makes the Taylor expansion unpractical.

For iterative calculation of the above series, the following alternative formulation may be useful:

The imaginary error function has a very similar Maclaurin series, which is:

The derivative of the error function follows immediately from its definition:

An antiderivative of the error function, obtainable by integration by parts, is

An antiderivative of the imaginary error function, also obtainable by integration by parts, is

By keeping only the first two coefficients and choosing c1 = ⁠31/200⁠ and c2 = −⁠341/8000⁠, the resulting approximation shows its largest relative error at x = ±1.40587, where it is less than 0.0034361:

However, it can be extended to the disk |z| < 1 of the complex plane, using the Maclaurin series[8]

So we have the series expansion (common factors have been canceled from numerators and denominators):

[9] For any real x, Newton's method can be used to compute erfi−1 x, and for −1 ≤ x ≤ 1, the following Maclaurin series converges:

This series diverges for every finite x, and its meaning as asymptotic expansion is that for any integer N ≥ 1 one has

The asymptotic behavior of the remainder term, in Landau notation, is

For large enough values of x, only the first few terms of this asymptotic expansion are needed to obtain a good approximation of erfc x (while for not too large values of x, the above Taylor expansion at 0 provides a very fast convergence).

A continued fraction expansion of the complementary error function was found by Laplace:[10][11]

The complementary error function, denoted erfc, is defined as

which also defines erfcx, the scaled complementary error function[25] (which can be used instead of erfc to avoid arithmetic underflow[25][26]).

An extension of this expression for the erfc of the sum of two non-negative variables is as follows:[28]

The imaginary error function, denoted erfi, is defined as

where D(x) is the Dawson function (which can be used instead of erfi to avoid arithmetic overflow[25]).

The error function is essentially identical to the standard normal cumulative distribution function, denoted Φ, also named norm(x) by some software languages[citation needed], as they differ only by scaling and translation.

Consequently, the error function is also closely related to the Q-function, which is the tail probability of the standard normal distribution.

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 iterated integrals of the complementary error function are defined by[29]

Plot of the error function Erf(z) in the complex plane from -2-2i to 2+2i with colors created with Mathematica 13.1 function ComplexPlot3D
Plot of the error function Erf(z) in the complex plane from -2-2i to 2+2i with colors created with Mathematica 13.1 function ComplexPlot3D
Inverse error function
Plot of the complementary error function Erfc(z) in the complex plane from -2-2i to 2+2i with colors created with Mathematica 13.1 function ComplexPlot3D
Plot of the complementary error function Erfc(z) in the complex plane from -2-2i to 2+2i with colors created with Mathematica 13.1 function ComplexPlot3D
Plot of the imaginary error function Erfi(z) in the complex plane from -2-2i to 2+2i with colors created with Mathematica 13.1 function ComplexPlot3D
Plot of the imaginary error function Erfi(z) in the complex plane from -2-2i to 2+2i with colors created with Mathematica 13.1 function ComplexPlot3D
the normal cumulative distribution function plotted in the complex plane
the normal cumulative distribution function plotted in the complex plane