In my problem I get the equation
(1):
$e^{x}-x=c$
with $c > 1$.
With my knowledge the analytical solution will be
(2):
$x = -W(-e^{-c})-c$.
With $c = 5.5555$, and this is my problem I only find the approximate solution:
$x = -5.55112$
Though, I know there is a second solution of approximately:
$x = 2.02559$.
So, this problem having two real solutions one negative and one positive, I wonder how to get the positive solution, because I am only interested in the postive solution $x > 0$.
Can you help me?
Consider the function $$f(x)=e^x-x-c\qquad \implies \qquad f'(x)=e^x-1$$ So, the first derivative cancels if $x=0$ which is a minimum by the second derivative test. Since $f(0)=-c <0$, you have two roots corresponding to the two branches of Lambert function.