Erf
Details
- Mathematical function, suitable for both symbolic and numerical manipulation.
- Erf[z] is the integral of the Gaussian distribution, given by
. - Erf[z0,z1] is given by
. - Erf[z] is an entire function of z with no branch cut discontinuities.
- For certain special arguments, Erf automatically evaluates to exact values.
- Erf can be evaluated to arbitrary numerical precision.
- Erf automatically threads over lists.
- Erf can be used with Interval and CenteredInterval objects. »
Examples
open all close allBasic Examples (5)
Erf[0.95]Plot over a subset of the reals:
Plot[Erf[x], {x, -5, 5}]Plot over a subset of the complexes:
ComplexPlot3D[Erf[z], {z, -2 - 2I, 2 + 2I}, PlotLegends -> Automatic]Series expansion at the origin:
Series[Erf[x], {x, 0, 10}]Series expansion at Infinity:
Series[Erf[x], {x, ∞, 5}]//NormalScope (40)
Numerical Evaluation (6)
{Erf[1.5], Erf[1.5, 2]}N[Erf[3 / 2], 50]The precision of the output tracks the precision of the input:
Erf[1.5000000000000000000000000000]Evaluate for complex arguments:
Erf[1.5 - I]Evaluate Erf efficiently at high precision:
Erf[1.2`500]//TimingErf[1.2`5000];//TimingCompute worst-case guaranteed intervals using Interval and CenteredInterval objects:
Erf[Interval[{-2.1, -1.9}]]Erf[2, Interval[{1.4, 1.5}]]Erf[CenteredInterval[2, 1 / 2]]Erf[1, CenteredInterval[2, 1 / 3]]Or compute average-case statistical intervals using Around:
Erf[ Around[2, 0.01]]Compute the elementwise values of an array:
Erf[{{0 , I π / 2}, {I π / 2, 0}}]Or compute the matrix Erf function using MatrixFunction:
MatrixFunction[Erf, {{0, I π / 2}, {I π / 2, 0}}]Specific Values (3)
Simple exact values are generated automatically:
Erf[0]Erf[{Infinity, -Infinity, I Infinity, -I Infinity}]Erf[-Infinity, Infinity]Find the zero of Erf:
xzero = Solve[Erf[x] == 0 && -1 < x < 1, x][[1, 1, 2]]Plot[Erf[x], {x, -1.5, 1.5}, Epilog -> Style[Point[{xzero, Erf[xzero]}], PointSize[Large], Red]]Visualization (2)
Plot the Erf function:
Plot[Erf[x], {x, -3, 3}]ComplexContourPlot[Re[Erf[z]], {z, -2 - 2 I, 2 + 2 I}, Contours -> 20]ComplexContourPlot[Im[Erf[z]], {z, -2 - 2 I, 2 + 2 I}, Contours -> 20]Function Properties (10)
Erf is defined for all real and complex values:
FunctionDomain[Erf[x], x]FunctionDomain[Erf[z], z, Complexes]Erf takes all real values between –1 and 1:
FunctionRange[Erf[x], x, y]Erf is an odd function:
Erf[-x] == -Erf[x]Erf has the mirror property
:
FullSimplify[Erf[Conjugate[z]] == Conjugate[Erf[z]]]Erf is an analytic function of x:
FunctionAnalytic[Erf[x], x]It has no singularities or discontinuities:
FunctionSingularities[Erf[x], x]FunctionDiscontinuities[Erf[x], x]Erf is nondecreasing:
FunctionMonotonicity[Erf[x], x]Erf is injective:
FunctionInjective[Erf[x], x]Plot[{Erf[x], .5}, {x, -5, 5}]Erf is not surjective:
FunctionSurjective[Erf[x], x]Plot[{Erf[x], -2}, {x, -10, 10}]Erf is neither non-negative nor non-positive:
FunctionSign[Erf[x], x]Erf is neither convex nor concave:
FunctionConvexity[Erf[x], x]Differentiation (3)
D[Erf[x], x]Table[D[Erf[x], {x, n}], {n, 1, 4}]Plot[Evaluate[%], {x, -4, 4}, PlotLegends -> {"First Derivative", "Second Derivative", "Third Derivative", "Fourth Derivative"}]D[Erf[x], {x, n}]Integration (3)
Indefinite integral of Erf:
Integrate[Erf[x], x]Definite integral of an odd integrand over an interval centered at the origin is 0:
Integrate[Erf[x], {x, -4, 4}]Integrate[z^αErf[z^β], z]Integrate[z Exp[z]Erf[z], z]Integrate[1 - Erf[z]^2, {z, -Infinity, Infinity}]Series Expansions (4)
Taylor expansion for Erf:
Series[Erf[x], {x, 0, 7}]Plot the first three approximations for Erf around
:
terms = Normal@Table[Series[Erf[x], {x, 0, m}], {m, 1, 5, 2}];
Plot[{Erf[x], terms}, {x, -3, 3}]General term in the series expansion of Erf:
SeriesCoefficient[Erf[x], {x, 0, n}]Asymptotic expansion of Erf:
Series[Erf[x], {x, Infinity, 1}]//NormalErf can be applied to a power series:
Erf[Sin[x] + O[x] ^ 10]Integral Transforms (2)
Compute the Fourier transform of Erf using FourierTransform:
FourierTransform[Erf[t], t, ω]LaplaceTransform[Erf[t], t, s]Function Identities and Simplifications (3)
Integral definition of the error function:
(2/Sqrt[π])Integrate[Exp[-t^2], {t, 0, x}]Argument involving basic arithmetic operations:
Erf[I z]Erf[Sqrt[z^2]]//FunctionExpandThe two-argument form gives the difference:
Erf[x, y]//FunctionExpandFunction Representations (4)
Error function in terms of the incomplete Gamma:
(Sqrt[z^2] /z)(1 - (1/Sqrt[π])Gamma[(1/2), z^2])//FullSimplifyRepresent in terms of MeijerG using MeijerGReduce:
MeijerGReduce[Erf[x], x]Activate[%]Erf can be represented as a DifferentialRoot:
DifferentialRootReduce[Erf[x], x]TraditionalForm formatting:
Erf[α]//TraditionalFormGeneralizations & Extensions (1)
Applications (3)
Express the CDF of NormalDistribution in terms of the error function:
CDF[NormalDistribution[0, σ], x]//FunctionExpandPlot[% /. σ -> 2, {x, -10, 10}]The cumulative probabilities for values of the normal random variable lie between -n σ and n σ:
Table[CDF[NormalDistribution[0, σ], n σ] - CDF[NormalDistribution[0, σ], -n σ], {n, 4}] //NThe solution of the heat equation for a piecewise‐constant initial condition:
temp[x_, t_] := With[{η = (1/2 Sqrt[t])}, (Erf[(x + 1)η] - Erf[(x - 1)η]) / 2]A check that the solution fulfills the heat equation:
D[temp[x, t], t] == D[temp[x, t], x, x]// SimplifyThe plot of the solution for different times:
Plot[Evaluate[{temp[x, 0.01], temp[x, 0.2], temp[x, 0.6], temp[x, 1.5]}], {x, -4, 4}]Under an excess of loss reinsurance agreement, a claim is shared between the insurer and reinsurer only if the claim exceeds a fixed amount, called the retention level. Otherwise, the insurer pays the claim in full. Compute the expected value of the amounts
and
, paid by the insurer and the reinsurer for a retention level of
if the claims follow a lognormal distribution with parameters
and
. Find the expected insurer claim payouts:
insurerPayouts = TransformedDistribution[Min[x, m], xLogNormalDistribution[μ, σ], Assumptions -> m > 0];Expectation[y, yinsurerPayouts]Find the expected reinsurer payouts to the insurer:
reinsurerPayouts = TransformedDistribution[Max[0, x - m], xLogNormalDistribution[μ, σ], Assumptions -> m > 0];Expectation[z, zreinsurerPayouts]Properties & Relations (3)
Compose with inverse functions:
{Erf[InverseErf[z]], InverseErf[Erf[z]]}PowerExpand[%]Solve a transcendental equation:
Solve[Erf[x] == 1 / 2, x]Erf appears in special cases of many mathematical functions:
{ GammaRegularized[1 / 2, z^2], HypergeometricU[1 / 2, 1 / 2, z^2], MeijerG[{{1 / 2}, {}}, {{0}, {-1 / 2}}, z^2]}//FunctionExpandPossible Issues (3)
For large arguments, intermediate values may underflow:
Erf[-2 10 ^ 8 - 10. ^ 3 I]The error function for large real-part arguments can be very close to 1:
Erf[30.`20 + 10 ^ -1 I]Very large arguments can give unevaluated results:
Erf[10. ^ 100 I]Neat Examples (2)
ParametricPlot[ReIm[Erf[t + I t]], {t, -5, 5}, Axes -> None]A continued fraction whose partial numerators are consecutive integers:
With[{n = 12}, 1 / (1 + ContinuedFractionK[HoldForm[k], 1, {k, n}])]Its limit can be expressed in terms of Erf:
{ReleaseHold //@ %, Sqrt[(π E/2)] (1 - Erf[(1/Sqrt[2])])} //NTech Notes
History
Introduced in 1988 (1.0) | Updated in 2021 (13.0) ▪ 2022 (13.1)
Text
Wolfram Research (1988), Erf, Wolfram Language function, https://reference.wolfram.com/language/ref/Erf.html (updated 2022).
CMS
Wolfram Language. 1988. "Erf." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2022. https://reference.wolfram.com/language/ref/Erf.html.
APA
Wolfram Language. (1988). Erf. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Erf.html
BibTeX
@misc{reference.wolfram_2026_erf, author="Wolfram Research", title="{Erf}", year="2022", howpublished="\url{https://reference.wolfram.com/language/ref/Erf.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_erf, organization={Wolfram Research}, title={Erf}, year={2022}, url={https://reference.wolfram.com/language/ref/Erf.html}, note=[Accessed: 13-June-2026]}