4
$\begingroup$

$\newcommand{\erf}{\operatorname{erf}}\newcommand{\erfc}{\operatorname{erfc}}$Let's define for each $x>0$ $$\erf(x)=\frac {2}{\sqrt{\pi}}\int_0^xe^{-t^2} dt$$ and $$\erfc(x)=\frac {2}{\sqrt{\pi}}\int_x^\infty e^{-t^2} dt=1-\erf(x)$$

I want to approximate the inverse functions $\erf^{-1}$ and $\erfc^{-1}$ for very small values of $x$.

I know that $\erf\sim f(x)=\frac{2x}{\sqrt{\pi}}$ now since the inverse function of $f$ is close to $0$ when $x$ is close to $0$ I can use that as an approximation for $\erf^{-1}$, in fact $\erf(f(x))\sim x$ when $x<<1$.

Now this doesn't work with erfc since the inverse function of $1-f(x)$ is not small for small values of $x$

Though I know that $\erfc(x) \sim g(x)=\frac{1}{\pi}\frac{e^{-x^2}}x$ for $x\gg1$. Since $g^{-1}$ is an increasing function is should be true that $g^{-1}(x)\gg1$ when $x\gg1$ but is there any simple way to compute the inverse of this function?

Thank you!

$\endgroup$
3
$\begingroup$

This is only a partial answer.

For the inverse error function, for small arguments, Taylor series seem to be quite good $$\text{erf}^{-1}(x)=\frac{\sqrt{\pi } }{2}x\Big(1+\frac{\pi }{12}x^2+\frac{7 \pi ^2 }{480}x^4+\frac{127 \pi ^3 }{40320}x^6+O\left(x^8\right)\Big)$$ Pade approximants $$\text{erf}^{-1}(x)=\frac{\sqrt{\pi } }{2}x\frac{1-\frac{11 \pi }{120}x^2}{1-\frac{7 \pi }{40}x^2}$$ $$\text{erf}^{-1}(x)=\frac{\sqrt{\pi } }{2}x\frac{1-\frac{4397 \pi }{17352}x^2+\frac{111547 \pi ^2 }{14575680}x^4}{1-\frac{5843 \pi }{17352}x^2+\frac{20533 \pi ^2 }{971712}x^4}$$ are even much better.

For the inverse complementary error function, I really did not find anything which could be satisfactory except the fact that $$x e^{x^2} \text{erfc}^{-1}(x)$$ could probably be fitted as $x(x-1)P_n(x)$ but it will not work well close to $x=0$.

Edit

If you are not looking for a very high accuracy and using really small values of $x$, it seems that $$\text{erfc}^{-1}(x)\approx \sqrt{\frac{1}{2} \left(\log \left(\frac{2}{\pi x^2}\right)-\log \left(\log \left(\frac{2}{\pi x^2}\right)\right)\right)}$$ could be acceptable $$\left( \begin{array}{ccc} x & \text{exact} & \text{approximation} \\ 0.0001 & 2.75106 & 2.74595 \\ 0.0002 & 2.62974 & 2.62435 \\ 0.0003 & 2.55640 & 2.55085 \\ 0.0004 & 2.50322 & 2.49754 \\ 0.0005 & 2.46127 & 2.45550 \\ 0.0006 & 2.42652 & 2.42068 \\ 0.0007 & 2.39679 & 2.39089 \\ 0.0008 & 2.37078 & 2.36483 \\ 0.0009 & 2.34763 & 2.34163 \\ 0.0010 & 2.32675 & 2.32071 \\ 0.0020 & 2.18512 & 2.17883 \\ 0.0030 & 2.09851 & 2.09210 \\ 0.0040 & 2.03517 & 2.02871 \\ 0.0050 & 1.98487 & 1.97839 \\ 0.0060 & 1.94297 & 1.93650 \\ 0.0070 & 1.90696 & 1.90049 \\ 0.0080 & 1.87530 & 1.86886 \\ 0.0090 & 1.84700 & 1.84060 \\ 0.0100 & 1.82139 & 1.81503 \end{array} \right)$$

$\endgroup$
3
$\begingroup$

For inverse erf, I inverted a low order the pade approximant (it is valid up to $\pm 0.97$) Orange part is the approximation:

$$\frac{3-\sqrt{9-3 \pi x^2}}{\sqrt{\pi } x}$$

enter image description here

For inverse erfc, I inverted the asmyptotic form of erfc:

$$\frac{\sqrt{W\left(\frac{2}{\pi x^2}\right)}}{\sqrt{2}}$$

enter image description here

This one is even better(just subtract $0.5x$) (but this sacrifices accuracy near x=0, keep that in mind):

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.