2
$\begingroup$

I'm playing around with some functions related to the Lambert W Function. Namely those of the form:

$$W(x;a) = f^{-1}\left(x \left( e^{x} - a\right) \right)$$

And when $a$ gets too large, Mathematica begins to detect the lower branch as the principle.

plogext[x_, a_] := x*(Exp[x] - a)
Animate[Plot[{ProductLog[x], 
  InverseFunction[plogext @@ {#1, a} &][x]}, {x, -1, 10}], {a, 0, 3, 0.001}]

I can't figure out how to tell Mathematica that the top branch is more interesting. I did try changing the definition of plogext to have a condition. But in that case, it simply fails. (This bound only holds for $a > -e^{-2}$).

plogext[x_, a_] := x*(Exp[x] - a) /; x >= (-1 + ProductLog[a E])
Animate[Plot[{ProductLog[x], 
  InverseFunction[plogext @@ {#1, a} &][x]}, {x, -1, 10}], {a, 0, 3, 0.001}]
$\endgroup$
3
$\begingroup$
plogext01= ConditionalExpression[ #1 (Exp[#1] - #2), #1>0]&
Manipulate[Plot[{
x,
plogext01[x, a], 
InverseFunction[plogext01 @@ {#1, a} &][x]
  }, {x, -2, 2},PlotRange-> 2{{-1,1},{-1,1}},PlotStyle-> {Red,Green,Blue}], 
  {a, 0, 3, 0.001,Appearance-> "Open"}]  

enter image description here

Compare with your code (slightly modifed) :

plogext= #1 (Exp[#1] - #2) &
list02=Manipulate[Plot[{
x,
plogext[x, a], 
InverseFunction[plogext @@ {#1, a} &][x]
  }, {x, -2, 2},PlotRange-> 2{{-1,1},{-1,1}},PlotStyle-> {Red,Green,Blue}], 
  {a, 0, 3, 0.01,Appearance-> "Open"}]  

enter image description here

$\endgroup$
  • 2
    $\begingroup$ Try plogext01 = ConditionalExpression[#1 (Exp[#1] - #2), #1 > ProductLog[#2 E] - 1] &; for a wider domain. $\endgroup$ – J. M. is away Sep 9 '17 at 11:04
  • $\begingroup$ This works amazingly well for the principle branch. However, it doesn't seem to work if I'm targeting the -1st (or -2nd for $-e^{-2} < a < 0$) Any insight? Just for testing positive a, I'm using plogext1 = ConditionalExpression[#1 (Exp[#1] - #2), #1 < (-1 + ProductLog[#2* E])] & $\endgroup$ – OmnipotentEntity Sep 9 '17 at 15:09

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.