<s>[INST] Solve for $x$ using the lambert W function $ \frac{\ln(1+bx)}{x} = a$ 

Question: Solve for $x$ using the lambert W function
$$ \frac{\ln(1+bx)}{x} = a$$


I've got this far:
$$ \frac{\ln(1+bx)}{x} = a$$
$$ \ln(1+bx) = ax $$
$$ 1+bx = e^{ax} $$
Stuck when to use the lambert W function
 [/INST] $$1 + bx = e^{ax}$$
Take $b$ common and multiply throughout by $e^{-ax}$ to get,
$$\left(\frac{1}{b} + x\right)be^{-ax} = 1$$
Divide throughout by $b$ and multiply throughout by $e^{-\frac{a}{b}}$ to get,
$$\left(\frac{1}{b} + x\right)e^{-ax}e^{-\frac{a}{b}} = \frac{1}{b}e^{-\frac{a}{b}} \Rightarrow \left(\frac{1}{b} + x\right)e^{-a\left(x + \frac{1}{b}\right)} = \frac{1}{b}e^{-\frac{a}{b}}$$
Multiply throughout by $-a$ to get,
$$-a\left(x + \frac{1}{b}\right)e^{-a\left(x + \frac{1}{b}\right)} = -\frac{a}{b}e^{-\frac{a}{b}}$$
Note that the above is in the form $ye^y = c$, hence $y = W(c)$,
$$-a\left(x + \frac{1}{b}\right) = W\left(-\frac{a}{b}e^{-\frac{a}{b}}\right)$$
Simplying for $x$ we get,
$$x = -\frac{1}{a}W\left(-\frac{a}{b}e^{-\frac{a}{b}}\right) - \frac{1}{b}$$
</s>