Solving for exact solution: $0.5 = 1-e^{-x}-xe^{-x}$ Is it possible to solve the following equation for an exact solution, and if so how?
$$0.5=1-e^{-x}-xe^{-x}$$
My textbook (Introduction to Mathematical Probablity) jumps from this equation directly to the solution $1.678$.
I was unable to solve this myself, and computer algebra software seems to approximate this using Newton's method.
 A: Not outside of use of the Lambert W function.

Begin by subtracting $1$ from both sides to get us to
$$-\frac 1 2 = -e^{-x} - xe^{-x}$$
On the right-hand side, factor out $e^{-x}$, and then divide both sides by $e$. We then obtain
$$-\frac{1}{2e} = (-x-1)e^{-x-1}$$
Apply the Lambert W function to both sides; it is the inverse function to $f(x)=xe^x$. Thus, $W(xe^x)=x$. The right-hand side would be $f(-x-1)$, and thus return the parenthetical of $-x-1$. This gives us
$$-x-1 = W \left( - \frac 1 {2e} \right)$$
Now solve for $x$:
$$x = -W \left( - \frac 1 {2e} \right) - 1$$
(We of course assume the principle branch here; the $W$ function would otherwise be multivalued for complex numbers without a choice of branch.)

Granted, the Lambert W function is a special nonelementary function, so this can understandably not count as a closed form for you. But I don't believe any other way of getting something even close would be possible (and Wolfram certainly seems to have no ideas). If nothing else, it being a well-known function would make approximations somewhat easy to derive based on previous discoveries people have made.
For real-valued solutions, Wolfram offers the approximations of
$$x≈-0.768039 \;\;\;\;\; x \approx 1.67835$$
Based on the behavior of the function you're looking at, these will be the only two real solutions.
