# Chaitanya's Random Pages

## September 15, 2014

### A good simple approximation of the complementary error function

Filed under: mathematics — ckrao @ 12:12 pm

I learnt from  that the complementary error function $\displaystyle \text{erfc}(x) = \sqrt{\frac{2}{\pi}}\int_x^{\infty}e^{-t^2}\ dt$ can be well approximated as follows for positive $x$: $\displaystyle \text{erfc}(x) \approx \exp(-c_1x-c_2x^2), x > 0$

where $\displaystyle c_1=1.09500814703333, \quad c_2=0.75651138383854.$

As mentioned in , this approximation is found by applying the non-linear least squares method to estimate the parameters $c_1, c_2$ based on 500 points equally spaced in the interval [0,5].

The graphs below show how well this approximation holds across positive $x$. By symmetry one could use $2-\exp(c_1x-c_2x^2)$ as an approximation of $\text{erfc}(x)$ for negative $x$.  Only two parameters are needed, but each were specified to 14 decimal places in to obtain the accuracy (maximum error just over 0.002) seen here. Such an approximation would be useful for working with functions (e.g. products) of error functions  (see  for an example).

#### References

 Product of two complementary error functions (erfc) – Mathematics Stack Exchange.

 W.-J. Tsay, C.J. Huang, T.-T. Fu, I-L. Ho, Maximum Likelihood Estimation of Censored Stochastic Frontier Models: An Application to the Three-Stage DEA Method, No 09-A003, IEAS Working Paper : academic research from Institute of Economics, Academia Sinica, Taipei, Taiwan. Available at http://econ.ccu.edu.tw/academic/master_paper/090323seminar.pdf.

Advertisements

## 2 Comments »

1. This post helped me complete a proof that I have been struggling with for several days! Thank you so much!

Comment by Pol — September 14, 2018 @ 1:13 pm

• Glad that it helped!

Comment by ckrao — September 15, 2018 @ 6:34 am

Blog at WordPress.com.