Can anyone help me solve this for y in terms of x?
$$x=a(1-y)-b\log(1-y)$$
where $a,b>0$. I've been trying to achieve this using the Lambert W function, but am struggling!
EDIT: Here are my workings:
\begin{align} -\frac{a}{b}(1-y)+\log{(1-y)}&=-\frac{x}{b}\\ %% \Rightarrow\quad %% -\frac{a}{b}(1-y)+\log{(1-y)}+\log{\left(-\frac{a}{b}\right)}&=-\frac{x}{b}+\log{\left(-\frac{a}{b}\right)}\\ %% \Rightarrow\quad %% -\frac{a}{b}(1-y)+\log{\left(-\frac{a}{b}(1-y)\right)}&=-\frac{x}{b}+\log{\left(-\frac{a}{b}\right)}\\ %% \Rightarrow\quad %% -\frac{a}{b}(1-y)e^{-\frac{a}{b}(1-y)}&=-\frac{a}{b}e^{-\frac{x}{b}}\\ %% \Rightarrow\quad %% -\frac{a}{b}(1-y)&=W\left(-\frac{a}{b}e^{-\frac{x}{b}}\right)\\ %% \Rightarrow\quad %% y&=1+\frac{b}{a}W\left(-\frac{a}{b}e^{-\frac{x}{b}}\right)\\ \end{align}
I believe this to be incorrect however, I'm pretty sure the answer shouldn't have a negative inside the lambert function. As can be deduced from this WA calculations:
As you see this problem arises from a non-linear ODE, where I have let $a=d/c$ and $b=(d+c)/c$.