I have seen a mathematics-related video here, which introduce a Lambert W function to the audience: $$f(x)=xe^x\\ W(x)=f^{-1}(x)$$
Then we can use $W(x)$ to solve some transcendental equation conveniently, such $x^x=4$. But he left homework at the end of the video:
To solve equation $x e^x + x = 1$
Well, this homework made me lose sleep for 2 days. I don't know how to solve this equation with the $W(x)$. Can someone please guide me?
The equation cannot be solved in terms of Lambert W.
To show this, try to rearrange the equation to a form $f(x)e^{f(x)}=c$, $f$ a function in the complex numbers and $c$ a complex constant.
$$xe^x+x=1$$
$$xe^x=1-x$$
$$\frac{x}{1-x}e^x=1$$
We see: the exponent is $x$, a polynomial in $x$, and the factor is not a polynomial in $x$. There is no chance to rearrange the equation by only elementary operations to a form where the factor is equal to the exponent. Therefore your equation is not in a form that can be solved by Lambert W.
But the equation can be solved by generalized Lambert W:
$$x=W(^0_1;-1)=-W(^{-1}_0;-1)$$
$-$ see the references below.
$\ $
[Mezö 2017] Mezö, I.: On the structure of the solution set of a generalized Euler-Lambert equation. J. Math. Anal. Appl. 455 (2017) (1) 538-553
[Mezö/Baricz 2017] Mezö, I.; Baricz, A.: On the generalization of the Lambert W function. Transact. Amer. Math. Soc. 369 (2017) (11) 7917–7934 (On the generalization of the Lambert W function with applications in theoretical physics. 2015)
[Castle 2018] Castle, P.: Taylor series for generalized Lambert W functions. 2018
[Stoutemyer 2022] Stoutemyer, D. R.: Inverse spherical Bessel functions generalize Lambert W and solve similar equations containing trigonometric or hyperbolic subexpressions or their inverses. 2022