# Solution to $(A+x^2)e^x=B$ with Lambert W function

Is it possible to obtain a analytical solution for $(A+x^2)e^x=B$, where we want to solve for $x$ with $A,B$ as constants?

• Sage and Maple can't solve this symbolically
– joro
Sep 5, 2015 at 6:07
• What about (x - t + exp(x)) exp(x) = a please? Mar 12, 2016 at 18:39

You seek a solution in $$x$$ of the transcendental equation $$e^x(x-t_1)(x-t_2)=a.$$ (The coefficients $$t_1,t_2$$ are real for $$A<0$$, complex otherwise.) The solution $$W(t_1,t_2;a)$$ is referred to as the "quadratic Lambert-W function". It is studied in several recent papers:

A series expansion is presented in Asymptotic series of Generalized Lambert W Function (see also this MO posting).

The solution to this transcendental algebraic equation is indeed a Generalized Lambert W function and there are a number of papers on the latter, not only the pioneering 2006 AAECC paper mentioned here. See the papers in https://www.researchgate.net/project/Generalized-Lambert-W-function

Granted the second reference, the one by Mezo and Keady claims that the approach used for a particular instance in Physics is 'unsatisfactory' for getting all the solutions but that's an issue of completeness of solutions - not an actual error. Subsequent papers in SIGSAM in that link I just gave, offer more solutions. E.g. check out the most recent publications by Aude Maignan on the ResearchGate project:

https://www.researchgate.net/project/Generalized-Lambert-W-function

Much work has been done since the 2006 paper.

• The second half of your post might work better as a comment on the other answer; it's more likely to get Carlo Beenakker's attention. Jan 2, 2022 at 16:36
• Thanks but I am new to this forum, I tried to comment on Carlo Beenakker's answer but I was denied permission. I don't have '50 reputation' yet. Jan 3, 2022 at 11:16
• I removed the offending comment, which referred to this criticsm by Mezo and Keady: "For a class of parameters the Scott et al. solution does not give back all the solutions and, in other cases, it gives a virtual solution. One might study exactly when the Scott et al. solution works properly." Jan 10, 2022 at 13:07
• Thank you for the change and clarification. Jan 10, 2022 at 13:46