0

Is there an analytical (maybe involving special functions) solution of an equation of the form:

$$\ln(1-x)-\ln(x)+\frac{a}{x}=c$$

Here I want to solve for $x$, which should satisfy $0\le x\le1$, and $a,c$ are real constants.

a06e
  • 6,665
  • Have you plotted the curve with equation $y=\ln(1-x)-\ln(x)+\frac{a}{x}-c$ for different values of $a$ and $c$ in order to see if your equation has a (unique ?) root in $[0,1]$ ? – Jean Marie May 03 '19 at 16:34

1 Answers1

3

The solution can be written using the Lambert W function as

$$ x = \frac{a}{W(a e^{c-a})+a} $$

If $-e^{-1} < a e^{c-a} < 0$ there will be two real solutions, one using the principal branch and one using the "$-1$" branch of W.

Robert Israel
  • 448,999
  • Thanks. I don't know why Mathematica fails to recognize this (though it is able to solve other equations via the Lambert W function). – a06e May 03 '19 at 16:40
  • @becko Maple doesn't get it either unless you change $\ln(1-x) - \ln(x)$ to $\ln((1-x)/x)$. – Robert Israel May 03 '19 at 16:52
  • With that substitution Mathematica also gets the answer. It's probably due to some tricky edge-case. – a06e May 03 '19 at 16:53
  • I don't think it's a "tricky edge-case", just a failure to recognize that this particular simplification makes it doable. – Robert Israel May 03 '19 at 16:57