Solve an equation involving the error function

102 Views Asked by At

Let $0<a<1$ be given. The equation:

$$a = 1 - \frac{2\sqrt{x/\pi}}{\mathrm e^x \mathrm{erf}(\sqrt x)}$$

has a unique root $x$, because the right-hand side is increasing in $x$, and goes to $0,1$ as $x\rightarrow 0,\infty$.

Can we write the root as some analytical expression using special functions? I don't know if this is possible (this is not a textbook exercise). But maybe someone with more experience with error function and related special functions finds a way. Thanks.

1

There are 1 best solutions below

1
On BEST ANSWER

Without special functions, we can have a quite good approximation using a $[3,3]$ Padé approximant built at $x=0$. This would give $$1 - \frac{2\sqrt{\frac x\pi}}{\mathrm e^x \,\mathrm{erf}(\sqrt x)}=\frac {\frac{2 }{3}x-\frac{8 }{195}x^2+\frac{136 }{15015}x^3 } { 1+\frac{8 }{39}x+\frac{92 }{2145}x^2+\frac{128 }{45045}x^3}$$ which is quite good up to $a=0.95$ (corresponding to $x=4$.

So, we are left with a cubic equation which has only one real root; so, use the hyperbolic solution. This will give you a reasonable starting value $x_0$ for Newton method for the zero of $$f(x)= \frac{2\sqrt{\frac x\pi}}{\mathrm e^x \,\mathrm{erf}(\sqrt x)}+a-1$$

For different values of $a$, the table reports the estimate and the solution. $$\left( \begin{array}{ccc} a & \text{estimate} & \text{solution} \\ 0.00 & 0.00000 & 0.00000 \\ 0.05 & 0.07655 & 0.07655 \\ 0.10 & 0.15643 & 0.15643 \\ 0.15 & 0.24000 & 0.24000 \\ 0.20 & 0.32771 & 0.32771 \\ 0.25 & 0.42008 & 0.42008 \\ 0.30 & 0.51775 & 0.51775 \\ 0.35 & 0.62149 & 0.62149 \\ 0.40 & 0.73225 & 0.73225 \\ 0.45 & 0.85123 & 0.85123 \\ 0.50 & 0.97998 & 0.97998 \\ 0.55 & 1.12049 & 1.12050 \\ 0.60 & 1.27551 & 1.27554 \\ 0.65 & 1.44883 & 1.44889 \\ 0.70 & 1.64596 & 1.64611 \\ 0.75 & 1.87540 & 1.87579 \\ 0.80 & 2.15114 & 2.15223 \\ 0.85 & 2.49874 & 2.50207 \\ 0.90 & 2.97220 & 2.98479 \\ 0.95 & 3.71375 & 3.78842 \\ 0.96 & 3.92388 & 4.04257 \\ 0.97 & 4.16667 & 4.36757 \\ 0.98 & 4.44888 & 4.82122 \\ 0.99 & 4.77575 & 5.58700 \end{array} \right)$$

Let us be very pessimistic and consider $a=0.999$; the estimate is $x_0=5.10779$. Using Newton, the following iterates will be generated $$\left( \begin{array}{cc} n & x_n \\ 0 & 5.10779 \\ 1 & 6.14281 \\ 2 & 7.04987 \\ 3 & 7.71203 \\ 4 & 8.01868 \\ 5 & 8.07151 \\ 6 & 8.07285 \end{array} \right)$$ which is not too bad.

Edit

If we consider that polshing the root of the equation would be necessary, we could think about a simpler estimate.

Looking at the plot of the function, it is very similar to an hyberbolic tangent. So, came the idea of an empirical model $$x = \alpha \left[\tanh ^{-1}\left(\beta\, a^\gamma\right)\right]^\delta$$ Using nonlinear regressions, it became quite clear that $\beta=\delta=1$ would be enough.

So, the final model is just $$x = \alpha \tanh ^{-1}\left( a^\gamma\right)$$ which seems to be good $(R^2=0.999982)$ and highly significant parameters (as shown below).

$$\begin{array}{clclclclc} \text{} & \text{Estimate} & \text{Standard Error} & \text{Confidence Interval} \\ \alpha & 2.18078 & 0.00213 & \{2.17656,2.18500\} \\ \gamma & 1.22013 & 0.00655 & \{1.20713,1.23312\} \end{array}$$

Update

Looking at the plot of $$\log\left(\frac{2\sqrt{\frac x\pi}}{\mathrm e^x \,\mathrm{erf}(\sqrt x)}\right)$$ it really looks like a power low. Some quite and dirty regression work shows that a reasonable $(R^2=0.999952)$ and simpler model could be $$a=1-\exp\left(-\alpha\,x^{\beta} \right)\implies x=\left(-\frac{\log (1-a)}{\alpha }\right)^{\frac{1}{\beta }}$$ $$\begin{array}{clclclclc} \text{} & \text{Estimate} & \text{Standard Error} & \text{Confidence Interval} \\ \alpha & 0.71198 & 0.00030 & \{0.71139,0.71258\} \\ \beta & 1.06896 & 0.00054 & \{1.06789,1.07003\} \\ \end{array}$$