3

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.

  • Are the signs of $a$ and $b$ known ? – Jean Marie Jul 09 '20 at 16:26
  • 5
    A general comment : In numerical analysis, looking for closed form expressions is most often a vain search : have you tried efficient numerical methods like Newton's method for which you can get arbitrary precision results ? Subsidiary question : in the case of two solutions, which one is interesting for you ? – Jean Marie Jul 09 '20 at 16:43
  • Your question is actually if someone can find a finite polynomial to describe the expansion of $bxe^x -x$ into an infinite polynomial. – Moti Jul 09 '20 at 17:25
  • 1
    Isn't a truncated series a "closed form approximation"? Or do you mean you want something that has validity over a wide domain? – The_Sympathizer Jul 09 '20 at 18:06
  • @JeanMarie, a < 0, b > 0, and I'm interested in solutions where x > 0.

    To answer your other query, I need to implement this in a modeling software, and I want to first invest effort in closed form approximations in the interest of compute speed. If none, then I'd go implement a NR iterative solver (and I acknowledge that sometimes NR iterations is faster than a complex closed form solution; but I can make that assessment only once I have a candidate approximation).

    – vharihar Jul 10 '20 at 04:37
  • @The_Sympathizer, yes, a truncated series is also fine as long as its accuracy over the domain (0 < x < 100) is good, and as long as the series is short enough (basically to factor in my point above about the compute expense part). I don't care about its accuracy beyond x=100. – vharihar Jul 10 '20 at 04:43
  • 1
    @JeanMarie, pls note: b > 0 but is extremely small, of the order of 1e-16 or so. – vharihar Jul 10 '20 at 05:03
  • @user199039 : What level of accuracy do you need out of it? – The_Sympathizer Jul 10 '20 at 05:30
  • After using the Laguerre polynomial series expansion, there is an integral representation for the inverse function – Тyma Gaidash Apr 29 '23 at 22:53

2 Answers2

3

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).

1

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.