2

Consider the fucntion $f:\mathcal{R}\rightarrow \mathcal{R}$ given by the rule

$ f(x)=(1-x)e^{-x} $

Now I want to invert this function(not just for fun but I have a data that seems to fit this form). I could see that $x$ can' be isolated. Taking the log on both sides doesn't help and I have tried other possibilities. So I tried the following. Using Taylor expansion $e^{-x}=1-x-\frac{x^{2}}{2}+...$ Now $ f(x)=(1-x)(1-x-\frac{x^{2}}{2})=-\frac{1}{2}x^{3}+\frac{3}{2}x^{2}-2x+1 $

Now I could solve the cubic equation and solve for $x$. But this looks ugly and I don't know how good of an approximation it is. I was looking for possible suggestions to glean some information or write approximately a reasonable function for $x$ in terms of $y$ . Thank you

felasfa
  • 1,632

2 Answers2

4

Here is mine ... $$ y = (1-x)\exp(-x) \\ \mathrm{e}y=(1-x)\exp(1-x) \\ W(\mathrm{e}y) = 1-x \\ x = 1-W(\mathrm{e}y) $$

Maybe Arthur typed something wrong.

GEdgar
  • 111,679
  • Yes, I missed the sign in the exponent of the original function. Will correct. – Arthur Jul 18 '13 at 03:28
  • GEdgar, thanks for the quick reply. So I guess the best will be to compute W(ey) numerically and settle for that. – felasfa Jul 18 '13 at 05:24
3

According to WolframAlpha, the answer is $1-W\left(ey\right)$, where $W$ is the (main branch of the) Lambert W-function, which is defined as the inverse of the function $y =x e^x$. So I suspect there is no simple expression for the function you're after.

Arthur
  • 199,419
  • Thank you Arthur for the quick reply. – felasfa Jul 18 '13 at 04:20
  • No need to say "main branch" ... the original function is not one-to-one, so we might as well use both branches. And if you don't insist on a real function, you could use all the other branches, too. – GEdgar Jul 18 '13 at 12:16