# Prove graphically that the Lambert equation has exactly zero, one or two roots

I need some help on the below problem.

Consider the Lambert equation: $xe^x = a$ for real values of x and a

(a) Show graphically that the equation has exactly one root $\xi(a) \ge 0$ if $a \ge 0$, exactly two roots $\xi_2(a) < \xi_1(a) < 0$ if $-1/e < a < 0$, a double root $-1$ if $a=-1/e$ and no roots if $a < -1/e$

(b) Discuss the conditioning of $\xi(a), \xi_1(a), \xi_2(a)$ when a varies on the above intervals

I've tried to solve the equations for each a, but I can't find any points to plot, because the solutions of the equations are expressed with the Lambert W function

Don't solve the equation. Instead, plot a picture of $f(x):=xe^x$ for $x\in\mathbb R$. Where is $f(x)$ positive, negative? Use calculus to find where $f(x)$ is increasing, decreasing. What is the behavior of $f(x)$ as $x\to\infty$, or $x\to-\infty$?
Once you've plotted $y=f(x)$, intersect it with the horizontal line $y=a$. Note that $a=-1/e$ is related to a critical value of $f$.
You are trying to find the roots of $y=W(x)$, which is equivalent to $0=W(x)$$0=W(x)\to0e^0=x$$The solution is simply$x=0\$, the one root.