Is there a way to solve: $\space x - a = b\cdot x \cdot e^x$ in terms of the Lambert-W function?

127 Views Asked by At

Is there a way to solve the following equation in terms of the Lambert-W function? I'm unable to cast it into a form suitable for using the Lambert-W.

$$x - a = bxe^x$$

I'm intentionally not looking for a solution in terms of infinite series of Laguerre polynomials etc. I want a solution in terms of a finite set of something for which known closed-form approximations exist, such as the Lambert-W function.

2

There are 2 best solutions below

0
On

Almost surely no to the title question. Instead, this equation (and ones like it) has been proposed as an extension of the Lambert W-function, where we generalize the $x$ factor in $xe^x$ to a rational function, i.e. consider the inversion of $x \mapsto \frac{P(x)}{Q(x)} e^x$:

https://arxiv.org/pdf/1408.3999.pdf

Using the authors' notation, the solution of your equation is

$$x = W\left(\begin{matrix}0 \\ a\end{matrix}; \frac{1}{b}\right)$$

where this is the extended Lambert function mentioned. If one is asking about approximation, Newton's method is pretty much always going to be one of the most efficient ways to do so, just as it is for the usual Lambert function, though if $b$ in the above expression is large (so that $\frac{1}{b}$ is small), the paper gives a Taylor series on page 4 that might be better because it doesn't require repeated evaluation of $e^x$ (which is typically done by Taylor series anyways), but does require the evaluation of (differentiated) Laguerre polynomials.

However, I don't think it will work here because of what you just mandated regarding $b$ being small as the radius of convergence will be limited by the nearest singularity, of which there will be quite a few as this will extend to a one-to-many relation with a complicated branching structure in the complex plane (and thus also raises the question of the suitable choice of branch: there are multiple real-valued ones, too, and thus whether the evaluation code sought by OP should include support to evaluate other branches).

0
On

The generalized Lambert function is conceptually fascinating but using it from a numerical point of view does not seem to be the easiest thing.

Since in comment, you precised that we look for the positive zero of function $$f(x)=x -a- b\,x\,e^x$$ the first hing to notice is its derivatives $$f'(x)=1-b \,e^x (x+1)\qquad \text{and}\qquad f''(x)=-b \,e^x (x+2) <0 \,\, \,\forall x >0$$ The first derivative cancels at $$x_*=W\left(\frac{e}{b}\right)-1\implies f(x_*)=-a+\Big[W\left(\frac{e}{b}\right)+\frac{1}{W\left(\frac{e}{b}\right)}-2\Big]$$ and the second derivative test reveals that $x_*$ corresponds to a maximum. So, the solution will be $ x> x_*$. We must also notice that the term in brackets is always positive.

Since $f(x)$ varies very fast as soon as $x>x_*$, let us use Newton method using, say, $x_0=1.1 x_*$.

For illustration purposes, let us try using $a=-123$ and $b=10^{-18}$. Newton iterates will be $$\left( \begin{array}{cc} n & x_n \\ 0 & 41.5673 \\ 1 & 44.0693 \\ 2 & 43.3594 \\ 3 & 42.9343 \\ 4 & 42.8095 \\ 5 & 42.8008 \end{array} \right)$$ which does not seem too bad except that we face an overshoot of the solution.