info prev up next book cdrom email home



\begin{figure}\begin{center}\BoxedEPSF{ErfReIm.epsf scaled 700}\end{center}\end{figure}

The ``error function'' encountered in integrating the Gaussian Distribution.

$\displaystyle \mathop{\rm erf}\nolimits (z)$ $\textstyle \equiv$ $\displaystyle {2\over\sqrt{\pi}} \int^z_0 e^{-t^2}\, dt$ (1)
  $\textstyle =$ $\displaystyle 1-\mathop{\rm erfc}\nolimits (z)$ (2)
  $\textstyle =$ $\displaystyle \sqrt{\pi}\, \gamma({\textstyle{1\over 2}}, z^2),$ (3)

where Erfc is the complementary error function and $\gamma(x,a)$ is the incomplete Gamma Function. It can also be defined as a Maclaurin Series
\mathop{\rm erf}\nolimits (z)={2\over\sqrt{\pi}}\sum_{n=0}^\infty {(-1)^nz^{2n+1}\over n!(2n+1)}.
\end{displaymath} (4)

Erf has the values
$\displaystyle \mathop{\rm erf}\nolimits (0)$ $\textstyle =$ $\displaystyle 0$ (5)
$\displaystyle \mathop{\rm erf}\nolimits (\infty)$ $\textstyle =$ $\displaystyle 1.$ (6)

It is an Odd Function
\mathop{\rm erf}\nolimits (-z)=-\mathop{\rm erf}\nolimits (z),
\end{displaymath} (7)

and satisfies
\mathop{\rm erf}\nolimits (z)+\mathop{\rm erfc}\nolimits (z) = 1.
\end{displaymath} (8)

Erf may be expressed in terms of a Confluent Hypergeometric Function of the First Kind $M$ as
\mathop{\rm erf}\nolimits (z)= {2z\over \sqrt{\pi}} M({\text...
...2z\over \sqrt{\pi}}e^{-z^2} M(1, {\textstyle{3\over 2}}, z^2).
\end{displaymath} (9)

Erf is bounded by
{1\over x+\sqrt{x^2+2}} < e^{x^2}\int_x^\infty e^{-t^2}\,dt \leq {1\over x+\sqrt{x^2+{4\over \pi}}}.
\end{displaymath} (10)

Its Derivative is
{d^n\over dz^n} \,\mathop{\rm erf}\nolimits (z) = (-1)^{n-1} {2\over \sqrt{\pi}} H_n(z)e^{-z^2},
\end{displaymath} (11)

where $H_n$ is a Hermite Polynomial. The first Derivative is
{d\over dz} \mathop{\rm erf}\nolimits (z)={2\over\sqrt{\pi}} e^{-z^2/2},
\end{displaymath} (12)

and the integral is
\int \mathop{\rm erf}\nolimits (z)\,dz = z\mathop{\rm erf}\nolimits (z)+{e^{-z^2}\over\sqrt{\pi}}.
\end{displaymath} (13)

For $x\ll 1$, erf may be computed from

$\displaystyle \mathop{\rm erf}\nolimits (x)$ $\textstyle =$ $\displaystyle {2\over \sqrt{\pi}} \int_0^x e^{-t^2}\,dt$ (14)
  $\textstyle =$ $\displaystyle {2\over \sqrt{\pi}}\int_0^x \sum_{k=0}^\infty {{(-t^2)}^k\over k!}\,dt$  
  $\textstyle =$ $\displaystyle {2\over\sqrt{\pi}} \int_0^x \sum_{k=0}^\infty {(-1)^kt^{2k}\over k!}\,dt$  
  $\textstyle =$ $\displaystyle {2\over\sqrt{\pi}} \sum_{k=0}^\infty {x^{2k+1}(-1)^k\over k!(2k+1)}$ (15)
  $\textstyle =$ $\displaystyle {2\over\sqrt{\pi}} (x-{\textstyle{1\over 3}}x^3+{\textstyle{1\over 10}}x^5-{\textstyle{1\over 42}}x^7+{\textstyle{1\over 216}}x^9$  
  $\textstyle \phantom{=}$ $\displaystyle -{\textstyle{1\over 1320}}x^{11}+\ldots)$ (16)
  $\textstyle =$ $\displaystyle {2\over\sqrt{\pi}} e^{-x^2}x \left[{1+{2x^2\over 1\cdot 3}+{(2x)^2\over 1\cdot 3\cdot 5}+\ldots}\right]$ (17)

(Acton 1990). For $x\gg 1$,
$\displaystyle \mathop{\rm erf}\nolimits (x)$ $\textstyle =$ $\displaystyle {2\over \sqrt{\pi}}\left({\int_0^\infty e^{-t^2}\,dt -\int_x^\infty e^{-t^2}\,dt}\right)$  
  $\textstyle =$ $\displaystyle 1-{2\over \sqrt{\pi}} \int_x^\infty e^{-t^2}\,dt.$ (18)

Using Integration by Parts gives
$\displaystyle \int_x^\infty e^{-t^2}\,dt$ $\textstyle =$ $\displaystyle -{1\over 2}\int_x^\infty {1\over t}d(e^{-t^2})$  
  $\textstyle =$ $\displaystyle -{1\over 2}\left[{e^{-t^2}\over t}\right]^\infty_x -{1\over 2}\int_x^\infty {e^{-t^2}\,dt\over t^2}$  
  $\textstyle =$ $\displaystyle {e^{-x^2}\over 2x} +{1\over 4}\int_x^\infty {1\over t^3}d(e^{-t^2})$  
  $\textstyle =$ $\displaystyle {e^{-x^2}\over 2x} - {e^{-x^2}\over 4x^3}-\ldots,$ (19)

\mathop{\rm erf}\nolimits (x) = 1-{e^{-x^2}\over \sqrt{\pi}\,x} \left({1-{1\over 2x^2}-\ldots}\right)
\end{displaymath} (20)

and continuing the procedure gives the Asymptotic Series

\mathop{\rm erf}\nolimits (x)=1-{e^{-x^2}\over\sqrt{\pi}}(x^...
...yle{15\over 8}}x^{-7}+{\textstyle{105\over 16}}x^{-9}+\ldots).
\end{displaymath} (21)

A Complex generalization of $\mathop{\rm erf}\nolimits $ is defined as

$\displaystyle w(z)$ $\textstyle \equiv$ $\displaystyle e^{-z^2}\mathop{\rm erfc}\nolimits (-iz)$ (22)
  $\textstyle =$ $\displaystyle e^{-z^2} \left({1+{2i\over \sqrt{\pi}} + {2i\over \sqrt{\pi}} \int_0^z e^{t^2}\,dt}\right)$ (23)
  $\textstyle =$ $\displaystyle {i\over \pi} \int_{-\infty}^\infty {e^{-t^2}\,dt\over z-t} = {2iz\over \pi}\int_0^\infty {e^{-t^2}\,dt\over z^2-t^2}.$ (24)

See also Dawson's Integral, Erfc, Erfi, Gaussian Integral, Normal Distribution Function, Probability Integral


Abramowitz, M. and Stegun, C. A. (Eds.). ``Error Function'' and ``Repeated Integrals of the Error Function.'' §7.1-7.2 in Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables, 9th printing. New York: Dover, pp. 297-300, 1972.

Acton, F. S. Numerical Methods That Work, 2nd printing. Washington, DC: Math. Assoc. Amer., p. 16, 1990.

Arfken, G. Mathematical Methods for Physicists, 3rd ed. Orlando, FL: Academic Press, pp. 568-569, 1985.

Spanier, J. and Oldham, K. B. ``The Error Function $\mathop{\rm erf}\nolimits (x)$ and Its Complement $\mathop{\rm erfc}\nolimits (x)$.'' Ch. 40 in An Atlas of Functions. Washington, DC: Hemisphere, pp. 385-393, 1987.

info prev up next book cdrom email home

© 1996-9 Eric W. Weisstein