Solution of equation containing two logarithms

34 Views Asked by At

I need to solve the following equation for x:

$a\log(\frac{x}{a})-b\log(\frac{a-x}{2b})=x-d$.

I know that the solution of

$\log(a x+b)=c x+d$

can be determined using the Lambert function https://en.wikipedia.org/wiki/Lambert_W_function. I was wondering if there's some generalization that works when thare are more than one logarithm. I've also thought to rewrite the equation as $x=\log(\frac{x}{a})^{a}-\log(\frac{a-x}{2b})^{b}+\log(e^{d})$ to put everything in a single log, but then I don't know how to put it in a form that can be inverted using the Lambert function. Maybe there's another way.