Request for help to solve an equation with LambertW: $ (x^2-4\,x+6) e^x =y$ I want to solve the following equation: 
$$ (x^2-4\,x+6) e^x =y \tag{1} $$
It looks a bit like the following equation: 
$$ x e^x =y \tag{2} $$
Since the solution of equation (2) is: x=LambertW(y), I think the solution of equation (1) should also use the function LambertW.
I will try to better explain what I want. I’m going to study the following function: For all x>0;
$$f(x)=(x^2-4\,x+6)\,e^x $$
$$ f’(x)=(x^2-2\,x+2)\,e^x $$
For all $x>0; x^2-2\,x+2 ≥ 1$ and $e^x$ ≥ 1 
Therefore, $f’(x) ≥1 >0 $. The function f is strictly increasing on the interval $ ]0; +∞[ $. 
Furthermore, the function f is continuous. 
Therefore, for all x>0, there is a unique y>6 such that f(x)=y. 
I know the value of y and I know how to solve the equation f(x)=y numerically. For example:
$ y=100 000; x=7.905419368254814 y=100 000 000; x=15.506081342140432$.
Does anybody know how to find the function g such that $g(y)=x $ (g is the inverse function of f, i.e. $g=f^{-1}$ ). This would provide a general formula for y in terms of x without having to solve the equation numerically. Best, Jacob Safra.
 A: No, this is quite different.  As far as I can tell, it can't be expressed in the form $z \exp(z) = f(y)$. 
LambertW is unlikely to help here.
A: There are generalizations of the Lambert $W$ function which solve
$$
(x-t_1)(x-t_2)\exp(x) = y.
$$
See
I. Mező and A. Baricz,
On the generalization of the Lambert $W$ function with applications in theoretical physics.
arXiv:1408.3999v1.pdf (18 Aug 2014).
They have C-code for some of their functions, but, in practice, I guess
that just doing the numerics as you already are may be simpler.
A: NOT AN ANSWER
Unfortunately in the paper :
I. Mező and A. Baricz, "On the generalization of the Lambert $W$ function with applications in theoretical physics" 
the "quadratic case" was not properly identified. IMHO, the focus of that paper was mainly on bilinear case, linked with Laguerre polynomials. In the paper "Generalization of Lambert W-function, Bessel polynomials and transcendental equations", http://arxiv.org/pdf/1501.00138v2, the equation has been solved as a series involving Bessel polynomials. In this case the trivial application of such series would be centered in $2 \pm i\sqrt(2)$, with branching points at $1 \pm i$. Therefore the radius of convergence of the series would be $R=\sqrt(4-2\sqrt(2)) \approx 1.082$, therefore the series could not reach the real axis. I am currently working to an extension of such series centering it on a point on a real axis in order to improve the convergence.
However, it can be interesting to show the formal Lagrange series centered in the zeros of quadratic polynomial: $(x^2-4x+6)=(x-2 + i\sqrt 2 )(x-2 - i\sqrt 2 )$
Let's place $x_0=2 + i\sqrt 2$ so, as in
Lagrange Bürmann Inversion Series Example
and:
Can I solve this with a Lambert Function?
Lagrange inversion provides two solutions:
$$x=x_0^*+\sum_{n=1}^{n=\infty} \frac{1}{n n!}\left( \frac{nle^{x_0^*}}{{x_0^*}-{x_0}}\right)^n B_{n-1}\left( \frac{-2}{n({x_0^*}-{x_0})}\right)$$
and:
$$x=x_0+\sum_{n=1}^{n=\infty} \frac{1}{n n!}\left( \frac{nle^{x_0}}{{x_0}-{x_0^*}}\right)^n B_{n-1}\left( \frac{-2}{n({x_0}-{x_0^*})}\right)$$
where $B_n(x)$ are the Bessel polynomials are defined as:
$$B_n(x)=\sum_{k=0}^n\frac{(n+k)!}{(n-k)!k!}\left(\frac{x}{2}\right)^k$$
See: http://en.wikipedia.org/wiki/Bessel_polynomials
Simple c++ code can be written using STL <complex>  class to evaluate such series within their convergence radius.
