# Error function and integrals

Stephen Tashi
What constitutes an explanation will depend on your background. Do you know about integration techniques such a changing variables? And do you know that the definition of erfc(x) itself involves an integral?

Char. Limit
Gold Member
Well, the definition of erfc(z) is actually:

$$erfc(z) \equiv 1 - erf(z)$$

However, this can be pretty easily changed to the integral definition if we remember that

$$erf(z) \equiv \frac{2}{\sqrt{\pi}} \int_0^z exp\left(-t^2\right) dt$$

and furthermore that

$$\frac{2}{\sqrt{\pi}} \int_0^\infty exp\left(-t^2\right) dt = 1$$

By substituting these definitions in for 1 and erf(z), we get this expression:

$$erfc(z) = \frac{2}{\sqrt{\pi}} \int_0^\infty exp\left(-t^2\right) dt - \frac{2}{\sqrt{\pi}} \int_0^z exp\left(-t^2\right) dt$$

Which is easily proven using basic integral properties to be equal to the expression in the OP.

Thanks for the derivation. My final question is how one would analyze this integral (from 0 to z as you have it). Is it along the same lines we go about to derive the value of the error function from -inf to +inf?

Char. Limit
Gold Member
We usually just find values numerically. The only value that I know of where erf(x) takes a simple, closed-form value is x=0. Other than that, it's all approximation.

Thanks for your timely response. Although knowing that it has to be found numerically makes me slightly unhappy I'm glad to find that I wasn't missing anything more fundamental.

Thanks for your timely response. Although knowing that it has to be found numerically makes me slightly unhappy I'm glad to find that I wasn't missing anything more fundamental.

The erfc(x) is a function which is used exactly like the functions exp(x), ln(x), cos(x) or many others. All these functions have to be found numerically (except for a few particular values of x).
For example, what is the analytical expressiion of :
integrate (1/t)*dt from t=1 to t=x ?
Of course, the answer is ln(x). Then would you say "knowing that it has to be found numerically makes me slightly unhappy" ?

The only difference between erfc(x) and ln(x) is that one is familiar to you and the other not.

An almost similar question arised elsewhere about the integration of x^x. The consequence was a funny discussion reported in the paper "The Sophomores Dream Function" :
http://www.scribd.com/JJacquelin/documents