0

In my studies of probability theory I have come across the need to solve this equation, on which Mathematica got stuck:

$ \sqrt{\pi} t_0 \left( \text{erf}(\frac{t_0}{\sqrt{2}}) + 1\right) - \sqrt{2} \alpha e^{-t_0^2/2} =0 $

Is there some way someone can help me solve this or at least help me find a nice expression for $ \log(\Phi(t_0)) - \frac{t_0^2}{2} $ where $ t_0 $ is the solution and $ \Phi $ is the standard normal CDF, Mathematica got stuck on this perhaps someone here can help with this? I thank all helpers.

Croc2Alpha
  • 3,927

1 Answers1

2

I do not think that any closed form could be obtained for the solution of $$f(t)=\sqrt{\pi } t \left(\text{erf}\left(\frac{t}{\sqrt{2}}\right)+1\right)-\sqrt{2} \alpha e^{-\frac{t^2}{2}}=0$$ and I suppose that numerical methods should be required. Admitting that Newton method would be your choice, you need $$f'(t)=\sqrt{\pi } \left(\text{erf}\left(\frac{t}{\sqrt{2}}\right)+1\right)+\sqrt{2} (\alpha +1) e^{-\frac{t^2}{2}} t$$ and the iterates will be given by $$t_{n+1}=\frac{\sqrt{2} \left(\alpha +(\alpha +1) t_n^2\right)}{\sqrt{\pi } e^{\frac{t_n^2}{2}} \left(\text{erf}\left(\frac{t_n}{\sqrt{2}}\right)+1\right)+\sqrt{2} (\alpha +1) t_n}$$ But, as usual, the problem is to find a "reasonable" guess of the solution.

If $t$ is supposed to be small, you could use Taylor expansion $$f(t)=-\sqrt{2} \alpha +\sqrt{\pi } t+\left(\frac{\alpha }{\sqrt{2}}+\sqrt{2}\right) t^2+O\left(t^4\right)$$ and then start using either $$t_0=\sqrt{\frac{2}{\pi }} \alpha$$ if you limit the expansion to $O\left(t^2\right)$ or $$t_0=\frac{\sqrt{4 \alpha (\alpha +2)+\pi }-\sqrt{\pi }}{\sqrt{2} (\alpha +2)}$$ if you limit the expansion to $O\left(t^4\right)$.

Because of the exponential term, assuming $\alpha>0$, I would prefer to solve $$g(t)=\log \left(\sqrt{\pi } t \left(\text{erf}\left(\frac{t}{\sqrt{2}}\right)+1\right)\right)-\log \left(\sqrt{2} \alpha e^{-\frac{t^2}{2}}\right)=0$$ $$g'(t)=\frac{\sqrt{\frac{2}{\pi }} e^{-\frac{t^2}{2}}}{\text{erf}\left(\frac{t}{\sqrt{2}}\right)+1}+t+\frac{1}{t}$$

Edit

For $0\leq t\leq 1$ (this corresponds to $0 \leq \alpha\leq 3.5$), it seems that a very good approximation could be $$t\approx -0.019727 \sqrt{\alpha}+0.992234 \alpha-0.575731 \alpha^{3/2}+0.109344 \alpha^2\qquad (R^2=0.999999)$$ For example, using $\alpha=2$, the above correlation gives $t\approx 0.765533$ for an "exact" solution $t=0.765277$.

Added after @tired's comment

As @tired commented, if looking for large values of $\alpha$, the solution is almost the one of $$h(t)=2\sqrt{\pi } t -\sqrt{2} \alpha e^{-\frac{t^2}{2}}=0\implies t^2=W\left(\frac{\alpha ^2}{2 \pi }\right)$$ where $W(z)$ is Lambert function. For large values of $\alpha$ , we can use as a good approximation $$t^2=L_1-L_2+\frac {L_2}{L_1}\qquad L_1=\log \left(\frac{\alpha ^2}{2 \pi }\right)\qquad L_2=\log(L_1)$$ Trying $\alpha=123.456$, the above asymptotics leads to $t=2.45031$ while the "exact" solution would be $t=2.45235$.

  • 1
    nice answer, claude! (+1) i just wanted to add that if we expect $t_0$ to be reasonable big (which is the case for $\alpha$ large ), it is reasonable to replace $\text{erf}\rightarrow 1$. the resulting equation solves in terms of Lambert-W functions: $x\approx \sqrt{W(\alpha^2/2\pi)}$ . For example if $\alpha=20000$ we have $t_{0,exact}/t_{0,approx}=0.9999972$, which is a strikingly good approximation. for sure, using the known asymptotics for the W-function this can be further expanded... – tired Oct 04 '16 at 08:23
  • 2
    @tired. Thanks for the comment. For sure, I totally agree with you. If you don't mind, I shall work this idea (quoting you for sure). Cheers. – Claude Leibovici Oct 04 '16 at 08:29
  • 1
    yeah, i would be glad if you could do so, i am too busy at the moment to work out an answer myself at the moment – tired Oct 04 '16 at 08:31
  • Last comment: by the same logic, if $t\ll1$ (which is true if $\alpha \ll 1$) we might replace $\text{erf}\rightarrow 0,\quad \exp \rightarrow 1$ resulting in approximate solution of the form $t_{approx}=\sqrt{2 \alpha}/\sqrt{\pi}$ – tired Oct 04 '16 at 08:39
  • @tired. It is just funny ! Have a look at my last edit for $\alpha=123.456$. I think that, with some extra work, we could define upper and lower bounds for $t$. Thanks again. – Claude Leibovici Oct 04 '16 at 08:56
  • very well done...nice teamwork! i would upvote again if i could – tired Oct 04 '16 at 09:21
  • 1
    @tired. I enjoy such opportunities and, every time this happens on this site, I am happy. You made my day ! – Claude Leibovici Oct 04 '16 at 09:43
  • @ClaudeLeibovici do you think you can help answer: https://math.stackexchange.com/questions/3216588/expressions-approximating-generalized-harmonic-number-truncated-polynomials-wit – user3108815 May 07 '19 at 00:48