I am trying to invert (or to estimate the inverse of) $$y=\frac{1-e^{-x}}{x}$$ for $y\in(0,1)$. The function 'looks' monotonically decreasing between $x=0$ and $x=\infty$, but I have not been able to show this.

Plot of y=(1-Exp[-x])/x against x

I have been able to compute the inverse function numerically, but I am wondering if there is an analytical solution or approximation that would help speed things up.

Mathematica tells me that the inverse is $$x=\frac{1+y\cdot\text{ProductLog}[-e^{-1/y}/y]}{y}$$ where $\text{ProductLog}[z]$ is the solution to $z=we^w$. I have tried re-arranging the latter expression but I cannot arrive at the original function. Plotting the latter function on $y\in(0,1)$, it looks plausible, but I don't want to use this formula without understanding where it comes from.

Plot of x against y

Can anyone show me how to invert the original function or help me estimate the inverse to some degree of precision?

  • 2
    $\begingroup$ I don't get. You already know the inverse function depends on the Lambert function, so you just have to check Lambert function asymptotics on the related Wikipedia page. Or you may solve $y=\frac{1-e^{-x}}{x}$ through Newton's method with starting point $x_0=-2\log(y)$. $\endgroup$ – Jack D'Aurizio Sep 7 '15 at 17:21
  • $\begingroup$ Thanks, I did know know about the Lambert function. I will investigate it. $\endgroup$ – JS1204 Sep 7 '15 at 17:24
  • $\begingroup$ OK using the asymptotics of the Lambert function I think I can approximate Mathematica's formula for the inverse. However, I would still like to know how to arrive at Mathematica's answer for the inverse function. $\endgroup$ – JS1204 Sep 7 '15 at 17:36

Derivation to obtain the Lambert $W$ function : \begin{align} y&=\frac{1-e^{-x}}x\\ x&=\frac{1-e^{-x}}y\\ x\,e^x&=\frac{e^{x}-1}y\\ \left(x-\frac 1y\right)\,e^x&=-\frac 1y\\ \left(x-\frac 1y\right)\,e^{\large{x-\frac 1y}}&=-\frac {\large{e^{-\frac 1y}}}y\\ x-\frac 1y&=W\left(-\frac {\large{e^{-\frac 1y}}}y\right)\\ \end{align} and the wished formula : $\quad\boxed{\displaystyle x=\frac 1y+W\left(-\frac {\large{e^{-\frac 1y}}}y\right)}$

At this point (as indicated by robjohn) we may use the fact that $\;y\in(0,1)\;$ and observe that the parameter of the Lambert-$W$ function $\,-\dfrac 1y\;e^{-\large{\frac 1y}}\;$ will belong to $\;\left(-\dfrac 1e,\;0\right)$.

The implications are :

  • for any $\,y\in(0,1)\;$ we have two real solutions from the two branches of the Lambert-$W$ function (see the picture in the Wikipedia link and the discussion about the image of $W$ under or above $-1$ corresponding to the parameter $-\dfrac 1e$) :$$x_1=\frac 1y+W\left(-\frac {\large{e^{-\frac 1y}}}y\right),\;x_2=\frac 1y+W_{-1}\left(-\frac {\large{e^{-\frac 1y}}}y\right)$$
  • the parameter of $W$ may be written as $\;u\,e^u\,$ for $u=-\dfrac 1y\;$ but $\;W_{-1}(u\,e^u)=u\;$ in the second case so that $\;x_2=\dfrac 1y-\dfrac 1y\;$ with the solutions becoming simply : $$x_1=\frac 1y+W\left(-\frac {\large{e^{-\frac 1y}}}y\right),\ x_2=0$$ ($x_2=0$ is rather a solution of $\:x\;y=1-e^{-x}\;$ than of the initial equation)
  • 1
    $\begingroup$ Since the argument is negative, it should be noted that there are two branches of $\mathrm{W}$. This is important since one value of $\mathrm{W}\left(-\frac1ye^{-\frac1y}\right)$ is $-\frac1y$ which gives $x=0$. $\endgroup$ – robjohn Sep 7 '15 at 22:53
  • $\begingroup$ Thanks @robjohn: (I didn't notice the bounds on $y$) I'll edit this again. Cheers, $\endgroup$ – Raymond Manzoni Sep 7 '15 at 22:58
  • $\begingroup$ Thanks! How do you get from the 4th line to the 5th line in your derivation? $\endgroup$ – JS1204 Sep 7 '15 at 22:58
  • $\begingroup$ @js86: It is a multiplication by $e^{-1/y}$ and the previous line is a subtraction of $e^x/y$. $\endgroup$ – Raymond Manzoni Sep 7 '15 at 23:00
  • $\begingroup$ of course, thanks! $\endgroup$ – JS1204 Sep 7 '15 at 23:02

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.