Solving $x + r\ln(x) = c$ using Lambert's W function?

56 Views Asked by At

A very elementary question, I am sure.
I would like to solve $x + r \ln(x) = c$ where $c>1$ and $r<1$. (There is a unique solution for $c>1,$ and the LHS is convex, btw.) By "solve", I mean not numerically, but expressing the solution in terms of known functions, preferably something built-in in MATLAB. Now, as far as I see, I cannot use Lambert's functions (either branch) because I get imaginary solutions that way. Suggestions? Thanks!

1

There are 1 best solutions below

1
On

Simplify it to $x^r e^x = e^c \Rightarrow \frac{x}{r} e^{\frac{x}{r}} = \frac{e^{\frac{c}{r}}}{r}$. Thus $x = r W(\frac{e^{\frac{c}{r}}}{r})$.