# MATLAB: The function ‘solve’ doesn’t give all the solutions.

all solutionsfunctionsolve

% this does not give all the solutions
syms u;
solve(1-0.99-(u+1)*exp(-u));
double(ans)
see the short 3-line code there, try it out.
The solutions should be u1=-0.996308, and u2=6.63835
But this code only gives me u1, and mentions nothing about u2.
Can any one tells me why or which function should I use to get all the answers.
Thanks!

>> solve(1-0.99-(u+1)*exp(-u),'Real',true)ans =    - lambertw(0, -exp(-1)/100) - 1   - lambertw(-1, -exp(-1)/100) - 1
>> feval(symengine,'numeric::solve','1-0.99-(u+1)*exp(-u)','AllRealRoots')ans =[ [u == -0.99630759688740599414645321772374], [u == 6.6383520679938122693712394050244]]