# Restrict solutions using lambert W to reals

I have an equation of the form

$$x a + b = \exp(xc)$$

where I, in fact, know that $b =1$. Which implies that one solution to the equation is always at $x = 0$. I'm now searching for the other solution.

I learned from Wolfram Alpha about the existence of the Lambert W function, and tried to employ it here. I got

$$x_n = \frac{-a W_n(-c \frac{\exp(-bc/a)}{a}) - bc}{ac}$$

, where $W$ is the $n$ths branch of the Lambert W function.

However, I want to restrict my solution to the reals, and don't know how. Plugging in arbitrary numbers, I got that for $n=0$, I get $x=0$, and for $n=2$, I get another real solution, and anything else appears to be complex.

### How do I determine $\{n \in \mathcal N: x_n \in \mathcal R\}$?

• @JJacquelin I don't understand. with $x = 0$, the right hand side becomes $1$, which solves the equation if the left hand side is too one, which it is for $b=1$. – FooBar Sep 16 '15 at 8:45
• Sorry for my mistake. – JJacquelin Sep 16 '15 at 8:50
• On the real domain, there are only two branches. The main branch $W_0(x)$ and the branch $W_{-1}(x)$ :en.wikipedia.org/wiki/Lambert_W_function – JJacquelin Sep 16 '15 at 9:02

The only two branches of $W$ which can ever assume real values are the $n=0$ and $n=-1$ branches. For this to happen in your case, assuming that $a,b,c\in\mathbb{R}$, the argument to $W$ (from your solution, above) has to satisfy:
$$-\frac{1}{e}\le -\frac{c\cdot\exp\left(\frac{-cb}{a}\right)}{a},\,\,n=0$$ $$-\frac{1}{e}\le -\frac{c\cdot\exp\left(\frac{-cb}{a}\right)}{a}\lt 0,\,\,n=-1$$
If the first of the above conditions is satisfied you will get a real root for $n=0$. If the second is also satisfied you will get a second real root for $n=-1$. All other roots will be complex.