The error function erfx is a special function defined by integrating the Gaussian1.
erfx=π2∫0xe−t2dt
The factor π2 in front is a normalizing constant, chosen so that the value approaches exactly 1 as x→∞. It is fixed by the Gaussian integral ∫0∞e−t2dt=2π.
Domain and range
The domain is all real numbers
The range is the open interval (−1,1)
It increases monotonically
It is an odd function
The integrand e−t2 is always positive, so the function increases monotonically.
Symmetry
The integrand is even, so the integral is odd. That is, erf(−x)=−erf(x), and the graph has point symmetry about the origin.
Monotonicity and slope
By the fundamental theorem of calculus the derivative is the Gaussian itself.
dxderfx=π2e−x2
It is always positive, so the function increases over the whole line. The slope is steepest at the origin, where it is π2≈1.128.
How fast it converges
x
erfx
0.5
≈0.5205
1
≈0.8427
2
≈0.9953
3
≈0.99998
It has two horizontal asymptotes, y=±1. The tails decay like e−x2, so the convergence is very fast: by x=3 the gap to 1 is already below 10−5.
Inflection point
The second derivative is −π4xe−x2, whose sign changes at x=0, so the origin is the only inflection point. The curve turns there from concave up to concave down.
Relations to other functions
It is tied to the distribution function Φ(x) of the standard normal by the following.
Φ(x)=21(1+erf2x)
The 2 appears because of a difference in the definitions: erf uses e−t2 while the normal distribution uses e−t2/2. The quantity 1−erfx is called the complementary error function erfcx, used when the probability in a tail has to be handled accurately.
Series expansion
erfx=π2(x−3x3+10x5−⋯)
It converges for every real number, but for large x the terms swell badly along the way, so practical computation uses an asymptotic expansion or a rational approximation2.
Applications and history
As the name suggests, it grew out of the theory of observational error. Having no expression in elementary functions, it is treated as a special function in its own right.
Probability calculations with the normal distribution
Solutions of the heat and diffusion equations
The evaluation of the error rate of a communication channel