Message Boards Message Boards

GROUPS:

Inverse of an equation with x*e^x

Posted 21 days ago
252 Views
|
2 Replies
|
2 Total Likes
|

I am trying to get the inverse (solve for x) of an equation with the form:

y(x) = a * (1 - e^ (-x/b) - (x/b) * e^ (-x/b))

x(y) = ?

Through some research, I learned that the inverse of x*e^x is a Lambert function. However, when I use Wolfram|Alpha to perform the inverse, the solution does not reproduce the results of the original equation. WA Solution

Solutions of the inverse with W Lambert function

WA returns many conditional solutions depending on values of a, b, and the range of y values. In addition, there are different branches of the Lambert function (Wn). When I use the branch n = -1, the solution is close, but not very good near the initial values.

True values in blue, Lambert function solution in orange

  1. When I plot the solution using the main branch of W (n=0), the solution gives negative values.
  2. When I plot the real parts of the -1 branch, the solution is close in the middle and final values, but it is not fit well near the initial values.

Any thoughts?

2 Replies

You may want to have a look at this

fy[x_, a_, b_, n_] := a (1 - Exp[-x/b] - x/b Exp[-x/b])
fx[y_, a_, b_, n_] := -b - b ProductLog[n, (-a + y)/(a E)]

fx[fy[.5, .1, .5, -1], .1, .5, -1] // FullSimplify
fy[fx[.5, .1, .5, -1], .1, .5, -1] // FullSimplify
(fx[fy[#, .1, .5, -1], .1, .5, -1] // FullSimplify) & /@ Range[20/2]
(fy[fx[#, .1, .5, -1], .1, .5, -1] // FullSimplify) & /@ Range[20/2] // Chop

and also

p1 = Plot[fy[x, .2, 1.3, n], {x, 0, 5},   PlotStyle -> {Thick, Dashed, Red}]
p2 = ParametricPlot[{fx[y, .2, 1.3, -1], y}, {y, 0, .2},   AspectRatio -> .5]
Show[p1, p2]
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract