0

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 Answers1

1

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})$.

Anon
  • 2,460
  • 1
  • 15
  • 23
  • Thanks. Actually, I had a typo and meant $x-r\ln x$, not a plus sign (otherwise the function is not convex but concave, btw; I also forgot to mention that I needed x in (0,1)), and this is what was causing me to be outside of the domain of W and get a complex branch of W. But I rechecked my computations, a and I found that I had made a silly mistake! - the conditions $r<1$ and $c>1$ insure that we are in the domain. Thanks so much, in any event! – eduardo sontag Apr 02 '21 at 04:19